#💻・modding-dev

1 messages · Page 435 of 1

tired kestrel
#

Dude no

thorn furnace
#

sorry i didnt see this

spice wadi
#

Huh 😭

thorn furnace
#

screenshots it is

spice wadi
#

I'm guessing the new line symbol makes it so the game doesn't actually know it's a new line?

#

So it doesn't push everything else down

thorn furnace
#

o

#

testing this functionality is so annoying because it deletes my directory every time it fails

spice wadi
#

Maybe disable that? 😭

thorn furnace
#

its part of the testing

unborn bay
#

oh yeah it might be newline

idle plaza
# thorn furnace uh

Discord converts indent characters into four spaces each, so your client can send a message thinking it's under the character limit, only to be blocked. That error message you see is a generic response trying to appear more specific than it really is.

unborn bay
#

the box handling that doesn't actually handle newlines

#

though of course the actual text displays it properly

minor magnet
#

if i wanted a joker to activate only when all cards in a pack have been created, how would i go about doing that?

spice wadi
primal fossil
#

thanks for the help. im in asia and am going to go get some sleep now but I definitely want to keep working on things and learning how to make stuff

thorn furnace
spice wadi
#

Makes sense

#

I also had that issue

#

So I tested them separately

echo aurora
#

how do you add custom sounds?

spice wadi
snow vale
#

btw how can i know every joker that is currently in the game?

snow vale
#

i mean

#

adding modded ones too

#

so i can choose a random one

echo aurora
wind steppe
#

theres too many mods

idle plaza
#

I'm relatively sure they just mean installed mods.

snow vale
#

oh so there's no way to know?

snow vale
#

then ill limit it to some mods

worthy stirrup
#

Ive got this code, whenever I try to open my deck it gives me this crash

    calculate = function(self, card, context)
        if context.discard then
            full_hand = context.full_hand
            for i=1, #context.full_hand do
                context.other_card = full_hand[i]
                other_card = context.other_card
                other_card:set_edition(poll_edition('Jevil', nil, true, true))
                other_card:set_seal(SMODS.poll_seal({key = "Jevil", guaranteed = true}))
                other_card:set_ability(SMODS.poll_enhancement({key = "Jevil", guaranteed = true}))
                SMODS.change_base(other_card, "Spades")
            end
        end
    end,
daring fern
wind steppe
#

uhhh you could just do create_card with set = "Joker" but thats biased for rarities

snow vale
wind steppe
daring fern
snow vale
#

so i use G.P_CENTERS on my calculate, and inside it i put every joker i want to use?

daring fern
snow vale
#

oh ok

#

ty

manic rune
#

you might want to change key to type_key 🤔

worthy stirrup
#

ill try that

spice wadi
worthy stirrup
#

hm, nope same crash error

manic rune
#

mm

spice wadi
#

do you know which line is causing this error

worthy stirrup
#

let me check and see if its what i think

spice wadi
#

if not can you add some print functions after each one to check which function is causing taht

manic rune
#

yeah, i might need to see whatever line that is to make sure which is the error

worthy stirrup
#

wait, is set ablity how you set a cards enhacement?

manic rune
#

yes

worthy stirrup
#

okay, all the passes work, its reaching the end fine

#

weird, why is card sleeves coming up in the crash log

runic jay
#

How would one make a joker gain X Mult when a joker is sold?

worthy stirrup
#

let me check something

worthy stirrup
worthy stirrup
#

wait, i think i know what could be causing it

#

let me check

#

got it

#

it was fucking cartomancer

manic rune
#

sob

main minnow
#

the Steamodded documentation mentions aSMODS.destroy_cards(cards) utility function, but when i try to call it the game crashes, and that function doesn't seem to exist in src/utils.lua

worthy stirrup
#

watch this

main minnow
#

so is the documentation wrong?

worthy stirrup
red flower
manic rune
#

i cant watch ur vid

#

😭

wind steppe
#

mine keeps pausing to buffer

worthy stirrup
#

discarded cards enhacement animations play multible times

runic jay
worthy stirrup
#

let me see if i can make it a gif

manic rune
worthy stirrup
#

oh.

manic rune
#

i think theres context.pre_discard? not sure if thats the right one

manic rune
#

N' have you checked my function that checks for function that checks for even numbers 😊

worthy stirrup
#

let me try that rq

worthy stirrup
manic rune
#

great

worthy stirrup
#

crashes when i select a card

manic rune
#

wha

worthy stirrup
#

oh

#

i have two contexts

manic rune
#

😭

worthy stirrup
#

context.context

manic rune
#

lmao

worthy stirrup
#

IT WORKS

#

YAY

#

also heres the gif i promised

manic rune
#

:3 thats an image

worthy stirrup
#

just kidding i guess, it aint moving

manic rune
#

thats a freaking image.

worthy stirrup
#

how the fuck did i manage that

manic rune
#

its literally a png 😭

worthy stirrup
#

why copy and paste

#

why did you do this to me

idle plaza
#

Cool png

manic rune
#

ezgif
>returns a png

worthy stirrup
manic rune
#

i see

worthy stirrup
#

it works fine now, thankfully

manic rune
#

wow that 9 of spades is cracked

worthy stirrup
#

Thats Jevil crossed off the list

manic rune
#

red seal AND polychrome

worthy stirrup
#

and glass

lament agate
#

how do you make a joker that goes eternal after being bought?

manic rune
#

theres context.buying_card

#

not sure if it can check for itself

#

you can try tho

red flower
#

context.buying_self exists now

manic rune
#

oh

#

it does??

lament agate
red flower
manic rune
#

:3 in my defense

lament agate
#

CARAMEL

#

FINISH THE WIKI DOCUMENTATION

#

AND MY LIFE WILL BE YOURS

manic rune
#

😭

#

give him some time damn

worthy stirrup
#

now i wonder, what happens if i double jevil

lament agate
#

how do you make things eternal again

wind steppe
lament agate
#

thanks

#

wait i can just look up how cube did it

wind steppe
#

might be card.ability.self.eternal

snow vale
idle plaza
#

Code?

wind steppe
#

(also with that many lines you should really separate into multiple files)

snow vale
#

vruh

#

copy paste

spice wadi
#

do you have everything in one file

snow vale
#

for the moment yeah

#

ill divide it later on

manic rune
#

is this set anywhere?

snow vale
spice wadi
#

where is this

snow vale
#

beginning of the code

manic rune
#

:3 probably put that in your calculate instead

snow vale
#

oh ok

spice wadi
#

that could be inefficient if it has to do that every calculate

manic rune
#

mm true

spice wadi
#

it could instead hook the main menu function and store the table as a variable of the mod or a unique global name

snow vale
#

then?

#

holy moly

#

hooking

#

😨

manic rune
#

though im pretty sure just grabbing something from G.P_CENTERS wont make it a Card

snow vale
#

but i think i understand it now

manic rune
#

so i think thats not the problem here

snow vale
#

so?

spice wadi
#

youd need a card object right

manic rune
#

yes

spice wadi
#

so how do you get that from a P_CENTERS entry

snow vale
#

ru asking me?

spice wadi
#

nah im just generally asking

snow vale
#

ok

main minnow
#

any suggestions?

manic rune
#

not sure if thats a good approach

snow vale
#

so then what could be a way to fix my problem?

#

i want to copy a random joker's ability

paper zealot
#

For future reference, code formatting is provided by the language extension - gotta install the Lua extension or a formatting extension like Prettier first

maiden phoenix
#

Didn't know they don't have it since vscode seemed to have colored code

wind steppe
snow vale
#

end of round

#

so it crashes at the end of round

wind steppe
#

before earning money or after

snow vale
#

on main eval

paper zealot
maiden phoenix
#

Whatever it's hard to guess with a pic alone, maybe you should give that advice to them

paper zealot
#

It seemed like their issue was fixed, I was just trying to let you know why the format option was missing for them 🙂

spice wadi
manic rune
#

do you know partner

#

it will give that exact results

hybrid shadow
#

bunp

wind steppe
hybrid shadow
#

more ownership. yay

#

as if i havent made this incompatible enough with other mods already

lament agate
#

should i be ashamed

primal robin
#

..no?

wind steppe
lament agate
#

oh good

lament agate
wind steppe
versed basin
spice wadi
thorn furnace
#

How does SMODS compare two versions

#

I want to implement that functionality

pure salmon
#

how do i duplicate every card in the deck once?

obtuse silo
#

is there any way to obtain the score of a single hand?

tepid crow
obtuse silo
thorn furnace
#

or don't ignore it because I don't remember how to put the text on separate lines

pure salmon
#

this dupes the same card a LOT of times

thorn furnace
tepid crow
thorn furnace
#

oki

#

fetching versions from github and those usually start with v

thorn furnace
formal parrot
#

Hello french lady

thorn furnace
#

meoww

formal parrot
#

Is the Jojo modding going smooth ?

thorn furnace
tepid crow
sturdy monolith
#

why does card.ability work in literally every other mod I've used but not mine 😭

thorn furnace
thorn furnace
#

If they're naming their version names wacky things that's kinda on them at that point

formal parrot
burnt cairn
#

which vanilla file contains the jokers' code?

thorn furnace
obtuse silo
tepid crow
thorn furnace
tepid crow
#

it doesn't

#

I hate writing lua pattern matches

#

so I usually just give the equivalent regex when talking about it

thorn furnace
#

lemme ask google to translate it dance

thorn furnace
errant fulcrum
#

Could someone tell me why Celestial Packs are still showing up in the shop with this?

        G.E_MANAGER:add_event(Event({
        func = function()
        SMODS.remove_pool{G.P_CENTER_POOLS['Booster'], p_celestial_normal_1}
        SMODS.remove_pool{G.P_CENTER_POOLS['Booster'], p_celestial_normal_2}
        SMODS.remove_pool{G.P_CENTER_POOLS['Booster'], p_celestial_normal_3}
        SMODS.remove_pool{G.P_CENTER_POOLS['Booster'], p_celestial_normal_4}
        SMODS.remove_pool{G.P_CENTER_POOLS['Booster'], p_celestial_jumbo_1}
        SMODS.remove_pool{G.P_CENTER_POOLS['Booster'], p_celestial_jumbo_2}
        SMODS.remove_pool{G.P_CENTER_POOLS['Booster'], p_celestial_mega_1}
        SMODS.remove_pool{G.P_CENTER_POOLS['Booster'], p_celestial_mega_2}
        SMODS.add_card({set = 'Tarot', area = G.consumeables, key = 'c_high_priestess'})
        return true
    end
}))
end```
tepid crow
bold sleet
#

Hey, does anyone happen to know the name of this card area thingy idk
(like, hand, discards, jokers, etc)

thorn furnace
tepid crow
#

oh wait my regex doesn't include the last version digit

#

lol

#

could do something like (\d+\.)+\d\S*? 🤔

manic rune
#

hooooow do i do something like hooking to the calculate of an object 🤔

#

i think i might be dumb

bold sleet
#

shouldn't that work?

#

no clue i am swery stoopid

manic rune
#

it doesnt

#

so i guess thats not it :p

#

it says mat_calc_ref is nil

bold sleet
#

I have. No fucking clue.

tepid crow
#

that would make sense if the calculate function was undefined?

bold sleet
manic rune
#

🤔

unkempt thicket
#

It seems you're trying to hook and make the function at the same time so yea

manic rune
#

uhhh how do i hook then :3

tepid crow
#

you can't really pre-emptively hook a function that doesn't exist yet

manic rune
#

a

#

damn

#

this worked :p

bold sleet
#

if it works it works

#

no questions asked

manic rune
#

true

tepid crow
wind steppe
#

why are you hooking your own function

manic rune
tepid crow
#

sort of a generalist type system?

manic rune
tepid crow
#

e.g. if the relic has the "+mult increase" type it'll automatically increase it without having to do copy-paste it every time?

manic rune
#

mhm

tepid crow
#

oh

thorn furnace
#

Okay I managed to get everything else working finally

manic rune
#

so this would give 4.5 mult instead

thorn furnace
unkempt thicket
manic rune
thorn furnace
manic rune
#

thats G.UIT.R

#

which will align them horizontally instead

thorn furnace
#

o
I really need some sleep

manic rune
thorn furnace
manic rune
#

just needing to return {mult = 5} would be nicer than return {mult = 5 * gainsMulti["mult"]} imo

tepid crow
#

honestly making a custom calculate function might be best? 🤔

thorn furnace
unkempt thicket
thorn furnace
thorn furnace
#

which are conveniently just barely out of camerashot

burnt cairn
#

is there a context for using a specific consumable?

tepid crow
manic rune
#

mm

#

might need to figure out how to make my own calculate then 🥀

#

hopefully its not that bad

burnt cairn
tepid crow
#

you get the full consumable data right? could just check the parts you need

manic rune
#

is this how i do it

#

then im guessing i will need to patch something in here so that it will run calculate_ygg if its a relic from my mod? 🤔

burnt cairn
royal ridge
burnt cairn
#

omg hi happylandeline

royal ridge
#

bevweb

burnt cairn
#

toneblock

sturdy monolith
#

how do quantum enhancements work?

manic rune
#

a

sturdy monolith
errant fulcrum
#

I'm just gonna ask: is there a function for banning specific booster packs in custom decks?

spice wadi
royal ridge
manic rune
snow vale
#

i think i found the problem on the copying a random joker :/

#

it returns the whole thing

burnt cairn
#

so is this correct nom

manic rune
#

nop

burnt cairn
#

it doesnt crash the game but also just nothing happens when i use the fool so

manic rune
#

context.consumeable.config.center.key, im p sure

royal ridge
manic rune
#

oh

burnt cairn
#

ah yeah catstare

snow vale
manic rune
#

its context.using_consumeable too

#

sob

royal ridge
#

context.consumeable is the card, not a string

burnt cairn
#

i see

#

most of this codebase is still a mystery to me

manic rune
#

i

dont know what im doing here at all ima be real

#

is there any mod that adds their own calculate??

burnt cairn
#

where would i find these myself in the game files? like these contexts have gotta be defined somewhere in vanilla right

manic rune
#

its in the documentation

burnt cairn
#

yeah but the documentation sucksssssss

manic rune
#

😭 buddy you are better off reading this than the game's code, trust me

burnt cairn
#

i know catplush

#

the resources for learning modding are. far from good

formal parrot
#

Imagine reading the game’s code

#

Puff

#

Could never be me

snow vale
#

neither me

formal parrot
#

Baconator

burnt cairn
#

any attempt at reading the documentation for me usually ends up in 10 minutes of being lost and then asking here instead

snow vale
#

cooking bacon

burnt cairn
#

and i always feel like a nuisance whenever i ask anything

#

its annoying 💥

formal parrot
#

bro its totally easy once you figure out the basic structure

#

Check vanilla remade and you’ll find everything if you know how to search properly

hybrid shadow
#

i think the issue is more lua's higher skill floor than it is "bad documentation"

formal parrot
#

I despise lua

#

We’re friends tho

#

🤝

royal ridge
burnt cairn
#

yeah, my programming experience is a decade of scratch and like the bare minimum amount of js

manic rune
burnt cairn
#

so idfk

manic rune
#

holy fuck i need to patch EVERYWHERE to add context 😭

royal ridge
#

if you know scratch you know how to code

#

you just don't know lua

burnt cairn
#

exactly

snow vale
#

well i did touch python and gmlcode but idk

hybrid shadow
burnt cairn
#

i also dont know steammodded which is a whole other thing

hybrid shadow
#

im more scared of eventually having to learn whatever gamemaker uses

snow vale
#

wtf is this? 😭

hybrid shadow
snow vale
royal ridge
snow vale
#

i meant

royal ridge
#

💀

burnt cairn
#

genuinely if i ever make my own game its gonna be made in scratch and then exported with one of those html conversion tools

hybrid shadow
snow vale
#

i want a joker that copies a random joker in the game, so to do it i need to know what does the normal copying jokers copy to do so

royal ridge
#

i went back to scratch and was annoyed at how slow it was

snow vale
burnt cairn
#

🦭 yeah

snow vale
wind steppe
#

blueprint compatibility or just copy everything

royal ridge
#

do you like, set_ability then calculate then set it back or something

#

surely that doesn't break

snow vale
#

this is what i receive from the print of that joker copying a random joker

#

this is the code

hybrid shadow
royal ridge
#

that's just the center ain't it

snow vale
snow vale
wind steppe
#

oh good

snow vale
#

but it aint the same as what blueprint copies

snow vale
burnt cairn
#

ok this has been the shortest amount of time between putting the joker in the game and having it entirely properly functional im a little taken aback

royal ridge
#

it's not a card you can't use calculate_joker

#

um

burnt cairn
#

usually i get stumped on something dumb for like 4 hours

snow vale
#

i think i used something like that before

#

in my other mod

#

wait brb

#

ok didnt find it 😔

#

it was smthing abt creating a joker inside that joker

#

to use it

royal ridge
#

like idk if blueprint code is entirely usable here

hybrid shadow
snow vale
royal ridge
#

i'll check if dumb solution works

#

probably doesn't

snow vale
#

what's that solution?

pure salmon
#

where do cards go after they're played or discarded?

formal parrot
pure salmon
#

no like seriously

royal ridge
#

G.discard

formal parrot
#

🤷

wind steppe
#

G.biblically_accurate_hell

pure salmon
#

i want to make a deck that puts played/discarded cards back into the deck

formal parrot
#

I’ve seen people do it before

pure salmon
#

yeah i know bunco has a boss blind that does something pretty similar

formal parrot
#

Look in the bunco code then

pure salmon
#

have you seen what bunco looks like on the inside

#

i was hoping to just have the deck move all the cards in G.discard back into the deck instead of needing to patch the play and discard function to send the cards back to the deck

#

which context would i do that in?

#

not sure if there's a context between after and hand_drawn

snow vale
#

how can i get each mod's prefix?

#

or if the joker is vanilla?

wind steppe
#

the joker is vanilla if it has no prefix

snow vale
#

yeah but each mod's

wind steppe
#

idk

royal ridge
#

well it's not supposed to do that

#

but you get the idea

wind steppe
#

crimson bean if it was different

obtuse silo
#

question
the localisation file doesn't have anything designated section for boosters, should i just put them in the "other" category?

knotty copper
#

Need advice fixing a text bug issue with malverk
For some reason when switching languages it doesn't properly update the text of some items such as decks to the new selected languages and keeps the text of the previous language
It seems to only occur when I have the texture pack object in my code, so I'm not sure if the issue is with how I set up my texture pack object or my alt textures
https://github.com/TChris2/BalaRTo/blob/main/BalaRTo.lua

GitHub

The RTGame BalaRTo Pack. Contribute to TChris2/BalaRTo development by creating an account on GitHub.

latent river
#

gain effect of a random joker every second

snow vale
#

i like itt even

#

also i alr fixed it

royal ridge
#

gg

latent river
#

oh man

main minnow
#

okay i have a joker whose ability is "each scored 7 has a 1 in 2 chance to destroy a random card held in hand". if i just tell it to remove the cards straight up it does it at the start of the hand before anything is scored, but if i wrap the function call in an event (see pic) it destroys them after drawing the cards for the next hand. how do i get it to run this destroy_cards function when the 7 is actually scored?

#

i assume it's some trigger clause on the event manager but i can't find an option that looks right

faint yacht
royal ridge
#

what's internally happening is that SMODS.destroy_cards sets up events itself

royal ridge
snow vale
#

ok nvm ts not working

royal ridge
#

i'm not exactly sure why a non-wrapped call destroys cards early

snow vale
#

how should pseudorandom_element work?

royal ridge
#

returns a random element from the table

hidden sable
#

how can i make a joker give a seal to a card

#

like if its the first hand played and theres only 1 card

#

give it a modded seal

tribal kestrel
#

I've been stuck on this for a few days, and I could really use some idea if anyone can help

Trying to make a basic map system, i'd like to use cards as "icons". when I add the button config to the card, it does the clicking animation, but doesn't actually trigger the function. I haven't been able to figure out why. This only happens when states.hover.can = true, but i need it to be true for the tooltip to show up, and I like the little tilting animation that comes with it. if anyone has any ideas at all, please let me know! 🥹

hidden sable
tribal kestrel
hidden sable
#

dont cards usually have a "use" thing attached to them

#

maybe you can get that to function on the card?

#

and instead of the whole card being a button its adding a use thing which in my eyes seems more intuitive

tribal kestrel
#

that's for consumables, this is a joker, technically. I'd probably try the extra UI element first, I think i'd like it to just be one click rather than the "use" ui showing up

hidden sable
#

jokers still come with a sell button

#

maybe you can make it read differnt text

#

only other idea i have is make a custom tooltip overlay?

tribal kestrel
#

yeah I may be better off just making it a sprite than a card... may be able to also make my own custom object for it as well

hidden sable
#

anyone know how to add information about objects as an extra tooltip to a joker

#

like if i wanted to have the info for a seal be next to the jokers information

#

how would i do this

tribal kestrel
#

i don't know how to do it myself, but I do know there are plenty of mods that do it. you can also look at the source code for the spectral cards that give seals, or the vanilla remade mod would probably help too
https://github.com/nh6574/VanillaRemade

GitHub

Contribute to nh6574/VanillaRemade development by creating an account on GitHub.

hidden sable
#

maybe this?

tepid crow
tribal kestrel
hidden sable
#

didnt work sadly

#

either that or i inputted it wrong

snow vale
#

FINALLY, I FOUND THE PROBLEM

#

THE JOKERS TABLE IS EMPTY

hidden sable
#

info_queue[#info_queue + 1] = G.P_CENTERS.pwn_hammerseal
would this be different for modded items?

pure salmon
hidden sable
tepid crow
fading hemlock
#

bump

snow vale
#

how can i fix this??

hidden sable
tepid crow
#

probably a localization thing (withlocalize and G.localization)?

snow vale
#

what are these values related to?

fading hemlock
tepid crow
#

yes but that would presumably also change it permanently 🤔

#

you could try and see what cryptid does for the M/jolly edition?

cobalt iron
#

When I change a blind's size mid-round, the blind becomes smaller, but doesn't show it? Is there a way to change the display?

final goblet
#

if context. and G.jokers.cards[1] then

final goblet
#

am looking for the right context for when ante increases

hidden sable
#

in calculate is it possible to return a function in the return part

snow vale
#

what's wrong

tribal kestrel
# tepid crow do you have a quick copy-paste example I can throw in my mod to test some stuff?

Okay this should work. It just uses a random joker for the card

function ave_test_func(e)
      print("click")
end

SMODS.Keybind {
  key_pressed = "j",
  action = function()
    local map = map or UIBox{
        definition = debugMapUI(),
        config = {align='bm', offset = {x=0,y=G.ROOM.T.y-11},major = G.hand, bond = 'Weak', instance_type = 'CARDAREA'}
      }
  end
}

function debugMapUI()
  mapW = 12
  cellH = 2
  cellW = (mapW / 3) - (0.6 / 3)
  anteH = 3
  c1_1 = SMODS.create_card({set = "Joker"})
  c1_1.states.collide.can = true
  c1_1.states.hover.can = true
  c1_1.states.drag.can = false
  c1_1.states.click.can = false
  c1_1.T.r = math.pi/2
  mapUI = {n=G.UIT.ROOT, config = {align = 'cm', colour = G.C.CLEAR, maxw = mapW}, nodes={
    {n=G.UIT.R, config={align = "bm", colour = G.C.RED, minw = mapW, maxh = cellH, padding = 0.1}, nodes={
      {n=G.UIT.C, config={id = '1-1', align = "bm", colour = G.C.CLEAR, minw = cellW, maxh = cellH}, nodes={
        {n=G.UIT.R, config={align = "tm", colour = ave_brown, minh = cellH, minw = 3, maxh = cellH, r = 0.1, padding = -0.25}, nodes={
          {n=G.UIT.C, config={align = "tm", colour = G.C.CLEAR, maxw = cellW, maxh = cellH, r = 0.1}, nodes={
            {n=G.UIT.O, config={object = c1_1, button = 'ave_test'}}
          }}
        }}
      }},
      {n=G.UIT.C, config={id = '1-2', align = "bm", colour = G.C.CLEAR, minw = cellW, minh = cellH}, nodes={
        {n=G.UIT.R, config={align = "cm", colour = ave_brown, minw = cellW, minh = cellH, r = 0.1, button = 'ave_test'}}
      }},
      {n=G.UIT.C, config={id = '1-3', align = "bm", colour = G.C.CLEAR, minw = cellW, minh = cellH}, nodes={
        {n=G.UIT.R, config={align = "cm", colour = ave_brown, minw = cellW, minh = cellH, r = 0.1}}
      }}
    }}
  }}
  return mapUI
end

Paste that into your main .lua file

#
[[patches]]
[patches.pattern]
target = "functions/button_callbacks.lua"
pattern = 'G.FUNCS.hand_text_UI_set = function(e)'
position = "before"
payload = '''
G.FUNCS.ave_test = function (e)
  ave_test_func(e)
end
'''
match_indent = true
times = 1

and use this to patch the function into G.FUNCS to make the button work

#

or just use your own function if you already have one patched

#

hit j once you're in game, won't work on the main menu

#

(accidentally pasted wrong patch, fixed now)

tepid crow
#

yeah that patch makes more sense

#

though that doesn't actually have to be a patch btw

tribal kestrel
#

it doesn't? I thought it 100% needed to be patched in

tepid crow
#

no, you can just globally define G.FUNCS.ave_test in one of your mod files

tribal kestrel
#

oh. yeah that's good haha

#

I learn by looking through the source code haha, I patched in the atlas for my jokers manually before realizing SMODS.Atlas was a thing haha

tepid crow
#

wowie

#

that's rough haha

snow vale
tribal kestrel
# snow vale

i'm unfamiliar with the function SMODS.get_vanilla_joker_return, is there any documentation for it?

tribal kestrel
#

well whatever it is, it's returning nil. so it doesn't like the key or maybe the function itself. is that line 174?

snow vale
#

yeah

#

it is

fading hemlock
tepid crow
#

yeah that sounds like cryptid alright

fading hemlock
tribal kestrel
# snow vale i think not

are you sure that function exists? I actually can't find it anywhere. maybe I need to update my SMODS tho

snow vale
#

i actually think ill need to create it

#

cuz someone gave me that code

#

so

tribal kestrel
#

ah, yeah that's likely your problem then

tepid crow
tribal kestrel
#

thanks for your help regardless

tepid crow
#

I'll try some other stuff

snow vale
#

the problem is that i dont find the function definition for SMODS.get_vanilla_joker_return

#

or in this case, SEAL

tribal kestrel
snow vale
#

guess ill ping him

tribal kestrel
#

been working on my problem for probably 6 hours straight now

snow vale
#

@daring fern please help

crisp coral
#

try not attaching a button to the Card and hook to Card:click instead

zealous glen
tepid crow
#

from my very short testing: Card:click (or any other :click?) doesn't get called if .config.button is defined

zealous glen
#

Since the buttons are behind cards

crisp coral
#

actually instead of the button you can just do card_obj.click = button_func lol

tepid crow
#

yeah just redefining c1_1.click = G.FUNCS.ave_test should hopefully work

#

the hooking also works but that's probably worse

wild pine
#

i have this joker that makes the reroll button become inactive, but is there a way of hiding it completely?

#

i havent found any means of making it completely transparent or anything

hidden sable
#

whats the atlas of jsut like any blind atlas

#

im making a boss blind and i just want a texture i can use

#

temp

crisp coral
#

i recommend against removing the reroll button, very invasive to other mods

hidden sable
wild pine
#

i dont plan for compatibility really since its just a thing for me and my friend group but eh

hidden sable
#

isnt there jsut straight up a love function you can call that removes the reroll button

old epoch
#

Is there a way to make a joker increase negative chances?

wild pine
crisp coral
#

if so, the reroll button is defined somewhere in ui_definitions.lua

zealous glen
wild pine
#

do you know what it might be

hidden sable
shell timber
#

increasing just negative chances would be very invasive and probably not doable with mod compat

zealous glen
old epoch
#

ah

zealous glen
hidden sable
hidden sable
wintry solar
#

No

wild pine
#

could also just try to move it offscreen actually

zealous glen
wild pine
#

is there a love function for that

hidden sable
zealous glen
#

Yes

wintry solar
faint yacht
#

-# Hone, but for negative?

old epoch
zealous glen
#

Oh negative as in the Edition

#

I thought of it like negative events

#

Like a Glass Card not breaking

tribal kestrel
zealous glen
#

Or a Lucky Card not triggering

wild pine
#

thanks man

wintry solar
tired kestrel
wintry solar
wild pine
wild pine
#

of course it just shows up in a shop im not actually buying the button itself

wintry solar
hidden sable
#

whats the balatro default tag atlas

tired kestrel
wild pine
#

that would be funny but i dont know if i should try and figure out how active abilities work yet

fading hemlock
wild pine
#

this mod is like my first time coding anything outside of school

crisp coral
tribal kestrel
#

you need to identify the UIElement for the reroll button, then call the remove() function on the UI element itself. it looks like the reroll button doesn't have an ID though, so it's a little awkward to get. You could do this by either doing G.shop.children[1].children[1].children[1](etc):remove() to get to the reroll node, or you could patch in an id for the reroll button itself and do something like G.shop:get_UIE_by_id('reroll'):remove()

wild pine
tribal kestrel
#

I made a mod that changes the reroll button UI if you have dunsparce from pokermon in your hand haha

crisp coral
#

my hunch was correct

wild pine
#

ill see if i can fit that in my current one that disables it rq

#

this is peak ty

tribal kestrel
#

np!

wild pine
#

wait is there a way to bring it back though skullissue

#

if youre just outright removing it

tribal kestrel
#

it comes back anytime the shop gets reloaded, otherwise you'll have to bring it back yourself yeah

wild pine
#

oh ok nice

sturdy compass
#

Corobo just sent me a video of her auto-updater working. Genuinely revolutionary LETSFUCKINGSHIT

crisp coral
#

real shit?

sturdy compass
#

real shit

#

I've been begging her to PR it into SMODS lol

#

But for now I'm just gonna do a stealy stealy for Maximus

crisp coral
#

smods auto updater hype (i'm still gonna use git

shell timber
#

what???

hidden sable
wintry solar
#

An auto updater?

subtle merlin
#

attempt to index local 'p_edition' (a nil value)?

tepid crow
sturdy compass
#

She said she wants to make it stack so it grabs all of the mods at once instead of doing each individual one

thorn basin
#

For some reason, balatro crashes and says that the value of the chips is a "nil" value in the line.
How can I fix this?

tepid crow
#

oooohhhh 👀

#

I'm in

wintry solar
#

How does it work?

sturdy compass
sturdy compass
thorn furnace
#

Meoww

thorn basin
hidden sable
#

is math.random(1,10) a thing here

wintry solar
thorn furnace
# wintry solar How does it work?

Fetches the version tag of the latest release on your github
If it's newer than the installed version, it prompts an update request
Then it just downloads it, unzips it, installs it, and restarts balatro

thorn basin
fading hemlock
#

How would I go about finding the ui element for a card object?

thorn furnace
sturdy monolith
#

does anyone here have a Mac? need some help compiling something

formal parrot
#

Hey chat

#

So i used draw step to apply the shader to all my cards

#

And now i wanna remove the shader

#

How ?

wintry solar
sturdy monolith
formal parrot
#

That didnt work

#

:D

thorn furnace
formal parrot
#

Can i apply the shader to one joker based on key or enhancement?

#

What context do i need

sturdy monolith
sturdy monolith
formal parrot
#

(I’m using self..config.center.mod.id==“id”)

sturdy monolith
#

look at this

formal parrot
#

Breaking bad !?😭😭

sturdy monolith
#

it's a joker that uses a shader instead of art by using the draw function

sturdy monolith
formal parrot
#

Holy shit😭

sturdy compass
formal parrot
#

I think i figured it out

wintry solar
hallow forge
#

baking badly when

formal parrot
#

Thanks

sturdy monolith
#

np

thorn furnace
formal parrot
thorn furnace
sturdy compass
#

W mindset

sturdy monolith
#

modularity >>>>

thorn furnace
#

Its not modular enough tho its like two things

sturdy compass
#

still a good start

sturdy monolith
#

my mod currently has literally every item in its own separate file that can be deleted at any time if a user wants a specific item gone for good

sturdy monolith
daring fern
zealous glen
#

An user would need to edit the table that picks which objects to load

#

I’m not sure deleting the individual files would work

#

As in

#

I’m not sure if it would load

sturdy monolith
zealous glen
#

For my mod

thorn furnace
zealous glen
sturdy monolith
#

fair enough

zealous glen
#

Though I have multiple tables

#

Two per object type

#

There’s maybe one or another hardcoded block still

zealous glen
#

Mostly when I start developing a new object type

tribal kestrel
#

at the very least I can try having that function print the object table and see what that looks like

tepid crow
zealous glen
tribal kestrel
thorn furnace
#

:3

#

Sorri i didnt see the message

sturdy compass
#

Knowing Eremel he’s gonna pick it apart (in a good way lol)

wintry solar
#

Nah I don’t know a lot about this stuff

thorn furnace
wintry solar
sturdy compass
#

Yeppers

#

It’s also on a mod-by-mod basis

thorn furnace
#

I would send my screen recording but my internet is acting up

#

Wait

#

Here

subtle merlin
#

How would i check in a consumable if there's a round currently ongoing?

wintry solar
#

Oh it’s just a pop up

thorn furnace
obtuse silo
thorn furnace
# obtuse silo

I think in the can_use function you put G.GAME.in_blind
Or something like that

tall wharf
#

:3

thorn furnace
#

:3

wintry solar
#

I think it’d be better implemented in the mod list (aiko’s super sleek version when it’s not super laggy) where there are update buttons on the mods with updates, restarting on leaving the menu, and then an update all button somewhere

#

Granted, that’s not the easiest ui work

thorn furnace
#

Meowww aikoo can u help me with my ui stuffsss

wild pine
# obtuse silo

Enable some boolean value when the context is setting_blind and disable it when the context is end_of_round?

tall wharf
#

i am stupid i can;'t ui

faint yacht
zealous glen
#

I told them to check Luchador

thorn furnace
thorn furnace
obtuse silo
#

G.GAME_blind is what VanillaRemade uses when Luchador checks

thorn furnace
obtuse silo
#

it also checks if the blind is a boss blind and if the blind has already been disabled, which aren't necessary for what i'm doing

pure salmon
#

how do i check if a card has a seal

thorn furnace
pure salmon
#

ah

hidden sable
#

i copied the code from the vremade gros michel and i wanna modify it so instead of deleting the joker it debuffs it for 3 rounds then enables it again

#

how do i change whether a card is debuffed or not

subtle merlin
#

works!

#

ty all :3

obtuse silo
#

neat
thanks!

feral tree
#

what's the easiest way to recreate ceremonial dagger's destroy joker effect?

feral tree
tall wharf
#

im copying code

zealous glen
#

vibecodikoyori

subtle merlin
#

"What is coding if not ctrl c + v?"

feral tree
#

thx

faint yacht
wintry solar
faint yacht
#

Just to try and be more in-line with vanilla editions having get_weight? Also, for the negative hook, this would be it, ya?

local negweightref = G.P_CENTERS['e_negative'].get_weight
G.P_CENTERS['e_negative'].get_weight = function(self)
  -- do stuff
  return negweightref(self)
end
wintry solar
#

get_weight is only used to modify the rate last the default rate of the game, for example in editions there’s a 4% chance for them to spawn, but the function increases that for the three editions when you have the vouchers to 8% and 16%

faint yacht
#

...fair enough.

#

-# I've yet to even make a custom edition, shaders are a bit much for me-

sturdy monolith
wintry solar
#

But it’s for modifications to the weight past the default

hidden sable
#

and by card i mean joker card

thorn furnace
sturdy monolith
#

well, it doesn't have a subfolder containing the mod at least

thorn furnace
sturdy monolith
thorn furnace
#

Same thing I suppose

#

Hmm

sturdy monolith
#

lemme at least try deleting it or setting it to nil

thorn furnace
#

Oki

sturdy monolith
#

nope, same thing

thorn furnace
#

Huh

#

Hmm

#

Trying to think what would cause the new directory

normal dune
#

someone can help me? i am doing a mod and when i go into the game the text dont apper the number just says "nil"

thorn furnace
broken cliff
#

(as in scalable numbers and etc)

formal parrot
#

How can i make a joker creates another specific one and self destruct?

thorn furnace
#

Hm
What does the new folder look like
Like what's it called

sturdy monolith
#

sorry about the picture, discord greyscreens on my laptop when i use my hotspot for some reason

sturdy monolith
#

insolence-balatro-2.0.2

thorn furnace
#

Oh that

broken cliff
#

@normal dune Heres an example on how to use loc_vars(put it in your joker)

loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.mult} }
    end,

then you can put #1# to put it in your loc_txt to make it render there

normal dune
#

i do that

#

i think

broken cliff
#

in this example, it puts the mult of the card into a loc_vars

formal parrot
#

Deep i need help 😭

normal dune
#

i found my error thx to help me

broken cliff
granite nymph
#

so uhh i was playing yahimod and died to the horse blind

#

how do i fix this

broken cliff
#

please do not be an ui error

formal parrot
sturdy monolith
#

true_subpath

thorn furnace
#

true_subpath should grab the subdirectory to extract from

broken cliff
#

for self-destruction uhm

tall wharf
#

SMODS.add_card :

broken cliff
#

this is better

sturdy monolith
formal parrot
#

Wait let me check the wili

#

Wili

#

FUCK

sturdy monolith
#

wili

thorn furnace
# sturdy monolith it's the only pattern i could find that matched `repo_name-tag_name` though

Yea it goes to uhh

if is_windows then
		os.execute(('if exist "%s" rmdir /S /Q "%s"'):format(tmp_dir, tmp_dir))
		os.execute(('if exist "%s" rmdir /S /Q "%s"'):format(out_dir, out_dir))
		ok1 = os.execute(string.format('powershell -NoProfile -Command "Expand-Archive -LiteralPath %q -DestinationPath %q -Force"', zip_path, tmp_dir))
		
		local subfolder = get_subdir(tmp_dir)
		if subfolder then
			local src_path = subpath and tmp_dir .. "\\" .. subfolder .. "\\" .. subpath or tmp_dir .. "\\" .. subfolder
			ok2 = os.execute(string.format('powershell -NoProfile -Command "Move-Item -Path %q -Destination %q -Force"', src_path, out_dir))
		else 
			ok2 = false
		end
		
		ok3 = os.execute(string.format('rmdir /S /Q "%s"', tmp_dir))
	end
broken cliff
thorn furnace
#

Come to think of it it's not actually used

#

Hold on

#

I shouldn't have stepped away from my computer SALADWENTBAD

fierce frost
#

im trying to make a joker that's just jimbo but with chips but im terrible at coding and it's causing a crash

#

im not sure if i'd be allowed to send the mod just to show the crash or what

thorn furnace
fierce frost
#

more just as a test joker and so i can try to figure out how to do this

sturdy monolith
#

I'm testing out a fix i made rq
I'll open a PR if it works

thorn furnace
#

Oh you know what happened

#

I forgot to rename the folder if there's no subfolder

broken cliff
hidden sable
#

how do i debuff jokers and detect if they are debuffed, and how do i detect when a boss blind is defeated

broken cliff
#

card.ability.extra.chips is the amount of chisp u want to add

thorn furnace
#

If there's a subfolder you don't have to worry about that so I forgot about it

#

It took me that long to realize it SALADWENTBAD

#

When I get home I'll fix that in a quick patch

thorn furnace
#

O

sturdy monolith
#

and it did not in fact work 💔

sturdy monolith
hidden sable
thorn furnace
hidden sable
feral tree
#

if context.end_of_round and (G.GAME.blind:get_type() == 'Boss') then?

sturdy monolith
fierce frost
#

apparently this line is causing my joker to crash the game when i enter a blind
if card.debuff then return nil end (i dont know how to format it to be in the funny box, so it's in apostrophies)

hidden sable
sturdy monolith
#

also don't return nil

broken cliff
#

js dont return it

fierce frost
#

but how would i not return it

broken cliff
#

return in the case of jokers is used to send back the information like
message to put onto the card
xmult, mult, chips
card

sturdy monolith
broken cliff
#

and you would want to put that into a table(dictionary)

fierce frost
daring fern
formal parrot
#

Can context.destroy_card self destruct a joker ?

sturdy monolith
fierce frost
#

ah

daring fern
#

Not returning and returning nil are the same.

fierce frost
#

so just then end

broken cliff
sturdy monolith
#

or return an empty table if you really want

broken cliff
#

except you are feeding info to joker handler

sturdy monolith
daring fern
sturdy monolith
hidden sable
#

what is context.joker_main is it after all cards are scored?

sturdy monolith
hidden sable
daring fern
daring fern
sturdy monolith
fierce frost
#

ok so i got into the blind but it's not giving the +4 chips

#

`SMODS.Joker{
key = "evil_jimbo",
config = { extra = { chips = 8, chip_mod = 2 } },
pos = { x = 0, y = 0 },
rarity = 1,
cost = 1,
blueprint_compat=true,
eternal_compat=true,
unlocked = true,
discovered = true,
effect={
extra = {
chips = 4
},
},
soul_pos=nil,
atlas = 'evil_jimbo',

calculate = function(self,context)                   
    if context.joker_main and context.cardarea == G.jokers and context.scoring_name then
        return {
            chip_mod = card.ability.extra.chips,
            colour = G.C.CHIPS
            }
    end
end,

loc_vars = function(self, info_queue, card)                             
    return { vars = { card.ability.extra.chips, card.ability.extra.chip_mod }, key = self.key }
end

}`

pulsar furnace
#

Can someone tell me what G.ROOM.T is?

sturdy monolith
daring fern
fierce frost
#

not sure

sturdy monolith
daring fern
fierce frost
#

im stupid and not quite sure how to use this so i've kinda just been cobbling together parts from an example mod i found

fierce frost
daring fern
sturdy monolith
#

they also don't return a message which makes it so that it doesn't actually show the "+10" pop-up

sturdy monolith
fierce frost
#

it is still not adding the chips

sturdy monolith
#

at least not if you don't compare it to something

fierce frost
pulsar furnace
#

Is it possible to add a CardArea to a CardArea?

sturdy monolith
# fierce frost i removed that part already, how would i return a message?
SMODS.Joker{
    key = "evil_jimbo",                                 
    config = { extra = { chips = 8, chip_mod = 2 } },   
    pos = { x = 0, y = 0 },                              
    rarity = 1,                                          
    cost = 1,                                            
    blueprint_compat=true,                               
    eternal_compat=true,                                 
    unlocked = true,                                     
    discovered = true,                                   
    effect={
        extra = {
            chips = 4
        },
    },                                          
    soul_pos=nil,                                       
    atlas = 'evil_jimbo',                                

    calculate = function(self,context)                   
        if context.joker_main and context.cardarea == G.jokers then
            return {
                chip_mod = card.ability.extra.chips,
                colour = G.C.CHIPS,
                message = "your message"
                }
        end
    end,

    loc_vars = function(self, info_queue, card)                             
        return { vars = { card.ability.extra.chips, card.ability.extra.chip_mod }, key = self.key }
    end
}
sturdy monolith
fierce frost
#

also is there a way to easily reload the mods without restarting the game?

sturdy monolith
#

it restarts the game but it takes a lot less steps

sturdy monolith
sturdy monolith
vague crest
#

hellooo I am trying to get a joker working that retriggers cards if you play small hands, and I have the retrigger part working perfectly without a criteria BUT if i add the stipulation that exists in half joker it shows up as nil everywhere but in the collection, and playing a hand crashes the game because it attempts to compare a number with nil. does anyone know a fix?

fierce frost
vague crest
#

i think i understand what most of the code is doing here its starting to click im starting to get how the contexts and all that work but this bug is eluding me

sturdy monolith
#

not in the code

#

merging 2 and 2 is the same as adding 2 and 2

vague crest
#

woah the screenshot was not even close to useful what happened there

#

weirdest thing is that it does show up fine in the collection just not in game

sturdy monolith
fierce frost
#

i've added the message and it never shows up
calculate = function(self,context) if context.joker_main and context.cardarea == G.jokers then return { chips = card.ability.extra.chips, colour = G.C.CHIPS, message = 'GRR i am evil jimbo' } end end,

sturdy monolith
# sturdy monolith it is

please for the love of God just ask if you're confused i can't clarify something if i don't know what i need to clarify. a question mark emoji doesn't tell me anything

#

this better?

#

it's called the beta deck in the code

pulsar furnace
# daring fern No.

how could i add a ui in collections that is like
( ▯ = deck )

▯ ▯ ▯
▯ ▯ ▯

sturdy monolith
pulsar furnace
#

i tried but its only one column

sturdy monolith
hidden sable
#

when i debuff a joker card it auto undebuffs after the blind is over, any way to disable this behavior?

scenic steeple
#

so something here is wrong I don't know, I'm trying to get the current joker (Alt) to evolve into another joker (Devotion) once 1/4 of the deck are wild cards, it's evolving but not automatically, how can I make it happen right away?

hidden sable
daring fern
hidden sable
#

...

#

i dont think ima do allat

scenic steeple
#

bruh

daring fern
hidden sable
#

is there a way to save a bool value on the card

hidden sable
sturdy monolith
hidden sable
tribal kestrel
#
SMODS.ObjectType ({
  key = 'type_areas',
  cards = {
    ["ave_area_uncommon"] = true,
    ["area_common"] = true,
    ["j_area_rare"] = true,
    ["j_ave_area_legendary"] = true
  }
})

c1_1 = SMODS.create_card({set = "type_areas"})

Am I missing something? I figured at least one of them would show up but it's not, just showing a default joker

tribal kestrel
#

no those are joker keys

#

they're all different because I'm trying to see what works haha

daring fern
tribal kestrel
#

the bottom 2 aren't showing up either though

#

I think only the bottom one has the correct key

vague crest
#

is there a big database somewhere of all the joker functions? so i dont have to look for like another mod that draws cards face down for example

tight notch
#

how would i make this check if it's been played before scoring or something? because when testing it gives the mult for every card because we just played it

umbral zodiac
daring fern
tight notch
sturdy monolith
#

there's no way you just saw a screenshot of a cryptid mod developer explicitly saying that the deck merges the 2 cardareas and just said "no it's not merging it's replacing"

daring fern
tight notch
#

ty

vale glen
#

Hm... By one definition, merging the two Cardareas would mean referring to the same CardArea by G.jokers and by G.consumeables, while by another definition it's just setting one area to nil and putting relevant cards in the other area. Hrm.

#

What if you play a booster pack like a playing card A_HuTaoDerp

#

Merge the shop area and the playing card deck

daring fern
vale glen
#

Awh

sturdy monolith
vale glen
#

Ooh

sturdy monolith
#

but with consumable playing cards

#

instead of booster packs

#

by making one cardareas card type compatible with those of another and making both of those areas hold each others card type you have, by definition, merged them

vale glen
#

Was thinking of, like, buying a booster pack not opening it, but just adding it to deck like a playing card. Then having the properties of every card that would normally be in it, but as a playable card.

vale glen
sturdy monolith
vale glen
#

How yay

daring fern
sturdy monolith
#

it lets you play consumables as playing cards as well as letting you use the effects of the consumable half of the card from the deck

daring fern
snow vale
#

i think it's time to organise my mod

iron orchid
#

feel free to @ me if you figure anything out

tight notch
daring fern
tight notch
iron orchid
#

its for slay the jokers

#

I am trying to get it working for any version of proton

#

so any casual linux user can use it