#💻・modding-dev

1 messages · Page 380 of 1

red flower
#

install Handy :3

vast night
#

no difference except the box is msmaller now

#

and while I'm at it

#

how do i add rounding

#

to the big container

#
get_user_sprite = function(xpos, ypos)
    xpos = xpos or 0
    ypos = ypos or 0
    return Sprite(0,0,1,1,G.ASSET_ATLAS["reddit_usertags"], {x=xpos, y=ypos})
end

get_user_row = function(user, contributions, xspos, yspos)
    return { n = G.UIT.R, config = {}, nodes = {
        { n = G.UIT.O, config = { object = get_user_sprite(xspos, yspos) }},
        { n = G.UIT.R, config = { padding = 0.2, rounding = 1 }, nodes = {
            { n = G.UIT.T, config = { text = user, scale = 0.3, colour = G.C.UI.TEXT_LIGHT} },
            { n = G.UIT.T, config = { text = table.concat(contributions, ", "), scale = 0.2, colour = G.C.UI.TEXT_LIGHT} }
        }}
    }}
end

SMODS.current_mod.extra_tabs = function()
    return {
        {
            label = 'Credits',
            tab_definition_function = function()
                return {n = G.UIT.ROOT, config = {
                    -- config values here, see 'Building a UI' page
                }, nodes = {
                    { n = G.UIT.C, config = { padding = .3, rounding = 1 }, nodes = {
                        get_user_row('u/ItsGraphax', {"Mod Developer"}, 0, 0),
                        get_user_row('u/TSAMarioYTReddit', {"Feelin' Lucky"}, 1, 0)
                    }
                }
                }}
            end,
        },
        -- insert more tables with the same structure here
    }
end

red flower
vast night
#

whole code

vast night
red flower
primal robin
#

btw r, not rounding

vast night
vast night
primal robin
#

...nope?

#

Is it added by steamodded?

red flower
#

no it's r

primal robin
#

Always was r

long sun
#

hiya, one more question ^^

#

what pitch does the game's music play at?

#

like, in the code

vast night
# red flower they need to be in separate row nodes

like this?

get_user_row = function(user, contributions, xspos, yspos)
    return { n = G.UIT.R, config = { rounding = .1 }, nodes = {
        { n = G.UIT.O, config = { object = get_user_sprite(xspos, yspos) }},
        { n = G.UIT.R, config = { }, nodes = {
            { n = G.UIT.T, config = { text = user, scale = 0.3, colour = G.C.UI.TEXT_LIGHT} }
        },
        { n = G.UIT.R, config = { }, nodes = {
            { n = G.UIT.T, config = { text = table.concat(contributions, ", "), scale = 0.2, colour = G.C.UI.TEXT_LIGHT} }
        }}
    }}}
end
daring fern
long sun
#

grand, so pitch = 0.7?

#

will give that a go ^^ thanks

open forum
#

Is in_pool mandatory
Or is it already assumed it won't spawn a second time proceeding purchasing a given joker (without showman)

daring fern
long sun
#

oh icicicic! neat!

vast night
#

idk

#

am i so dumb

red flower
#

i needs to be

C = {
    R = {
       T
    },
    R = {
       T
    }
}
sturdy compass
vast night
#

oh ok

clear yoke
#

how can i make my joker show up ingame

primal robin
clear yoke
sturdy compass
#

Consult the docs

clear yoke
#

straight up Clueless

primal robin
clear yoke
#

im on the SMODS.Joker page

#

just dont know what to do from here

#

i also have this

primal robin
#

looks good excepf ot missing an atlas

sturdy compass
#

Doesn’t need one by default

primal robin
#

hm, okay

long sun
#

okay sorryyyyyy one more questionnnnnn

turbid maple
#

Calling SMODS.Joker will register the Joker thats a function

sturdy compass
long sun
#

currently, my booster packs allow the player to select a Zodiac card, even if their consumable slots are full

primal robin
sturdy compass
#

You need one lol

clear yoke
primal robin
#

It's easy, just one json

long sun
#

i tried adding can_use to all the Zodiacs, only returning true if there were available slots, but to no avail

primal robin
#

okay, and?

long sun
#

is there a fix, or is this an issue with SMODS?

clear yoke
# sturdy compass You need one lol

well i mean i made

{
    "id": "blu",
    "name": "BluMod",
    "display_name": "Blu",
    "author": [
        "TheBlueVolcano"
    ],
    "description": "'born to :3 forced to lock in' - Tsun Szu",
    "prefix": "blu",
    "main_file": "main.lua",
    "priority": 0,
    "badge_colour": "#349beb",
    "badge_text_colour": "FFFFFF",
    "version": "1.0",
    "dependencies": [
        "Lovely (>=0.7)",
        "Balatro (>=1.0.1o)"
    ]
}
long sun
#

(each of my packs has select_card = "consumeables" on it, btw)

turbid maple
#

and you see your mod loaded in the mods menu?

sturdy compass
clear yoke
sturdy compass
#

Bruh lol

primal robin
#

lovely 0.7.1 good one tho

turbid maple
#

well how would you mod balatro if youre missing balatro...

gaunt thistle
#

it's not a bad idea

sturdy compass
# clear yoke

Click on your mod and check if there’s an additions tab

gaunt thistle
#

I get what they're going for

turbid maple
#

okay and you loaded all that but your joker isnt showing up?

clear yoke
#

well i dont know where to look

primal robin
#

In collection

turbid maple
#

collections

primal robin
#

Should be last one

clear yoke
primal robin
#

Nope

clear yoke
turbid maple
#

uhhh

clear yoke
turbid maple
#

your joker definition isnt in some other file.. right?

primal robin
#

Are you actually loading a file with joker?

sturdy compass
#

What does your mod’s file structure look like?

clear yoke
turbid maple
#

oh

primal robin
#

main.lua please

turbid maple
#

its in Joker.lua

sturdy compass
#

Ah that’ll do it

turbid maple
#

youre not actually lpading that file

sturdy compass
#

Joker.lua isn’t being loaded

turbid maple
#

you told the mod loader to load main.lua

clear yoke
sturdy compass
#

We all on the same wavelength lmfao

turbid maple
#

main.lua isnt loading Joker.lua

clear yoke
#

now what line would i use to load it

primal robin
#

Casual: why my css isn't working? Oh bummer, it's not imported

clear yoke
#

like a function orr

sturdy compass
#

Do assert(SMODS.load_file(‘items/Joker.lua’)) in your main.lua

clear yoke
sturdy compass
#

I forgort an apostrophe

primal robin
#

Looks good

clear yoke
#

oh cause your using the iphone '

sturdy compass
#

Yeah lol

clear yoke
#

pro tip

#

hold down on the '

sturdy compass
#

I know

#

I’m just lazy

open forum
#

Is Blueprint compat also assumed?

clear yoke
#

alt f5'ing now

primal robin
#

Who cares? Use what you like

sturdy compass
clear yoke
#

hate to break it

sturdy compass
#

The functionality is but blueprint_compat is false by default

primal robin
#

My IDE personally like "

red flower
#

you need to call the file function

sturdy compass
#

Forgot about that whoops

primal robin
#

ops

clear yoke
primal robin
#

We did it

turbid maple
#

you did it!!!

sturdy compass
#

Hello World!

turbid maple
#

I also recommend that you ger DebugPlus mod

slow brook
#

How can I disable all vanilla jokers and make it a checkmark in my mod config

red flower
#

i told u : (

slow brook
#

oh yeah i forgor sorry probably didnt understand anything at all aswell

clear yoke
#

oh yeah my fav joker " "

sturdy compass
#

Legendary

open forum
primal robin
#

"The "

open forum
#

Fun

red flower
sturdy compass
red flower
#

keep in mind blueprint_compat is just for the indicator it doesn't handle the actual compatibility

clear yoke
primal robin
#

This one is really easy

slow brook
slow brook
vast night
#

ok wtf is meant here

#

british spelling

red flower
#

colour

primal robin
#

consumeables

#

localization

open forum
#

Where'd I find the context for a chance trigger

#

context.post_trigger?

zealous glen
#

the wiki lists all vanilla and some SMODS contexts

red flower
clear yoke
#

how do i make the new joker follow the new locale file i made

zealous glen
#

@red flower hey N' how do I make a Joker that asks how N' is

red flower
#

are you having a stroke

red flower
sturdy compass
primal robin
#

Actually good page

zealous glen
vast night
red flower
#

colour

zealous glen
red flower
#

instead of color

red flower
vast night
zealous glen
analog spoke
#

how do I get this to not crash 😭 I'm trying to make a simple DNA+ style effect, but I just can't lmao

vast night
#

ok two questions:

  1. How do i remove some spacing there
  2. How do i add a scroll bar
get_user_row = function(user, contributions, xspos, yspos)
    return ui_row({ maxh = 0.1 }, {
        ui_object(get_user_sprite(xspos, yspos), { padding = .2 }),
        ui_column({ padding = .2, r = .2, minw = 7, colour = HEX("2c3269ff") }, {
            ui_row({}, {
                ui_text(user, 0.3, G.C.UI.TEXT_LIGHT, {})
            }),
            ui_row({}, {
                ui_text(table.concat(contributions, ", "), 0.2, G.C.UI.TEXT_LIGHT, {})
            })
        })
    })
end
zealous glen
vast night
red flower
#

scroll bars are hard do not recommended

vast night
#

ok how should i do it then

primal robin
#

I almost maded one btw

unborn bay
#

you'd have to ask ui gods if you want a scroll bar

#

like mr handy himself

#

there he is right now

analog spoke
zealous glen
#

🫵

primal robin
spice wadi
#

with help from john s mods himself i created the nested table system for returning the effects from my joker separately, but is there a better way of giving the effects like that? since im restructuring it to change one of the values after a certain number of triggers, i want to be able to change that while the effects are applying but idk if thats easily possible with nested return tables

zealous glen
#

I don't think that's easily possible with or without nested return tables

vast night
#

nvm

#

ill just scrape that

#

they are crediited under the joker anyways

analog spoke
# analog spoke

the effect I want is a simple "if hand contains exactly 2 cards, create a copy of both of them" you know, like 2 dnas taped together, lmao

red flower
spice wadi
#

i can but i was wondering if there was a better method that would avoid that

#

but oh well

red flower
#

nope

spice wadi
#

time to torture my code

analog spoke
placid star
#

i dont want to use a global variable from fear of interefence with deuplicate jokers but is there a way to have a card unique variable determine an atlas?

open forum
#

Damn I thought there was Chance trigger jokers

red flower
analog spoke
red flower
#

you should share the logs

daring fern
analog spoke
placid star
red flower
daring fern
placid star
analog spoke
#

if not, it's strange this is it's only occurance

#

anyway, I'm going to my room to cry, as I've just realized my gf broke up with me

red flower
olive barn
#

thats rough buddy

primal robin
clear yoke
#

how do i make a card use a custom font i uploaded (i have the Language.lua file and the .ttf in my MOD/assets/fonts dir)

primal robin
#

Fonts support added recently (or not)

red flower
clear yoke
primal robin
#

No font for now

clear yoke
zealous glen
clear yoke
#

how do i make the joker come pre-unlocked

daring fern
clear yoke
#
    cost = 1,
    config = { extra = { chips = 10, h_size = 0 }, }, unlocked = true, discovered = true,
    loc_vars = function(self, info_queue, card)
```?
sleek cliff
clear yoke
#

what resolution should i make my atlas

primal robin
#

Every card is 71x95, 2x is 142x90

glass scaffold
#

Unless you're me, in which you make it 710 x 950 because you don't wanna lose the details.

zealous glen
glass scaffold
#

-# Please stay with 71 x 95. It's so much easier.

zealous glen
#

so usually Jokers use 69x93

unborn bay
#

what fucking detail

#

😭

#

are you trying to make your cards 1 billion ounts hd????

zealous glen
unborn bay
#

this is a pixel art game

zealous glen
#

like those Spongebob scenes

glass scaffold
primal robin
#

4k balatro gaming?

glass scaffold
spice wadi
#

i have this setup currently where it triggers repeatedly, subtracting a dollar each time
every 5 triggers, it increases the price (which does work), but in the same hand it doesnt take the increased price into account, is that a quirk with the way calculations work or am i doing smth wrong

#

would it be better to just make a copy of the table with the increased price in the loop actually

red flower
#

yes, once you return the value it's fixed

clear yoke
#

balatro mod devs jamming out to the menu theme:

spice wadi
#

im losing my mind

red flower
#

i have balatro muted :3

sturdy compass
primal robin
#

While i'm restarting game a bunch of times, i just open balatro ost on youtube

#

Really like shop theme, I'm like really in shop

sleek cliff
#

ok, so how should I set the judgment-like tarot to only create a certain type of joker

clear yoke
#

how can i change the menu music

#

and menu bg shader

#

(im looking through cryptid's implementation and cant find anything)

zealous glen
#

except people who have issues with repetitive music

red flower
zinc forum
#

Flip flopping between game music and my own

zealous glen
#

anyways N' do you know how I could make localization that only loads if you have a setting in your config checked

clear yoke
#

i usually play with music off and just play whatever if the music gets repetitive

clear yoke
spice wadi
#

out of spite

primal robin
clear yoke
short girder
#

so i have the context set up
but how would i turn a playing card's number to another (ex: turn all aces into 5s, yadayada)

wild escarp
#

Would it be possible to make a voucher that doubles the likelyhood of getting wheel of fortune from arcana and shops, and one that gives wheel of fortune the ability to give negative edition?

zinc forum
primal robin
#

If you want to change background shader, you need override current one

zinc forum
#

In your case it should be as simple as adding ```lua

select_music_track = function()
    return G.STAGE == G.STAGES.MAIN_MENU
end,```
#

To your SMODS.Sound()

primal robin
#

And also syncing if needed

zinc forum
#

Anyways does anyone know if I can ban the small and big blinds in challenges

#

Or rather if I can do it in the challenge declaration or if I need to patch some code

red flower
sleek cliff
wild escarp
clear yoke
primal robin
#

path =

clear yoke
#

-# where...

primal robin
#

no wiki page for smods.sound wtf

sleek cliff
#

also, for some reason the tarot I just made is still making the Fool tarot

red flower
zinc forum
#
SMODS.Sound({
    key = "your_song",
    path = "your_song.ogg",
    select_music_track = function()
        return G.STAGE == G.STAGES.MAIN_MENU
    end,
})```
#

Should do the job

red flower
primal robin
#

I'm just blind

wild escarp
short girder
primal robin
#

bummer

clear yoke
#

didnt someone say balatro auto-pitches the music down to 70%

#

can i just pitch my ogg file up to 130% then

#

to counter it

primal robin
#

Just set pitch = 1

zinc forum
clear yoke
#

if this works im going to be steamHappy

#

oh my god

#

im

zinc forum
#

I did not realize I could justuse the pitch x)

primal robin
unborn bay
clear yoke
zinc forum
#

Question becomes does it sync now

primal robin
#

Guys

#

98%

#

It syncs by default

zinc forum
#

Ok better question, does it desync over time x)

primal robin
#

If length is different then yes, I guess

sleek cliff
clear yoke
#

where is the cryptid menu shader m.fs?

placid star
#

whats the context to retrigger jokers? i have the feature on btw

sleek cliff
#

ohhh the table is a separate key oki

slate bison
#

im tring to set up a joker that cheks to see if the hand played has already been played this round, any help on how i can do that?

faint yacht
wanton badger
#

how are custom challenges coded? i wanna make a basic software that can custom make challenges

placid star
shut crater
faint yacht
clear yoke
#

im confused i wanna just recolor the balatro background and speed it up

clear yoke
#

i know cryptid does it

faint yacht
clear yoke
#

but how can i do it

sleek cliff
#

what do I put as the default in the ObjectType

primal robin
#

You need pass variables related to speed and color to shader

faint yacht
red flower
sleek cliff
#

ohhh

#

oki

clear yoke
primal robin
#

Yes

clear yoke
#

oh peak

#

ill look for the docs then

red flower
clear yoke
#

i didnt realize lol

#

wait where @red flower

red flower
clear yoke
#
        G.SPLASH_BACK:define_draw_steps({
            {
                shader = "splash",
                send = {
                    { name = "time",       ref_table = G.TIMERS, ref_value = "REAL_SHADER" },
                    { name = "vort_speed", val = 0.4 },
                    { name = "colour_1",   ref_table = G.C.JOY,  ref_value = "EFFECT" },
                    { name = "colour_2",   ref_table = G.C,      ref_value = "BLACK" },
                },
            },
        })
```?
red flower
#

yes

clear yoke
#

W thx

red flower
#

you need to do it in a hook

#

after SPLASH_BACK is created

clear yoke
#

explain this to me like im an idiot

sleek cliff
#

Ok, the TARDIS IS working, but ONLY creating Jimbos

red flower
clear yoke
#

mmhm and where would i add that hook in my code

primal robin
#

Anywhere

placid star
#

bruh is this balanced?

sturdy compass
#

no LOL

primal robin
#

Like no

sleek cliff
placid star
#

bruh

primal robin
#

Even for legendary too powerful

clear yoke
placid star
#

what abt 0.05X increase?

clear yoke
clear yoke
slate bison
#

ok im still confused how do i check if a hand has already been played in the current round?

placid star
sleek cliff
#

idk if 0.001, id say 0.02X

primal robin
# clear yoke and how do i make a hook
local game_main_menu_ref = Game.main_menu
function Game:main_menu(...)
  local result = game_main_menu_ref(self, ...)
  -- Your code here
  return result
end
#

Basically it's extending a functions

#

But for some reason everyone call it hook

#

Don't like this name personally

sturdy compass
#

Something to keep in mind with Lua is everything is a variable, including functions

primal robin
#

If you're JS dev nothing new

sturdy compass
#

So by that logic, you can make function definitions hold different code on the fly

primal robin
#

With exception of missing basically any useful function for common actions

sleek cliff
clear yoke
#

so @red flower im looking at your example, how would i change the menu colors

#

or anyone else who can help for that matter

sturdy compass
#

This is within a Game.main_menu() hook

red flower
#

if you want a custom color you need to define it somewhere

clear yoke
red flower
#

no

sturdy compass
#

hex values won't do you any good here

clear yoke
#

wait does it go off decimal

red flower
#

it needs to be a defined color in G.C

clear yoke
red flower
#

(or any other table)

rain atlas
#

forwarding this since it seems to be a broader issue, people are saying this is a highest priestess crash

red flower
#

you can do G.C.colorname = HEX("FF0000") just before

clear yoke
#
        G.C.colorname = HEX("FF0000")
        self.title_top:emplace(newcard)
        self.title_top:align_cards()
        G.SPLASH_BACK:define_draw_steps({
            {
                shader = "splash",
                send = {
                    { name = "time",       ref_table = G.TIMERS, ref_value = "REAL_SHADER" },
                    { name = "vort_speed", val = 300 },
                    { name = "colour_1",   ref_table = G.C,  ref_value = G.C.colorname },
                    { name = "colour_2",   ref_table = G.C,      ref_value = G.C.colorname },
                },
            },
        })

``` im missing something arent i
wanton badger
#

i made a deck thats just all jokers

#

wait wrong channel

red flower
sturdy compass
#

lol

primal robin
#

Isnt this thing should be set every frame?

clear yoke
#

yeah it uhh

#

still

#

blue and red

red flower
sturdy compass
clear yoke
#

you know what

#

it might help

#

if i assert

#

the file

sturdy compass
#

lol

#

get used to it, you're gonna have to do that a lot

clear yoke
#

dont mind what i named the file

#

but uhh

#

gulp

red flower
#

it's telling you to play my mod

sturdy compass
#

play JoyousSpring

primal robin
red flower
#

you're probably copying something you shouldn't

clear yoke
#

yeah i just got rid of some stuff

#

maybe too much

rain atlas
red flower
rain atlas
#

ctrl+C should copy to clipnote on crash menu

clear yoke
#
local game_main_menu_ref = Game.main_menu
function Game:main_menu(change_context)
        G.C.colorname = HEX("FF0000")
        G.SPLASH_BACK:define_draw_steps({
            {
                shader = "splash",
                send = {
                    { name = "time",       ref_table = G.TIMERS, ref_value = "REAL_SHADER" },
                    { name = "vort_speed", val = 300 },
                    { name = "colour_1",   ref_table = G.C,  ref_value = 'colorname' },
                    { name = "colour_2",   ref_table = G.C,      ref_value = 'colorname' },
                },
            },
        })
end
sturdy compass
#

You're not running your main menu ref

red flower
#

i said screenshot because reading code on mobile is a pain

sturdy compass
#

put a game_main_menu_ref(self, change_context) above where you're making your color

clear yoke
#

OH NO IT WORKED

#

OH GOD I MADE BALATRO HELL EDITION

sturdy compass
#

SPEEN

hot granite
#

soon™️

clear yoke
#

GAY BOSS BLIND Clueless

turbid maple
#

you cannot comprehend the true form of jimbo..

sturdy compass
#

This might be Giygas

sleek cliff
sleek cliff
placid star
hot granite
placid star
hot granite
#

it's like a wall blind

bleak crane
#

how would i check if a arcana pack is skipped using a joker

placid star
bleak crane
placid star
wheat jewel
#

trying to make a specific numbered card get destroyed but it doesn't happen in my code atm, does anyone have any pointers on what to fix?

sleek cliff
#

anyways, I need help because this is just printing a base Jimbo instead of the ones I want it to

placid star
bleak crane
clear yoke
bleak crane
#

would card = self be what i change?

wheat jewel
red flower
placid star
primal robin
#

He did the balatro shader thing

red flower
#

there should be a mod that combines all title screen colors that you have into one

placid star
red flower
placid star
red flower
#

you need to check if context.destroy_card is the card you want to destroy

bleak crane
sleek cliff
bleak crane
placid star
wheat jewel
placid star
#

2 secs

placid star
placid star
red flower
sleek cliff
placid star
wheat jewel
sleek cliff
#

could it be the quotations??? no way tho

placid star
red flower
red flower
sleek cliff
red flower
red flower
placid star
wheat jewel
sleek cliff
wheat jewel
#

don't know if i'm doing it correclty or not

placid star
#

then when creating the key should be 'j_jmbowho_doc1'

clear yoke
#

went to change my joker atlas and uhm

bleak crane
#

so like this?

placid star
#

send the whole calculate func

wheat jewel
bleak crane
#

im confused on where to even start

red flower
#

but i havent read the whole code

sleek cliff
placid star
red flower
bleak crane
sleek cliff
placid star
placid star
# bleak crane

planet has its own text styling {C:planet} as does {C:tarot}

placid star
# bleak crane oh ok

give me a minute ill just write a calc function for you my head hurts too much

bleak crane
#

oh ok,

wheat jewel
red flower
sleek cliff
#

OK, TARDIS works now, gotta fix why it still uses the Fool texture and not the one I made

placid star
#
calculate = function(self,card,context)
  if context.skipping_booster then  
    if context.card.config.center.type == 'Arcana' then
      for i = 1, card.ability.extra.cards do
        SMODS.add_card({set = 'Planet'})
      end
    end
  end
end

then put cards = 2 in config = {extra = {}}

open forum
#

Wait for the atlas if you're doing one big one instead of indiviual
How do you fetch for pos = { x = 0, y = 0 } for a specific art etc etc

placid star
sleek cliff
#

the Tarot sized are X 63 and Y 93, or are they the same size as the jokers?

rapid stag
#

question, i just want to make sure i'm reading this right because i'm looking at this function definition feeling like i'm going insane, but if i make an SMODS.Edition with the property always_scores = true, this will trigger this condition on calculate, right? HeadtoTheFuckingWall

placid star
red flower
short girder
placid star
# short girder okay!!!

btw it to turn a card into a king of hearts for example it would be playing_card:set_base('H_K')

red flower
open forum
#

🧐 So if it's a 5x5 Atlas
witdth of 71 * 5
Height of 95 * 5 innit

#

Then double it for 2x

rapid stag
wheat jewel
#

getting crashes atm and it's at the line that checks for a 7 that brings an error

placid star
#

i fucken hate set_base()

red flower
#

yeah

sleek cliff
bleak crane
placid star
bleak crane
placid star
sleek cliff
placid star
wheat jewel
#

the joker no longer causes a crash but it isn't destroying the nine unfortunately

placid star
open forum
#

context.blueprint?

placid star
wheat jewel
open forum
#

What's it for

placid star
placid star
open forum
#

oh

wheat jewel
placid star
bleak crane
bleak crane
#

ok sick

placid star
#

i think

#

if thats the type for planet packs then yeahj

wheat jewel
wheat jewel
#

cuz thats how i did it

#

to check for a nine and seven

placid star
#

i dont want to scroll up

wheat jewel
open forum
#

not context.blueprint is checking if the original joker is trigered?

short girder
#

would this work (i assume not)

open forum
#

anyways

wheat jewel
bleak crane
placid star
#

so make it i

bleak crane
#

i thought itd go in the config table but that just crashes the game

placid star
bleak crane
#

oh

#

OH YEAH sorry im tired

placid star
wheat jewel
#

did it

placid star
#

then in the if change hasNine == true to hasNine ~= nil or wtv the original value is

gilded narwhal
#

^

wheat jewel
placid star
gilded narwhal
#

Like the and not retrigger_joker

#

I want a joker that retriggers itself

placid star
#

then remove the not context.retrigger_joker

#

i think

wheat jewel
#

now i gotta make the build up for mult work properly

short girder
placid star
#

just do if context... SMODS.change_base

short girder
#

okay!!!

short girder
placid star
gilded narwhal
short girder
placid star
#

local suit = playing_card.base.suit

placid star
#

i think its coded so that it cant retrigger itself

gilded narwhal
#

Oh that's fun

#

Hold on

analog spoke
placid star
bleak crane
#
SMODS.Joker {
    key = 'observer',
    loc_txt = {
        name = 'The Observer',
        text = {
            "Create 2 random {C:planet}Planet",
            "{C:planet}Cards{} every time an {C:tarot}Arcana",
            "{C:tarot}Pack{} is skipped"
        }
    },
    config = {extra = { cards = 2 }},
    rarity = 1,
    atlas = 'kamisjokers',
    pos = { x = 0, y = 1 },
    soul_pos = { x = 1, y = 1 },
    cost = 4,

    calculate = function(self,card,context)
        if context.skipping_booster then  
            if context.card.config.center.type == 'Arcana' then
                for i = 1, card.ability.extra.cards do
                    SMODS.add_card({set = 'Planet'})
                end
            end
        end
    end
}
short girder
analog spoke
placid star
bleak crane
short girder
#

oh yeah

#

uhm how would i do that if i wanna change all cards of a rank on the played hand

placid star
gilded narwhal
#

okay for some reason steamodded really doesn't want jokers to retrigger themselves

#

Is there a way to do it at all

placid star
#

patch smods

lucid owl
#

why is this custom color muted when added to G.ARGS.LOC_COLOURS? pic 2 is when in LOC_COLOURS, pic 3 is when set with a {V:1} color variable

placid star
#

or multiply it

bleak crane
#

not rly sure why its crashing then

placid star
lucid owl
placid star
#

doesnt check for card

red flower
bleak crane
lucid owl
red flower
#

not documented

placid star
#

there ya go

sleek cliff
#

idk why, but its still printing hte fool instead of this tarot

bleak crane
placid star
red flower
#

yes

sleek cliff
placid star
red flower
red flower
bleak crane
placid star
analog spoke
#

what is this pointing to, anyway?

placid star
red flower
wild escarp
#

Would there be a way to return +chips and +mult, then return +chips again and xmult if a certain chance is rolled?

sleek cliff
#

OH I FORGOT TO EVEN SET THE ATLAS LAMOO

red flower
wild escarp
#

This is what I have, but that does one or the other.

calculate = function(self, card, context)
    if context.joker_main then
        if pseudorandom('cyan') < (G.GAME.probabilities.normal or 1) / card.ability.extra.odds then
            return {
                chips = card.ability.extra.mega_chips,
                x_mult = card.ability.extra.mega_mult
            }
        end
        return {
            chips = card.ability.extra.chips,
            mult = card.ability.extra.mult
        }
    end
end
red flower
sleek cliff
#

there it is

red flower
analog spoke
placid star
#

put it in the for loop and do suit = v.base.suit

short girder
#

oh my lmao

bleak crane
# red flower ok, try context.booster.type
SMODS.Joker {
    key = 'observer',
    loc_txt = {
        name = 'The Observer',
        text = {
            "Create 2 random {C:planet}Planet",
            "{C:planet}Cards{} every time an {C:tarot}Arcana",
            "{C:tarot}Pack{} is skipped"
        }
    },
    config = {extra = { cards = 2 }},
    rarity = 1,
    atlas = 'kamisjokers',
    pos = { x = 0, y = 1 },
    soul_pos = { x = 1, y = 1 },
    cost = 4,

    calculate = function(self,card,context)
        if context.skipping_booster then  
            if  context.booster.type == 'Arcana' then
                for i = 1, card.ability.extra.cards do
                    SMODS.add_card({set = 'Planet'})
                end
            end
        end
    end
}

doesnt crash now, but it does nothing

short girder
#

it wouldnt

placid star
short girder
placid star
short girder
red flower
placid star
#

idk

#

lmao

red flower
short girder
#

ahhh

#

lets see

#

so like this?

bleak crane
red flower
red flower
short girder
red flower
short girder
#

cause like there's no errors now but its just... not doing anything

red flower
short girder
#

basically a rank version of midas mask but for specific cards

lucid owl
#

how can you check if a card is flipped?

#

as in, checking if it's face down

red flower
#

i think i was wrong with the rank key as well

red flower
analog spoke
# analog spoke 😭

does anyone have an alternate way of doing this then? lol, maybe it'd be better to, just, work with a fresh slate here, lol

#

for making a DNA copy which does it for when your hand contains exactly 2 cards, instead of 1

#

copying each individual played card

red flower
#

i would copy DNA again and then add the stuff for the second card step by step until it crashes

#

so you know what it is

analog spoke
#

mhh

#

well, I don't think it helps that I don't fully understand the base dna code, lol

#

I'm kinda just copying what seems nessecary lol

#

you know, I think I may have lost the art of asking stupid questions to gain more knowledge, lol, I'm still a noob a little here, I should be asking basic stuff from time to time

#

like, what is the purpose of this part? what is it doing?

red flower
#

no idea

#

:p

analog spoke
#

lmao

short girder
#

btw i somehow broke this joker's description and i have no idea how to fix it

red flower
#

remove the ,C:white

analog spoke
#

so it'd be {X:mult,C:white}

short girder
#

i didnt though

#

originally it was that

short girder
analog spoke
#

what does the "and" mean in that? it takes the playing card and creates an exact copy of it that is one higher and the value is set to both of them? I don't understand, lol, how it's, like, a number var and a table at once?

analog spoke
red flower
#

I'm guessing G.playing_card is the amount of playing cards, it's a number

#

and means that if G.playing_card exists then it adds 1

#

else it sets it to 1

#

but I've never seen it other than in DNA

analog spoke
analog spoke
red flower
analog spoke
analog spoke
red flower
#

maybe?

sleek cliff
#

now to make a whole new enhancement

analog spoke
# red flower maybe?

hehehe, so, I managed to make a dna joker which made 2 copies of one played card, now to make it work on each individually :3

analog spoke
# red flower maybe?

whuh 😭 ok, so, now, opposite issue, lmao
it is making TWO copies of each of the 2 cards

#

the math is not mathing to me

red flower
#

did you restart the run

analog spoke
#

omg... thank you 🤦‍♀️

#

most meaningless combo, lmao

analog spoke
wild escarp
#

Can someone help me with this joker code? It doesn't add chips after the hand is played, the sound plays when the hand is played, instead of when the cards are destroyed, and it double adds chip_gain to chips (hence the / 2).

config = { extra = { chip_gain = 20, chips = 0, addchips = false } },

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

calculate = function(self, card, context)
    if context.joker_main then
        local toDestroy = 0
        for i = 1, #context.scoring_hand do
            if context.scoring_hand[i]:get_id() < 9 then
                toDestroy  = toDestroy + 1
                card.ability.extra.chips = card.ability.extra.chips + toDestroy * card.ability.extra.chip_gain / 2
            end
        end
    end

    if context.destroy_card and context.cardarea == G.play and not context.blueprint then
        if context.destroy_card:get_id() < 9 then
            return
            {
                remove = true,
                play_sound('slice1', 0.96 + math.random() * 0.08),
                extra = card.ability.extra.addchips and {
                    chips = card.ability.extra.chip
                } or nil

            }
        end
    end
end
wheat jewel
#

how could i increase the mult by 1 per card scored in hand every time a card is triggered

shut crater
wild escarp
#

Yeah, I got that, just working through some other stuff.

shut crater
#

wait idk why I linked hiker I was thinking of runner

shut crater
glad osprey
#

how do i balance this to make it more worth grabbing

stark geode
#

does balatro have a list that keeps track of all the vouchers

fair gyro
glad osprey
#

what its going up against btw

shut crater
glad osprey
#

steal

shut crater
#

I would clarify that

fair gyro
#

okay but actually i'd get something like that if it allowed that hand to "keep up" with whatever im focusing on in the run
not like "level up least played hand by most played hand level lmao" keep up, but just so it's not completely useless

shut crater
#

so like a worse black hole

#

idk

#

set the level of your least-played hand equal to the level of your most-played hand

fair gyro
#

i mean hmm
how do you get these cards? just so i can gauge the rarity of 'em

glad osprey
#

plain packs

fair gyro
#

noted

glad osprey
#

they are semi common (i think idk how exactly the weights are scaled for packs lol)

fair gyro
#

i see i see 🙂‍↕️

shut crater
#

compared to a tarot or planet pack

glad osprey
#

rn they all cost 4 dollars bcus i forgot to set the price

#

but basic will prob cost 4 dollars

#

6 and 8 for the jumbo and mega

shut crater
#

so they cost the same as an arcana pack but have slightly worse effects?

glad osprey
#

no?

#

they are not tarot cards

fair gyro
#

honestly thinking about it just leveling up the least played hand by 3 like an unfortunate orbital tag

glad osprey
#

actually maybe 4 5 6 rather than 4 6 8

shut crater
shut crater
#

so by direct comparison they're objectively not as good as their equivalents

glad osprey
#

you are comparing apples to tomatoes

shut crater
#

but if the apples and tomatoes cost the same amount I'm going to pick the one I know is more useful

fair gyro
shut crater
#

I'm just trying to give balance advice because you asked for feedback

marble flint
glad osprey
#

about that one specific card

#

not the entire concept

shut crater
#

ok, my bad

marble flint
short girder
#

what variables check for blind required score and hand score

stark geode
marble flint
#

loop through that and put the keys in a table

glad osprey
#

ok now how do i level up hands

fair gyro
glad osprey
#

nevermind its level up hand

marble flint
#

something like

local vouchers = {}
for k in pairs(G.GAME.used_vouchers) do
    vouchers[#vouchers + 1] = k
end
marble flint
fair gyro
#

couple ways to get current hand score i think but i personally just did hand_chips * mult superdying

wheat jewel
#

idk how to say it properly

shut crater
wheat jewel
#

you increase by 1 mult per card and resets at the end of round

shut crater
#

(the method is the same just curious)

wheat jewel
#

after hand finishes scoring

shut crater
#

I would increase the mult variable of your joker by 1 in your if statement, and then reset it back to 1 in a separate context check

wheat jewel
#

first card gives +1 and 2nd gives +2, basically the mult adds per card by 1

wheat jewel
shut crater
#

and then in context.after you set card.ability.extra.mult = 1

glad osprey
wheat pulsar
#

hello, if i want to set the player hand to 1, how i need to do that¿

shut crater
wheat pulsar
rain atlas
# rain atlas

so i bothered to boot up balatro and my run is still there and it seems playing this hands is causing the crash

shut crater
#

oh no cause I changed the effect

#

that's just it

fair gyro
#

so um
how do you have something happen when the boss blind ability gets set off like matador?
tried to use the vanillaremade repo as reference (in addition to the actual vanilla matador and paperback's calling card) but nothing's going on

#

code looks like this rn

if context.debuffed_hand or context.joker_main then
    if G.GAME.blind.triggered and not context.blueprint then
        card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chip_gain
        return {
            message = 'Upgraded!',
            colour = G.C.CHIPS,
            card = card
        }
    end
end```
wheat pulsar
shut crater
wheat pulsar
#

yep, it works, ty!

short girder
#

say

#

(hand chips) > 2 * G.GAME.blind.chips

rain atlas
#

since i appearntly have a run that consistently crashes playing any hand, what file should i upload so that the devs can properly debug it? i assume it's one of these?

#

i.e. which file has the "last run that's still going"?

red flower
#

save iirc

#

but idk what cryptidsave is

fair gyro
short girder
#

basically but it'd be nice if i could save it in a local variable before round ends so i can use it in calc_dollar_bonus

glad osprey
#

how do i make a certain rarity more common

#

for a single round

red flower
rain atlas
#

blah i'll just upload the entire folder of the save, i'm still not really sure what mod is actually causing this issue, the crash says it's paperback but people are saying it's likely Highest Priestess

glad osprey
#

neato

short girder
# fair gyro hmhm i see, gimme a moment

my guess would be

    if context.after then
    local handchips = chips * mult
    end
end,
calc_dollar_bonus(self,card)
     if handchips > 2* G.GAME.blind.chips then
     return {
     10
     }
     end
end,```
red flower
#

lmao

shut crater
#

wait

#

jk that's two separate functions

red flower
#

you can return 10 in calc_dollar_bonus but not in a table

#

also the local is not going to work between the functions

shut crater
shut crater
#

which would be incompatible with specifically my mod lol

wheat jewel
#

i'm trying to have a joker increment its flat mult by 1 per card and gives it per card

short girder
wheat jewel
#

but i keep getting a large numebr that goes up nonstop until the end of round in the commented out code

red flower
#

(mult is mult tho)

short girder
wheat jewel
# shut crater yep

Added it but now the value is going up before scoring and not per card

glad osprey
#

how balanced is this

fair gyro
red flower
#

i mean that's the way to do it usually

#

before scoring finishes at least

wild escarp
#

Am I misunderstanding the use of sound? this doesn't play anything.

if context.destroy_card and context.cardarea == G.play and not context.blueprint then
    if context.destroy_card:get_id() < 9 then
        return { 
            remove = true,
            sound = 'slice1'
        }
    end
end
red flower
#

no

#

that looks fine

#

unless that's a sound you added

wild escarp
#

Nope, looking to play the dagger sound.

short girder
#

line 359 is the start of smods.joker btw which ends perfectly at line 400
line 388 is if context.after then btw

red flower
hallow forge
glad osprey
#

0.1 times

#

so max 25 uses

short girder
hallow forge
#

The language is unclear

fair gyro
red flower
ivory coral
#

hello chat, how do i get this code to work?? no matter what the enhancements dont change
the way ive done it looks silly i know but nothings working

local toenhance = SMODS.get_enhancements(G.hand.highlighted[#G.hand.highlighted])
local enhdfhg = toenhance[i][1]
G.hand.highlighted[i]:set_ability(G.P_CENTERS[enhdfhg])
shut crater
hallow forge
ivory coral
short girder
red flower
ivory coral
hallow forge
#

fine

red flower
ivory coral
ivory coral
# ivory coral okay wait its not calling the print at all let me get a bigger excerpt
local toenhance = SMODS.get_enhancements(G.hand.highlighted[#G.hand.highlighted])
...
for i=1, #G.hand.highlighted do
            G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.1,func = function()
                if toenhance then
                    for i = 1, #toenhance do
                        local enhdfhg = toenhance[1]
                        G.hand.highlighted[i]:set_ability(G.P_CENTERS[enhdfhg])
                    end
                else G.hand.highlighted[i]:set_ability(G.P_CENTERS.c_base, nil, true) end
                return true end }))
        end```
#

i tried printing enhdfhg after its defined and it doesnt run at all

short girder
#

it wants me to close around if

#

like right here

#

it has to be like another syntax error that isnt a parenthesis

red flower
short girder
#

oh my god LMAOO

red flower
#

pls get a good editor : )

wild escarp
#

Now I've got this, but the sound and message play when cards go down after scoring instead of when they're destroyed, how should I fix it?

if context.destroy_card and context.cardarea == G.play and not context.blueprint then
    if context.destroy_card:get_id() < 9 then
        return { 
            remove = true,
            sound = 'slice1',
            message = 'Card was slain by',
            colour = G.C.CHIPS
        }
    end
end
red flower
#

uhh that shouldn't happen probably

fair gyro
#

haven't messed too much with this kind of thing yet but i think you need G.E_MANAGER:add_event for this

#

..or not lol

red flower
short girder
#

yummers

ivory coral
short girder
#

looks like ill have to find another way

red flower
ivory coral
#

ah thats it then

red flower
#

[1] won't work either

ivory coral
#

is there a way to get an array of it

native zinc
#

make a local var equal {}

#

and put it inside

#

oh wait

shut crater
ivory coral
native zinc
#

yeah this is a pairs problem

short girder
#

wait a second i can steal cryptid code

ivory coral
red flower
red flower
red flower
native zinc
#

use pairs when counting size of table

#

ipairs is unsafe for that

ivory coral
wild escarp
#

using add_event is better, but it still plays once for each card destroyed, can I add something else to stop that?

if context.destroy_card and context.cardarea == G.play and not context.blueprint then
    if context.destroy_card:get_id() < 9 then
        return { 
            remove = true,
            G.E_MANAGER:add_event(Event({
                func = function()
                    card:juice_up(0.8, 0.8)
                    play_sound('slice1', 0.96 + math.random() * 0.08)
                    return true
                end
            }))
        }
    end
end
red flower
red flower
prime stone
#

Im using psuedoshuffle to reshuffle played cards into the deck but the played cards will only change placement when another card is played. Otherwise it's just at the bottom of the deck. Is there anyway I could circumvent this ```lua
if context.final_scoring_step then
G.E_MANAGER:add_event(Event({
func = function()
local hand_count = #G.play.cards

                for i = 1, hand_count do -- draw cards from deck
                    draw_card(G.discard, G.deck, i * 100 / hand_count, 'down', nil, nil,  0.08)
                end

                pseudoshuffle(G.deck.cards, pseudoseed('recycler'))

                return true
            end
        }))
    end
shut crater
ivory coral
red flower
#
blocking = false,
func = function()
...
#

blockable does the opposite

fair gyro
wheat jewel
#

when i try to trigger plus 1 mult that incremement by 1 per card for each triggered card, i keep having the mult value increase passively before playing a hand, how do i fix this?

red flower
#

can i see the entire code

#

it doesn't seem to be a problem there

wheat jewel
#

the joker desc isn't accurate to what i'm tryna do, i wann have each card add 1 mult to the joker and it carries to each card and resets at the end of round

#

however when using the joker the joker passively increases the mult to a large amount which is not intended

#

then resets to 1 like normal

#

ok i'm dumb it is working fine

#

idk what was causing issues earlier

#

but it isn't doing +2 first and instead doing +1 on the first card

red flower
#

because mult starts at 1

#

instead of 0

wheat jewel
#

ok

#

lemme try that

#

that makes it work as intended but it shows +0 mult in the joker description i gotta fix that

#

It now is working as intended ^^

placid star
#

does G.GAME.blind have a variable that indicates if its a finisher blind? e.g. Crimson heart, violet vessel and if not, is there a mod function in lua?

wooden nexus
#

Did SMODS 506a break atlases or something?

#

because i lost my art

glad osprey
#

did you save the file

ivory coral
#

im going completely insane
i have a savestate set up
everything should be identical
so WHY is it that when this code is run the tables it returns are ONLY SOMETIMES empty and other times correctly have stuff in them

    varrrr = k
    print(toenhance)
    print(k)
    print(v)
    print(varrrr)
end```
#

of course once i make a post about it it starts working consistently even though i havent even restarted the game or anything??

wooden nexus
glad osprey
wooden nexus
#

Yes

red flower
wooden nexus
glad osprey
#

nah i don't think you did actually

placid star
wooden nexus
#

Literally here

glad osprey
#

why is it just the default joker atlas

sleek cliff
wooden nexus
#

easier to hide art

#

oh.

#

I think i figured out my problem

placid star
ivory coral
wooden nexus
#

I see the issue

placid star
wooden nexus
wooden nexus
#

Would give away what the mod actually is (and I've been keeping that a secret for almost a month now)

red flower
#

you don't need to include the assets

#

just remove the atlas

wooden nexus
#

I do

placid star
wooden nexus
#

Listen

#

I said it's for aesthetic reasons

#

not changing it now after a month of having it like this