#💻・modding-dev

1 messages · Page 581 of 1

stiff locust
#

IT WORKED

#

THE BAR UPDATES

rocky plaza
#

gg

stiff locust
#

thank you a million

rocky plaza
#

yeah i thought i knew what i was doing

#

can i see it

stiff locust
#

you do

#

i might change the colours

#

I never tested it with inactive

#

it used to use red but it was hard on the eyes

#

inactive is a bit hard to see

#

wh-

#

okay i scared myself for a sec there i'm just an idiot ignore that

rocky plaza
stiff locust
#

i also need to align the other buttons but thatll take like 30 seconds

#

coming soon to a jokebox near you

rocky plaza
#

cyberpunk themed mod goes hard

stiff locust
#

its not a themed mod

rocky plaza
#

ah

stiff locust
#

I just had a cool idea to make this after I figured out the dark arts of UI

#

its going in jokebox with all my other experimental and wacky bullshit

rocky plaza
#

mhm

stiff locust
#

regardless thank you I can finally move on to the next joker

turbid tiger
#

Okay so, is_face() is what Canio uses for removed cards, how do I... call for if any playing card at all is removed?

#

I just realized how similar this Joker actually is to Canio, wow.

#

I'll worry about that later.

stiff locust
#

my code probably sucks buuut

#
if (context.cards_destroyed and (context.glass_shattered and #context.glass_shattered > 0))
            or (context.remove_playing_cards and (context.removed and #context.removed > 0)) then

this will do it

#

context.removed is a table containing all the destroyed cards

#

in case you need that

rocky plaza
turbid tiger
loud summit
#

why does my enhanced card display "error" as the card type?

stiff locust
#

it is so liberating to be done with the UI code finally

#

everything else is gonna be so easy compared to that

loud summit
#

nvm i forgot to set the name variable

turbid frigate
#

Can someone help me with my config menu? I managed to get it working, but due to me not really understanding config menus and blindly copying code I can't really figure out how to get these last few quirks worked out. (also should I send this in here or in another chat?)

Currently the config menu isn't center and the corners arn't rounded like other config menus that I've seen, is there an easy fix to this?

SMODS.current_mod.config_tab = function()
    return {
        n = G.UIT.ROOT,
        config = { align = "cm", padding = 0.1, colour = G.C.BLACK },
        nodes = {
            {
                n = G.UIT.R, config = { align = "cl", padding = 0 },
                nodes = {
                    { n = G.UIT.C, config = { align = "cl", padding = 0.05 },
                      nodes = {
                          create_toggle{
                              label = "Weston Mode",
                              active_colour = G.C.GREEN,
                              ref_table = CFG,
                              ref_value = "weston_mode"
                          }
                      }
                    },
                    { n = G.UIT.C, config = { align = "cl", padding = 0.05 },
                      nodes = {
                          { n = G.UIT.T, config = {
                              text = "Restart Required",
                              colour = G.C.UI.TEXT_LIGHT, scale = 0.4
                          }}
                      }
                    }
                }
            }
        }
    }
end```
rocky plaza
#

and also emboss = 0.05

#

by lowermost i mean the outermost table

#

idk

#

language is hard

vague crest
#

how would i add a joker to the shop when the shop is entered? specifically in this case any uncommon or rare that's negative

#

i know the base context of starting_shop but adding things to the shop independently of adding an extra actual shop slot is something I haven't messed with

turbid tiger
#

Ok, I figured out how to do it, I'm just a fool.

stiff locust
#

hey t while you're still here

turbid tiger
#

One more thing though - when this Joker procs when you remove a card, it's supposed to tell you how much it's value increased by, right? but it just says error?

#

return { message = localize { type = 'variable', key = 'chips', vars = { card.ability.extra.chips } } }

stiff locust
#

is there a way to pass func in a ui node and have it accept arguments

turbid tiger
#

am I writing this wrong??

stiff locust
#

I can trick the node into storing data for me

#

:)

rocky plaza
#

yeah fair

stiff locust
#

wait

#

that should be divided

#

not multiplied

#

glad i caught that

rocky plaza
#

or you could just store values in global tables and access them from the function

turbid tiger
stiff locust
#

no but I need this to be run in a specific situation

#

I want my buttons to turn red if you dont have enough vram for their hack

#

but they all have diff values for that

#

and the code that makes the buttons is a function so I'd need it to use a value passed inside the function for making the button

rocky plaza
# stiff locust

you are allowed to put things like
store_val = ....
in the config and it wont break
and the function can check if the child has this config field

stiff locust
#

well the function can't do that

rocky plaza
#

fair

stiff locust
#

I tried it and it gave me attempt to index a nil value

rocky plaza
#

but it has access to the children's config tables

#

hmmm

stiff locust
#

so im just gonna store it in padding

#

i wasnt using it for these buttons anyway

#

and I can just set the padding to 0 when i'm done checking it

#

im such a smart

ocean sinew
stiff locust
#

:(

#

my buttons change colour now

turbid frigate
stiff locust
#

and it worked on the first try and I didn't put the > symbol the wrong way around

vague crest
frosty rampart
#

i'm trying to do SMODS.calculate_effect and SMODS.score_card stuff from a sticker on a playing card. if i do it in context.main_scoring, the other cards are visually scored before the actual played card is scored, which is not what i want. but if i put the calculate_effect/score_card call in an event, it happens all the way after the hand is done playing

paper lava
#

is there a way to make draw_to_hand run everytime an individual card is drawn to hand?

true jasper
paper lava
#

different question, is there a way to grab the rank that comes before a different rank?
kinda like un-strengthing somthing

#

oh, nvm its right there in vanilla remade

true jasper
turbid tiger
#

Okay, what in the world does this mean.

#

actually nvm I'm just gonna go to sleep

#

maybe I can figure it out tomorrow lol

twilit wing
#

no idea how to check suits

#

something like onyx is what im trying to achieve

true jasper
#

look what it does in vanilla remade

twilit wing
#

Oh awesome

loud summit
#

is it possible to make an enhancement that always scores as a specific rank

frosty rampart
#

possibly? there are modded enhancements that count as unique ranks (see abstract card in cryptid/ceramic card in entropy iirc?) at least

stiff locust
#

it's not too difficult

#

you'll have to hook card:get_id()

loud summit
#

neay

#

neat

stiff locust
#

inside your hook, check if card has your enhancement
and if it does, return an integer which is the rank you want

loud summit
#

thx

stiff locust
#

this will apply to scoring and joker effects

true jasper
#

with a joker

loud summit
#

ok the enhamcement im currently working on isnt working :(

frosty rampart
loud summit
#

what does vanillaremade mean by "the functionality comes by default by setting highlighting and enhancement" in the commenrs

stiff locust
#

if you want them to count as both it's hard

#

but if you want 2s to count as queens you can make them do that, but they won't count as 2s anymore

frosty rampart
#

(i.e. they'll stop retriggering hack, fibonacci, etc)

true jasper
frosty rampart
# loud summit wee?

yea anything that's looking for a 2 will no longer find 2s if you do the hook get_id() approach

stiff locust
#

please can we call it anything other than quantum ranks

frosty rampart
#

im sorry

loud summit
stiff locust
#

and quantum enhancements are dumb and stupid

#

anything preceded by "quantum" is automatically dumb and stupid because of it

loud summit
#

quantum mechanics

stiff locust
#

exactly

#

it could just be called multirank or something

true jasper
stiff locust
#

it is though but it's still going to end up being called quantum ranks >:(

lost spruce
loud summit
#

thatsjust double dna

rocky plaza
#

also this is a stretch but deck sleeves is technically a limited quantum deck feature

lost spruce
#

they look so suprised

celest aspen
#

Can anyone help? I made a new edition that basically does what negative does without the shader effect. I have my custom joker set to always have that edition. The only problem is that the shop wont spawn them with the edition (even though the collection shows it as having it. Here is the code for the edition:

celest aspen
# daring fern Yes, because the weight is `0`

unfortunately, that was the first thing I tried changing and it made no difference. I don't want any other jokers (besides what I have set to always have it) to have or obtain the edition, so I changed it back to 0.

daring fern
celest aspen
#

I have joker1 and joker2 coded to always have the edition using set_ability, and it shows up in the collection when when I use debug plus to spawn them in, but when they natrually come up, they don't have it.

normal crest
#

in_shop and weight is for it to naturally spawn

#

what's your set ability code

celest aspen
normal crest
loud summit
#
SMODS.Consumable {
    key = "frost",
    set = "Tarot",

    atlas = "item",
    pos = { x = 0, y = 0 },

    config = { max_highlighted = 3, mod_conv = "m_nflame_snow" },
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue + 1] = G.P_CENTERS[card.ability.mod_conv]
        return { vars = { card.ability.max_highlighted, localize { type = 'name_text', set = 'Enhanced', key = card.ability.mod_conv } } }
    end
}``` hey is there anything that stands out as to why this isnt working
#

everything is working except the use button

jolly shadow
#

what would it even do,like

#

do u not have to add a use function or can_use

frosty rampart
#

tarot cards should auto-handle it based on the config values sometimes
max_highlighted is self explanatory, and mod_conv converts all selected cards into the listed enhancement

celest aspen
loud summit
#

it fixed itself ig

ashen drift
#

how would i modify a context

#

for example, what would i have to hook/patch to make context.ending_shop, say, only trigger when a global variable is a certain value

lavish elm
#

how to use manipulate function from cryptlib?

ashen drift
#

wdym

frosty rampart
#

hook the function SMODS.calculate_context, and only run the reference function if it's not about to trigger ending_shop or if the global variable is a certain value

ashen drift
#

alright

loud summit
#

ok how would you get what set a card is from

daring fern
loud summit
#

thx

#

what is the set for playing cards

frosty rampart
#

either Default or Enhanced

loud summit
#

oke

#

does SMODS.add_card have any side effects or can the return value be saftely discarded

lavish elm
#

I can't seem to understand its parameters

daring fern
daring fern
rotund sable
#

But that can be discarded if you don't care about it

loud summit
#

oke cool bc im doing something very dumb

daring fern
lavish elm
#

ok got it thanks

#

so I got an error about trying to perform on chips which is nil do I add more exceptions or is there another solution?

#

ok adding more exceptions didn't work

lavish elm
#

for i = 1, #G.jokers.cards do
if G.jokers.cards[i] ~= card then
local mult_rand = (0 + (0 - 5) * math.random())
mult_rand = math.floor(mult_rand * 100 + 0.5) / 100
return{
SEALS.modify_joker_values(G.jokers.cards[i], {["*"] = mult_rand}, {x_mult = 1, x_chips = 1}),
message = 'X' .. mult_rand .. " Values",
colour = G.C.XMULT
}
end
end

lavish elm
daring fern
# lavish elm here

Firstly, move it out of the return, Secondly, G.C.XMULT doesn't exist.

lavish elm
#

nope still the same error

#

ok is there like an extra secret function other than
SEALS = SMODS.current_mod
SEALS.perform_operations
SEALS.modify_joker_values

that I need to add to my code?

daring fern
lavish elm
#

found anything?

shadow thicket
#

My game um crashes each time i load into it and i think its my mods

#

my logs

daring fern
shadow thicket
#

how?

daring fern
shadow thicket
#

thank you

daring fern
lavish elm
#

when I play a hand

daring fern
lavish elm
#

calculate = function(self, card, context)
if context.joker_main then
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] ~= card then
local mult_rand = (0 + (0 - 5) * math.random())
mult_rand = math.floor(mult_rand * 100 + 0.5) / 100
modify_joker_values(G.jokers.cards[i], {["*"] = mult_rand}, {x_mult = 1, x_chips = 1})
return{
message = 'X' .. mult_rand .. " Values",
colour = G.C.MULT
}
end
end
end
end
do you need the whole joker or does this suffice?

daring fern
lavish elm
#

I don't even know the problem

#

maybe this happens because of the context bc I looked inside the lua file where this thing happens and it tries to add chips? so is there any better context to use?

daring fern
lavish elm
#

G.E_MANAGER:add_event(Event({
trigger = 'ease',
blocking = false,
ref_table = G.GAME,
ref_value = 'chips',
ease_to = G.GAME.chips + math.floor( SMODS.calculate_round_score() ), <- 803
delay = 0.5,
func = (function(t) return math.floor(t) end)
}))

shadow thicket
#

ugh

#

what happened here

daring fern
shadow thicket
#

Oh?

#

what does that mean?

hearty crane
shadow thicket
#

oh shi

#

is it a mod I have?

lavish elm
#

I can't still find the problem

#

man troubleshooting is fun

#

ok found the problem nvm its not in the code of my mod bc when I tried working on another joker it still gives me the same error so what do I do when my lovely/dump is not working?

#

does deleting file fix it?

#

ok deleting it still gave me the same problem

#

help pls

#

ok deleting the whole entire joker fixed it so there is definitely something going one there

lavish elm
#

ok it is now magically working I have changed nothing

#

troubleshooting at its finest

vague crest
#

trying to make a joker that checks for common jokers, but its not noticing them at all if anyone has any insight

#

also, im curious how i would create a specific tarot card on a condition with a joker since thats the last joker idea i have left before ive made all of them

daring fern
twilit wing
#

Guys, how do i have custom tool tips?

daring fern
vague crest
#

wow i disappear for a billion years come back and this guy still knows everything youre actually so cool tysm !!

twilit wing
#

trying to not have this whole text wall

vague crest
vague crest
#

oh sick

true jasper
twilit wing
#

this is probably way too complicated of a joker to be my first 😭

true jasper
vague crest
true jasper
vague crest
#

ohhhh its just one of those

vague crest
#

oh yeah that makes sense its been a bit

lavish elm
#

{ n = G.UIT.T, config = { text = 'X', colour = G.C.IMPORTANT, scale = 0.32 } },
{ n = G.UIT.O, config = { object = DynaText({ string = r_mult, colours = {G.C.IMPORTANT}, pop_in_rate = 9999999, silent = true, random_element = true, pop_delay = 0.5, scale = 0.32, min_cycle_time = 0 }) } },
{ n = G.UIT.T, config = { text = ' All values', colour = G.C.BLACK, scale = 0.32 } },
{ n = G.UIT.T, config = { text = ' insert new line here Warning: very unstable', colour = G.C.BLACK, scale = 0.32 }}

how to insert a new line? when I put \n it inserts a new line but doesn't reset the position

twilit wing
twilit wing
#

actually i think i figured it out

twilit wing
#

do i need that

true jasper
twilit wing
#

sob

#

okay sigh

twilit wing
#

for some reason...

true jasper
twilit wing
#

wanted to just bring everything to the file instead if having loc_text

twilit wing
#

it just sorta

loud summit
twilit wing
#

oooooh-

true jasper
twilit wing
#

ah mb

true jasper
#

Unless you make the key for it have the mod prefix

loud summit
#

consumables start with c_ and enhancements start with m_ for some reason

loud summit
#

ou

true jasper
#

n_ for enhancements would be better in my imo

twilit wing
#

true

#

actually how would i use {V:1}s in the localization file since i dont have the vars

loud summit
#

v is the variable color marker

twilit wing
#

or in the tool tip rather

umbral zodiac
loud summit
#

you return a color in loc_vars

umbral zodiac
#

conflict + modifier is a word that makes sense

twilit wing
#

yah

#

the variable color works iwth the joker, but i dont know how i could carry it over to the tooltip

true jasper
loud summit
#

you could try setting it to a table ig

twilit wing
#

oh wait

#

i have an idea

true jasper
twilit wing
#

i got it working‼️

true jasper
lavish elm
#

modify_joker_values(G.jokers.cards[i], {["*"] = mult_rand}, {x_mult = 1, x_chips = 1}) ok this thing multiplies the value card limit when a joker is negative how to fix it?

loud summit
twilit wing
#

alr

daring fern
lavish elm
#

ok that one worked thx

gilded blaze
true jasper
#

makes much more sense

gilded blaze
#

at least that's what thunk wants it to be

#

nowadays, modifier usually refers to any modifications on a card (enhancement, edition, seal, custom modifiers added by mods e.g. Ortalab curses, maybe stickers too)

lavish elm
#

how to create a shader for an edition?

cursive gazelle
#

It uses glsl and f#

#

You can find more on that in SMODS.Edition

#

I’ve done som shaders in the past but it wasn’t a pleasant experience

#

Feel free to use anything

true jasper
#

Pins

cursive gazelle
#

Tho i don’t recommend it i don’t think ai knows anything about balatro shaders Lol

true jasper
cursive gazelle
#

The usage of ai is not prohibited however the discussion of it is banned due to people arguing a lot about it

lavish elm
cursive gazelle
#

Balatro uses glsl and f#

#

A simplified version of glsl

#

This won’t work , you need to format it to work

#

Start by looking at other shader examples in smods/examples

lavish elm
#

The examples use F# aren't there anyones that us glsl bc that is what the website uses

cursive gazelle
#

They use a simplified version of it

#

As i said

#

What makes i hard is the lack of documentation

lavish elm
#

then why does the SMODS documentation recommend?

cursive gazelle
#

Because it somewhat translate

lavish elm
#

welp time to watch random playlist of F# tutorial from 12 years ago

#

nvm it is not for shaders

cursive gazelle
lavish elm
#

how to make the edition do stuff?

cursive gazelle
lavish elm
#

how to get the joker that has the edition on it

#

how to fix the Error where the edition is supposed to appear?

#

nvm fixed it

#

but I can't still seem to get the edition to work
calculate = function(self, card, context)
local other_joker = nil
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == card then other_joker = G.jokers.cards[i + 1] end
end
return SMODS.blueprint_effect(card, other_joker, context)
end

wintry swallow
#

How am I supposed to add a button to the option screen

gilded blaze
lavish elm
#

what does missing position or effect function error mean in NewShader

primal robin
wild berry
#

how can i create a shallow copy of a value so it doesnt get overwritten while im doing something

primal robin
#

Depends on what value you want to copy

#

If it's any primitive just store it somewhere

#

If it's table - well, make deep copy if possible

#

If cant - make object immutable for period of time

robust marsh
#

Is there a list of numbers that talisman changes into tables? I wish to add talisman compatibility to my mod before it's too late.

red flower
#

nobody made one that i know

#

anything that's used for score usually

wild berry
#

how can i poll enhancements? because vs tells me it doesnt exist

lavish elm
wild berry
#

is card not the card with the edition?

#

oh wait

lavish elm
#

the issue is that SMODS.blueprint_effect function is not working

wild berry
#

nvm i read teh code wrong

#

did you look at the code for blueprint?

#

search for blueprint

lavish elm
#

this is the code I copied

wild berry
#

oh

lavish elm
#

from blueprint

wild berry
#

add the compatible part too

#

no wait

#

nvm

#

try adding test prints 1st

lavish elm
#

everything works the loop the check the other_joker value it is the function that is not working for some reason

wild berry
#

like card.key

#

or something

loud summit
#

i thought blueprint doesnt retrigger edition effects

lavish elm
#

I did on a joker it works fine

wild berry
loud summit
#

ohh like quantum

daring fern
wild berry
daring fern
robust marsh
lavish elm
#

I making an edition that makes the joker act like blueprint

#

ok how about this how do I make the joker next to it retrigger?

#

I mean that is similar to blueprint sort of

#

ok I managed to do it just had to add context.other_card == other_joker

copper thorn
#

i got this code that transorms played cards into stone card, how could i change it into transforming heart cards into a custom suit (or should i just change it completely)

cursive gazelle
#

And use your custom suit key

copper thorn
#

yh just im working on smth real quick might have figured it out

daring fern
copper thorn
#

sooo i got this but it doesn't do anything except trigger the message

copper thorn
#

wdym ? i thought it was the played cards

#

made sense in my tiny little brain

cursive gazelle
#

Card refers to the joker card

copper thorn
#

yeah i got it, been a long time since i've been doing stuff

#

still wtf should i do T-T

cursive gazelle
#

In another variable

copper thorn
#

mmmmmhhhh

tame peak
#

So I've just gotten started poking around, and I've things I couldn't seem to find documented if anyone could answer for me.

  1. Is there any way to access LÖVE's functionality from inside a mod with steamodded? Like, the underlying engine - not Balatro's data. (I don't think I want lovely? I want to call things arbitrarily, not as a patch, I think is why?)

  2. Is there any way to react immediately to a mod's config change? The only option I'm finding so far is reinit of all mods.

  3. Tied to 2, what is the actual mod lifecycle here? I've been trying to trace it through mod load (during "boot") and up into gameplay for the example custom deck mod. [Late edit: 2 has been answered below. I believe I can disregard this for the time being if nobody answers it but I am still curious.]

daring fern
tame peak
daring fern
copper thorn
#

-# im a begginer btw don't expect me to code cryptid

gilded blaze
#

I don't think the function is necessary

#
if context.joker_main then
    local targets = {}
    for _, c in ipairs(context.full_hand) do
        if c:is_suit("Hearts") then
            targets[#targets+1] = c
        end
    end
    if next(target) then
        for _, c in ipairs(target) do
            SMODS.change_base(c, "parj_bugged")
        end
        return {
            message = "aww man :("
        }
    end
end

this is how I would do it

copper thorn
#

ok but i still need a calculate right ?

#

(and thanks a bunch btw <3)

#

im just missing an end x)

gilded blaze
#

yes, the snippet above is meant to be inside calculate

#

also

#

I suggest context.before if you expect the suit change to affect other joker calc in that hand

ocean sinew
#

how to register a card in-game time through code?

wispy falcon
tame peak
# daring fern `2:` Yes, the `callback` function.

Like, on config? It showed in the guide only something like:

return {
    ["setting_1"] = true,
}

Or is it something like, well, hold on. Let me search here...
- one search later -
So then it's more like, for example

create_toggle(
  {
    -- stuff here and
    callback = (function() end) -- or however a function is done, or really any function
    -- rest of the stuff here
  }
)

In the current_mod.config_tab(), right? That makes so much more sense, omg. Here I was trying to find it on the config.

ashen drift
#

where is G.STATES set

copper thorn
#

sorry for the usless ping but i gotta go (got told rn sooooo)

daring fern
gilded blaze
#

there, updated

gilded blaze
wispy falcon
gilded blaze
#

Idk about this 💀

#

like, something interfered with nativefs

wispy falcon
#

Okay, don't know what though :(

#

I mean, I already tried it with and without other mods and it still happens

#

Is it because there is no config?

wispy falcon
#

in the cryptid server, for example

runic pecan
#

Is there a way to prevent a list of jokers to be replicated by Invisible Joker?

daring fern
runic pecan
#

all while blueprint compatible

daring fern
runic pecan
willow scroll
#

anybody know any mods that have jokers with advanced spriting shenanigans? i want to see if i can combine two joker textures into one dynamically

loud summit
#

the one that gives blueprint a custom texture that copies the joker its copying

willow scroll
#

but thats just copying the texture and applying a shader no?

loud summit
#

is it

#

uhhh cryptid has error ig

willow scroll
#

ill look at it anyway i dont know how to do textures dynamically yet anyway lol

willow scroll
#

indeed

willow scroll
daring fern
# willow scroll it would be a godsend if you just happen to have this laying around
if G.P_CENTERS[key].pos then
    G.shared_fractioned_cards[fractions][fraction][key].center = Sprite(0, 0, 71, 95, G.ASSET_ATLAS[G.P_CENTERS[key].atlas or v.set or 'Joker'], G.P_CENTERS[key].pos)
    local x, y, w, h = G.shared_fractioned_cards[fractions][fraction][key].center.sprite:getViewport()
    local fractionedw = w / fractions
    G.shared_fractioned_cards[fractions][fraction][key].center.sprite = love.graphics.newQuad(x + (fractionedw*(fraction-1)), y, fractionedw, h, unpack(G.shared_fractioned_cards[fractions][fraction][key].center.image_dims))
end
``` This is the part that fractions the sprites.
#

You would just have to draw the fractioned sprite on the card.

#

If you're only doing jokers and doing only 2 it would be less complicated.

willow scroll
#

im only doing jokers

#

but im also doing more than 2

daring fern
daring fern
willow scroll
#

im a novice when it comes to drawsteps but i think i know what i can do with this

#

how do i initialize G.shared_fractioned_cards properly?

daring fern
#

G.shared_fractioned_cards[fractions] = G.shared_fractioned_cards[fractions] or {}

#

G.shared_fractioned_cards[fractions][fraction] = G.shared_fractioned_cards[fractions][fraction] or {}

ashen drift
#

where is the ui structure for this

willow scroll
#

no not key.set

daring fern
willow scroll
#

i see

#

G.ASSET_ATLAS[G.P_CENTERS[key].atlas or 'Joker'], G.P_CENTERS[key].pos)
oh cmon

willow scroll
#

local key = G.maxboism_merged_area.cards[v].config.center.key

#

let me check if that actually defines it though

#

key is supposed to be smth like j_greedy_joker right?

pastel kernel
#

what's the key for mega spectral pack

pastel kernel
#

p_mega_arcana_1 is for mega arcana but what about mega spectral

loud summit
#

p_mega_spectral_1 probably?

pastel kernel
#

p_mega_spectral or p_mega_spectral_1?

daring fern
#

Also no, it's p_arcana_mega_1 and p_arcana_mega_2

willow scroll
daring fern
willow scroll
daring fern
#

It's different if you want it to keep editions and seals.

willow scroll
#

to consider later rn i want to get the rendering working

pastel kernel
#

context for using a specific consumable

daring fern
daring fern
pastel kernel
#

= or ==?

willow scroll
#

almost there

daring fern
willow scroll
#

i probably fumbled the texture application

daring fern
willow scroll
#

yuup how do i make them glue instead of having their own rotation

#

sorry for asking 20 dumb questions in a row btw

daring fern
willow scroll
#

as in inherit the rotation from where its applied

#

i thought set_role({major = self, role_type = 'Glued', draw_major = self}) would work

daring fern
# willow scroll as in inherit the rotation from where its applied

This only fixes some of it:

[[patches]]
[patches.pattern]
target = "functions/misc_functions.lua"
pattern = '''
love.graphics.translate(
    moveable.VT.x+moveable.VT.w/2 + (offset and offset.x or 0) + ((moveable.layered_parallax and moveable.layered_parallax.x) or ((moveable.parent and moveable.parent.layered_parallax and moveable.parent.layered_parallax.x)) or 0),
    moveable.VT.y+moveable.VT.h/2 + (offset and offset.y or 0) + ((moveable.layered_parallax and moveable.layered_parallax.y) or ((moveable.parent and moveable.parent.layered_parallax and moveable.parent.layered_parallax.y)) or 0))
'''
position = "at"
payload = '''
love.graphics.translate(moveable.VT.x+moveable.VT.w/2, moveable.VT.y+moveable.VT.h/2)
'''
match_indent = true

[[patches]]
[patches.pattern]
target = "functions/misc_functions.lua"
pattern = '''
love.graphics.scale(moveable.VT.scale*scale)
'''
position = "after"
payload = '''
love.graphics.translate(
    (offset and offset.x or 0) + ((moveable.layered_parallax and moveable.layered_parallax.x) or ((moveable.parent and moveable.parent.layered_parallax and moveable.parent.layered_parallax.x)) or 0),
    (offset and offset.y or 0) + ((moveable.layered_parallax and moveable.layered_parallax.y) or ((moveable.parent and moveable.parent.layered_parallax and moveable.parent.layered_parallax.y)) or 0))
'''
match_indent = true
willow scroll
#

am i tripping or is something up with the top

daring fern
willow scroll
#

goddamnit every time you chime in to help i become a bumbling buffoon

#

tysm

#

amazing

#

god damn

jolly shadow
#

michendish

pastel kernel
obtuse wraith
robust marsh
#

tmtrainer

rotund sable
willow scroll
steady smelt
#

isn't there a tool somewhere that lets you apply any balatro edition shader to a sprite and export it as an image? can't find it anywhere

willow scroll
willow scroll
#

taking a while though

daring fern
willow scroll
#

but its also calling the same two cards as i directly copied the joker

#

so theres a chance im just reapplying drawstep too many times maybe?

#

based on the fact the game still lags after the joker is sold i am under the suspicion that im fumbling the drawstep

#

it does work again if i start a new run

final jewel
#

how do I spawn a ethernal joker for a deck

loud summit
#

in the apply function

twilit wing
#

is there a way to add more "tabs" like the sell button?

daring fern
twilit wing
#

i wanna add another one that changes what the joker does

#

ah alright

loud summit
twilit wing
#

im working on it actually working as intended now

#

which is alot more difficult than i thought

loud summit
#

is there a downside for it being left in charge mode constantly

twilit wing
#

at all

loud summit
#

oh wait so recharge scales but doesnt grant

#

and exhaust grants but scales backward?

twilit wing
#

yep

#

its like a battery

loud summit
#

neat

loud summit
red cradle
twilit wing
final jewel
cursive gazelle
#

Ethernal

loud summit
#

also i think youre supposed to put it in an event

final jewel
#

oh

#

like that ig

long urchin
#

How do i make a card shake for the first hand

daring fern
long urchin
#

yea, it works exactly like dna except it doesnt matter the hand type

red cradle
#

look in vanilla remade

final jewel
daring heron
daring heron
#

abomination

daring fern
long urchin
#

so i want it to shake on first hand like DNA

final jewel
#

oh ok thx

daring heron
#

does anyone know how i can replace blue stake's -1 hand with an extra showdown blind

#

like one showdown blind on ante 4 and one on 8

long urchin
daring heron
#

etc etc

daring fern
red cradle
knotty compass
#

hey question how to make consumable give mult like a joker when in a consumable slot?

willow scroll
red cradle
#

game code remade by smods

daring heron
daring fern
final jewel
#

yeah doesnt seems to work too

daring fern
daring heron
# daring fern No.

well then i have no idea how i could do that, never done anything like this before

final jewel
#

like in add card

#

or in the deck

daring fern
daring heron
daring heron
#

yeah but like

rotund sable
#

:clueless:

daring heron
#

i have no idea how tf i do that nor do i know what that means

#

i cant code i just want blue stake to be cooler 😭

turbid tiger
#

Right, I concede, I actually need help.

daring fern
# daring heron well then i have no idea how i could do that, never done anything like this befo...
GitHub

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

GitHub

A Balatro Modding Framework. Contribute to Steamodded/smods development by creating an account on GitHub.

turbid tiger
#

I'm trying to make two jokers merge with each other.

#

Currently I'm doing that by making a card delete another when it exists, then add the new card before deleting itself?

#

but I'm not sure how this works, so.

#
    G.E_MANAGER:add_event(Event({
                            trigger = 'after',
                            delay = 0.3,
                            blockable = false,
            func = function()
                G.jokers:remove_card(card)
                card:remove("j_tica_unus")
                SMODS.add_card("j_tica_unusannus")
                card:remove("j_tica_annus")
                return true
                end
            }))
            end
        end```
red cradle
turbid tiger
#

Pain of not knowing anything about lua.

daring fern
red cradle
turbid tiger
#

so where do I actually send these things?

#

because I've been told to redirect convos about this both ends now.

daring fern
turbid tiger
#

Ohhh

#

I see.

red cradle
daring fern
turbid tiger
daring fern
red cradle
turbid tiger
#

I was more so thinking along the lines of two jokers deleting themselves and adding a new joker, but I guess that works.
Can you change the name of the Joker when it 'merges'?

daring fern
turbid tiger
#

Wow I have no idea what any of this is.

#

Good heavens.

daring heron
#

so does anyone know how i can make blue stake do a showdown blind every 4 antes instead of the usual -1 hand

#

cuz i'm stuck

#

how does get_new_boss work?

daring heron
#

yeah i got that far

#

i just dont know what to do with get_new_boss

lament agate
#

yo wait

daring fern
lament agate
#

graphax here

#

haaaiiii

daring heron
vast night
#

hey i just need some quick help. my balatro is silently crashing now that i've updated some mods. i think this is the error? it would be nice ty

INFO - [G] Error: [love "boot.lua"]:48: Failed to initialize filesystem: already initialized
stack traceback:
    [C]: in function 'init'
    [love "boot.lua"]:48: in function <[love "boot.lua"]:42>
    [C]: in function 'xpcall'
    [love "boot.lua"]:357: in function <[love "boot.lua"]:355>
    [C]: in function 'xpcall'
vast night
daring fern
daring heron
#

ok is it this??

    {
    modifiers = function()
        get_new_boss
    end
    },
    true
)
#

cuz i dont think so

#

but thats all you gave me

lament agate
daring heron
#

that's all the information i have

lament agate
#

was about to ask you something tho

vast night
daring fern
vast night
daring heron
lament agate
daring heron
#

and i looked through them

#

but nothing helped

twilit wing
#

how would i have the text be below the joker instead of above the current scoring card?

vast night
lament agate
#

i was about to like

#

work on the same thing like you

#

but for r/okbuddyjimbo

#

i thought youve done it first

#

so i was like, okay maybe not

vast night
#

why would you need to ask me tho?

#

i dont own the rights on the mod yk lol

lament agate
#

no no no

#

like

#

😭

#

idont wanna copy the same thing that existed

#

you feel me

vast night
#

oooooh

#

ok

#

we dont have any okbuddyjimbo jokers anyways atm

long urchin
#

how do i change an entire played hand's rank

daring heron
#

so can anyone actually like, help me?? or no

#

cuz this isnt helping

vast night
gilded goblet
twilit wing
#

im blanking out on the name

twilit wing
#

yah

daring heron
long urchin
#

i tried, and the code is confusing. I assume cuz its an entire hand thing and not a played hand so you cant do for k,v inpairs stuff

#

im using midas mask as a base cuz its supposed to only replace face cards, i just dont know how to replace the "make gold" with "make queen"

daring fern
long urchin
timid zinc
#

is there an easy way to tell which set a held consumable is in in code

daring fern
daring heron
#

just smth small i wanted to make

long urchin
daring heron
#

so it's not helping

long urchin
#

try searching in the chat 'take ownership' and see if someone else has explained that

daring heron
daring heron
#

i don't think thatll help either

#

i know how to take ownership of things

long urchin
#

well then what do you want us to do

#

what are you confused about?

daring heron
#

i just dont know how to make showdown blinds appear twice

#

i'm trying to stay calm but as i told you, this isnt helping

long urchin
daring heron
#

i know how to take ownership of stuff

long urchin
#

idk which lua file its in tho

#

do you know how to patch?

daring heron
#

nope

long urchin
#

someone explained it to me b4 hold on, lemme try to get an explanation

daring heron
#

nevermind, i honestly don't care anymore

long urchin
#

ok so first make a file called lovely.toml in the same location as main.lua

#

and paste this code into it:

version = "1.0.0"
priority = 0

# Define a var substitution rule. This searches for lines that contain {{lovely:var_name}}
# (var_name from this example, it can really be anything) and replaces each match with the
# provided value.
# This example would transform print('{{lovely:var_name}}') to print('Hello world!').
#
# USEFUL: For when you want to reduce the complexity of repetitive injections, eg. embedding
# release version numbers in multiple locations.
[vars]
var_name = "Hello world!"

# Inject one or more lines of code before, after, or at (replacing) a line which matches
# the provided pattern.
#
# USEFUL: For when you need to add / modify a small amount of code to setup initialization
# routines, etc.

[[patches]]
[patches.pattern]
target = ""
pattern = ""
position = ""
payload = '''
'''
match_indent = true
times = 1```
daring heron
#

exept if it's like really simple

#

but that doesnt look simple

long urchin
#

it has a comment explanation

long urchin
#

i could try doing it for you but im not the best coder so idk if itll work

#

im just bad with execution lol

#

im just a girl lalalalalalalala

daring heron
rotund sable
#

cebee and their problems...

daring heron
#

bro 💔

#

whatd i do this time

#

anyway how do i actually make it so blue stake does that

rotund sable
#

code it yourself 💔

daring heron
ocean sinew
#

patches are bad

long urchin
#

why

ocean sinew
#

You can do anything you'd do with patches with "hooks"

floral marsh
#

hey there hum what should I hook if I want to modify the final score of each played hand by a set coefficient modified by a consumable

long urchin
#

what the fuck are hooks

#

how do i hook

#

:?

daring fern
rotund sable
#

AND NOT CALLING IT

long urchin
twilit wing
ocean sinew
twilit wing
#

i have no idea how hooks work

ocean sinew
#

It's just overwriting a function and then recalling the upvalue of the previous function

red cradle
floral marsh
#

thats a hook

ocean sinew
#

like local function a()
print('b')
end
local last_a = a
local function a()
print('a')
last_a()
end

floral marsh
#

it allows you to add stuff to a specific existing function

gilded goblet
#

its when you do things to functions

ocean sinew
#

that's not a hook though

#

It's just calling upvalues of previous functions

#

hooks are set with debug.sethook and are a bit more complex

daring fern
ocean sinew
#

as you can see they are much different

floral marsh
ocean sinew
#

yeah but according to the creator of the LUA programming language that's not a hook

floral marsh
#

now yeah

daring fern
floral marsh
#

maybe lua has a base hook idea

gilded goblet
#

no this is a hook

#

guyhs

#

guys

ocean sinew
#

he's not pivoting his foot correctly

#

where's the pivot

#

also his chin is up

#

always keep your chin down when boxing

#

or you'll get koe'd

red cradle
long urchin
#

whats the file that controls when boss blinds show up?

#

is it blinds or game or a secret third thing

ocean sinew
long urchin
#

ok seu i think the fact theres an argument to begin with means that they both have merit so it doesnt matter which is used

#

can we move on to helping instead of arguing

ocean sinew
long urchin
#

cuz theres a few people who still need help but the chat is being filled

red cradle
long urchin
#

yes

red cradle
#

Don't look there

ocean sinew
#

Are you talking abt the boss blind UI

red cradle
#

oh

long urchin
#

WAIT

#

NVM I JUST REMEMBERED A MOD THAT DOES THIS ALREADY

#

HAHAHAHAH I LOVE STEALING THINGS I LOVE TAKING THINGS THAT ARENT MINE

clear ocean
#

ok mae

long urchin
#

:b

red cradle
#

just see in vanilla remade...

long urchin
#

ok but counterpoint

clear ocean
#

no counterpoint

long urchin
#

dog deck from undertale mod changes when boss blinds show up so i could just look at that deck's code and change the number from 9 to 4

twilit wing
#

i love stealing things

#

yes

long urchin
#

ez pz lemon greazy

ocean sinew
long urchin
#

thats.

#

what i asked earlier.

clear ocean
#

it isn't exact as nh needs to work on it but he spent a long time translating the vanilla items into smod code as a good way to learn and reference

long urchin
#

i was asking which file has get_new_boss

clear ocean
#

similar to jokerforge's vanilla reforged

#

take advantage of them

ocean sinew
long urchin
#

sure bud okay

ocean sinew
#

you asked the file that controls when boss blinds show up

long urchin
#

cool

ocean sinew
#

(UI)

#

not the file that chooses the boss blind

long urchin
#

why would i mean ui man.....

#

OH

#

OH WAIT I JUST GOT IT WRONG

#

I MEANT SHOWDOWN BLINDS

#

IM SAYING BOSS BLINDS I MEAN SHOWDOWNS

#

silly meeeeee

ocean sinew
#

code:gsub(...,"...")

clear ocean
#

i think there's a value boolean i think they makes it a showdown boss blind

long urchin
#

im talking about which ante showdowns appear on

#

im just gonna check dog deck

ocean sinew
#

what abt this

rotund sable
#

@daring heron i have an untested hook

local new_boss_ref = get_new_boss
function get_new_boss()
    if G.GAME.stake == 5 then
        local old_win_ante = G.GAME.win_ante
        G.GAME.win_ante = 4

        local ret = new_boss_ref()

        G.GAME.win_ante = old_win_ante
        return ret
    end
    return new_boss_ref()
end
#

if it works you just have to remove the -1 discard

rotund sable
ocean sinew
#

you can change it to number 3 without patching

long urchin
rotund sable
#

3??

ocean sinew
rotund sable
#

from that statement alone

#

i know what you mean

ocean sinew
#

By replacing the abstract syntax tree then converting it back to code

long urchin
#

i think cebee wanted ante 4 to be showdown but ante 8 to win still

rotund sable
#

i don't think it should?

long urchin
#

i mean i assume, it says G.GAME.win_ante

rotund sable
#

it just changes it temporarily and then restores it

long urchin
#

OH MY GODDDDDDDD

ocean sinew
#

Cuz patches can break easily

rotund sable
#

😭

ocean sinew
long urchin
#

@ocean sinew @daring fern can yall pls take this into dms or something. Its clogging the channel

ocean sinew
#

me and him are talking abt patches

long urchin
#

ppl are trying to get help and its hard when we get washed over with continuous hook v patch arguments

wintry solar
#

Patches are fine, hooks are fine

long urchin
#

ok, now that thats over i think

modern kindle
#

I only just recommend to not be like me and be over reliant on patches
I had over like 1300 lines once and not ideal
Im down to like 700 something now

modern kindle
#

I am just bad at what I do :b

long urchin
modern kindle
#

Thats what im sayin

long urchin
#

theres always SOMETHING a coder's over reliant on

daring fern
long urchin
#

ty ty

ocean sinew
#
function get_new_boss()
    if G.GAME.round_resets.ante%4 == 0 then
        local showdown_bosses = {}
        for i,v in pairs(G.P_BLINDS) do
            if v.boss.showdown then
                showdown_bosses[i] = true
            end
        end

    end
#

use that to get all showdown bosses for example

ocean sinew
#

how

rotund sable
#

why would you mod a stake by 4

ocean sinew
rotund sable
#

???

#

read the question again

ocean sinew
daring fern
long urchin
ocean sinew
#

oh yeah

#

Let me fix

long urchin
#

or am i stupid

lofty elm
#

hey real quick, anyone know what G.consumeables.cards.ability.edition will return for a normal planet? And if I even did that right lol

ocean sinew
#

ok fixed

ocean sinew
#

%2 == 0 means It's a multiple of 2 and vice versa

long urchin
#

ah

#

gotchee

rotund sable
#

🥺

daring fern
ocean sinew
daring fern
#

It would still return nil even if it was a card.

lofty elm
#

ok sweet thx

long urchin
# daring fern `SMODS.change_base(card, nil, "Queen")`

so to double check, this should replace face cards with queens?

        local faces = 0
        for _, scored_card in ipairs(context.scoring_hand) do
            if scored_card:is_face() then
                faces = faces + 1
                SMODS.change_base(card, nil, "Queen")
                G.E_MANAGER:add_event(Event({
                    func = function()
                        scored_card:juice_up()
                        return true
                    end
                }))
            end
        end```
lofty elm
daring fern
lofty elm
#

damn

#

is there a way to find that

long urchin
#

oh then, how would i

#

do that

ocean sinew
daring fern
long urchin
#

gotcha

rotund sable
#

@daring heron

ocean sinew
#

when you loop through a table the first thing you put as a arg is the index and then in the second It's the value

long urchin
#

its peak

daring heron
#

can i have it

#

🥺

rotund sable
#

its in my mod now

#

:clueless:

rotund sable
#

not anymore

long urchin
#

WTF

rotund sable
#

<3

long urchin
#

why are you so meannnnnn

rotund sable
#

nah nah im just kidding

#

im testing it

#

no it doesnt win

#

on ante 4

long urchin
#

sweet

rotund sable
# daring heron can i have it
local new_boss_ref = get_new_boss
function get_new_boss()
    if G.GAME.stake == 5 then
        local old_win_ante = G.GAME.win_ante
        G.GAME.win_ante = 4

        local ret = new_boss_ref()

        G.GAME.win_ante = old_win_ante
        return ret
    end
    return new_boss_ref()
end

SMODS.Stake:take_ownership('blue',{
    modifiers = function() 
        -- Look get_new_boss hook
    end,
    loc_txt = {
        name = "Blue Stake",
        text = {
            "bla bla",
            "bla bla"
        }
    }
},true)
lofty elm
daring fern
lofty elm
#

oh ok cool

#

sorry

long urchin
#
calculate = function(self, card, context)
        if context.first_hand_drawn and not context.blueprint then
            local eval = function()
                return G.GAME.current_round.hands_played == 0 and not G.RESET_JIGGLES
            end
            juice_card_until(card, eval, true)
        end
        local faces = 0
        for _, scored_card in ipairs(context.scoring_hand) do
            if scored_card:is_face() then
                faces = faces + 1
                SMODS.change_base(scored_card, nil, "Queen")
                G.E_MANAGER:add_event(Event({
                    func = function()
                        scored_card:juice_up()
                        return true
                    end
                }))
            end
        end
    end```hughgngnngnghnnrnrrgnrghnrnughrng
rotund sable
#

its not in a context checl

long urchin
#

I FORGOT TO CONTEXT IT

#

FUCK

ocean sinew
rotund sable
#

🔥

long urchin
#

but strn explained

ocean sinew
rotund sable
long urchin
#

very helpful!

ocean sinew
#

np

#

wait you really don't know what is nil?

long urchin
#

thats.

#

not what the problem is bro.

ocean sinew
#

Yeah that's a big problem

long sun
#

is there a display_size for a card's front?

long urchin
#

I KNOW WHAT NIL IS

#

fucking whatever dude @rotund sable already explained the problem

ocean sinew
rotund sable
#

like {s:2}Hi{}

ocean sinew
#

I actually believed you didn't knew what nil was

long sun
daring fern
long sun
#

aw

#

i'll write that myself then >:3

#

thanks

ocean sinew
rotund sable
long sun
#

:3

ocean sinew
#

🔥

long sun
#

i think it's killing my brain cells to be honest ;u;

#

/j

#

/you're fine

ocean sinew
#

Thanks

#

you too

long urchin
#

fucuckfkfkkk fuckkkkkk oghhnngn fuckkkkkkk ough

#

its not working rihgt

ocean sinew
long sun
#

🤤

daring fern
ocean sinew
#

what in the vanilla game uses Card:explode()

long urchin
#

its supposed to change it after scoring, but its like instantly changing it into queens

            for _, scored_card in ipairs(context.scoring_hand) do
                if scored_card:is_face() then
                    faces = faces + 1
                    SMODS.change_base(scored_card, nil, "Queen")
                    G.E_MANAGER:add_event(Event({
                        func = function()
                            scored_card:juice_up()
                            return true
                        end
                    }))
                end
            end
        end```
#

also is there a context for first hand

ocean sinew
#

will change after 0.2 seconds

daring fern
long urchin
#

I WANT IT TO CHANGE AFTER SCORING

ocean sinew
#

context.final_scoring_step

long sun
#

change them in the event

ocean sinew
long urchin
#

ty

long sun
#

when scoring, the game runs through everything instantly ^u^

ocean sinew
long sun
#

so u need to tell it to hold its horses

daring fern
long urchin
#

what

#

what does that mean

ocean sinew
long sun
#

that doesn't help ;u;

long urchin
#

thanks for just rewording what he said with no explanation. Very descriptive!

long sun
#

also which script handles display_size? i can't find it

daring fern
long sun
#

👍

ocean sinew
#

I need a funny deck idea

#

but Idk what to do

long urchin
# daring fern Set the fourth input to `true` in `SMODS.change_base` and do `scored_card:set_sp...

its not changing them now :(

if context.after and context.first_hand_drawn then
            for _, scored_card in ipairs(context.scoring_hand) do
                if scored_card:is_face() then
                    faces = faces + 1
                    SMODS.change_base(scored_card, nil, "Queen", true)
                    G.E_MANAGER:add_event(Event({
                        func = function()
                            scored_card:juice_up()
                            scored_card:set_sprites(scored_card.config.center, scored_card.config.card)
                            return true
                        end
                    }))
                end
            end
            --[[Set the fourth input to true in SMODS.change_base
            and do scored_card:set_sprites(scored_card.config.center, scored_card.config.card) in an event.]]
        end```
daring fern
long urchin
#

Wuh

long sun
#

lord what have i done

long urchin
#

Whats the context for 'first hand only' then

daring fern
long urchin
long sun
#

right so this is definitely wrong

#

the question is

turbid tiger
#
    G.E_MANAGER:add_event(Event({
                            trigger = 'after',
                            delay = 0.3,
                            blockable = false,
            func = function()
                G.jokers:remove_card(self)
                card:remove("j_tica_unus")
                SMODS.add_card("j_tica_unusannus")
                card = nil
                return true
                end
            }))
            end
        end
}``` 

How is this written wrong actually? I feel like I'm close but I don't really understand.
long urchin
#

What's the error

long sun
#

what should i have done 😭

turbid tiger
#

Sorry 515, I didn't understand anything about the fusion code...

daring fern
long sun
#

make the sprite that renders on top of the card 40x taller

turbid tiger
long urchin
long sun
#

also i'd love to change the position of that sprite too, to allow it to be 80x taller

long urchin
#

Gotcha

daring fern
lofty elm
#

there doesn't happen to be something that grabs a table of your hands that have been played most? as in it'll give multiple if theres a tie. I just wrote some code to do it before realizing there might be smt built in

long sun
#

Aura did that 😭

#

there's also a bug with the fronts caused by changing deck skin, so i'd love an alternative

daring fern
long sun
#

ah icic