#💻・modding-dev

1 messages · Page 565 of 1

hollow horizon
#

Seal code if that helps anyhow

slim ferry
#

the label should go under the same key but in misc.labels (see example image), the way you did it is the way for loc_txt and not a localization file

hollow horizon
#

oh yeah I did it already for other seal, doesn't work either

slim ferry
#

oh no i see

#

theres supposed to be an extra _seal at the end

#

which you probably missed since you also have that in the key

thorn basin
#

uh...
is it possible to apply another sprite on an enhancement?
like the soul spectral does but with an enhancement?

red flower
#

you can use draw or drawsteps

hollow horizon
#

ooooh so the key is paput_seal but I have to write paput_seal_seal in my loc file?

slim ferry
#

yea

hollow horizon
#

ooooooooooh

thorn basin
red flower
#

check The Soul in vanillaremade for an example of a soul sprite with drawstep

thorn basin
#

thanks!

hollow horizon
#

any special suffixes I need to know for poker hands maybe? because they don't work as well

red flower
#

no

#

did you move misc out of descriptions

cursive gazelle
#

@dreamy thunder

hollow horizon
hollow horizon
#

I did

red flower
#

then it looks fine

hollow horizon
#

then I have no idea why it shows up as ERROR in run_info

slim ferry
#

oh i see the issue i think

#

the description has another table inside it with the text inside there

hollow horizon
#

ok I see

#

yeah

#

that's the problem

#

works now

#

ok last question, promise... for suits is it just prefix_key or something like prefix_key_suit?

red flower
#

former

loud summit
#

how do you make an effect not trigger when running as a blueprint

red flower
#

if not context.blueprint

robust marsh
#

guh

loud summit
#

thx

robust marsh
#

tried, didn't really work

#

mmm

red flower
#

the way i do appearing in shop is with tags

#

i used to not do it with tags but it was basically the same code

robust marsh
#

not sure if it's possible to straight up just emplace the card when you enter the shop

robust marsh
slim ferry
#

you could probably use global mod calculate

#

check if youre in ante 8 and the small blind is upcoming in context.starting_shop and then add a card to the shop in the same way as tags

red flower
#

i had a G.GAME.joy_create_card table

robust marsh
red flower
#

tags do it in a specific function

robust marsh
#

ah

chrome token
#

i'm kinda baffled. is there any reason why this shouldn't work and instead gives a joker of ANY rarity??

slim ferry
#

KENDRICK??

robust marsh
#

mustard

slim ferry
#

also oldprob spotted

#

also idk that should work

chrome token
#

old prob??

#

what huh

dreamy thunder
#

Yo thas fire

chrome token
#

😭

slim ferry
#

old probability system

frosty rampart
slim ferry
#

since youre using G.GAME.probabilities.normal i assume you do want it to be modified

frosty rampart
chrome token
#

ah

chrome token
#

i want it to spawn either a common or rare joker

#

but it's literally not doing that at all 🥲

slim ferry
#

does it work if you change the set to just Joker? the custom objecttype might just be messing with it

chrome token
#

man if it is i'm gonna be real mad 🥀

#

it works

#

ffs

thorn basin
#

how can make an enhancement retrigger the adjacent cards?
I've already tried to get the position of the adjacent scoring cards but I'm not sure what to do with the retrigger part

chrome token
#

i need to make separate pools for the common and rare mod jokers

red flower
#

but maybe it's easier to make 2 different ones object types a re weird

chrome token
#

i don't see an option to set the rarity on an objecttype though?

#

unless the smods wiki is very outdated...

red flower
chrome token
#

...disregard

#

i am blind

modern kindle
#

haha i get it

#

blind

#

get it guys

red flower
#

yes

robust marsh
#

haha, small blind 😂

#

I get it

#

violet vessel 😂

chrome token
#

jk

modern kindle
#

crying in the club rn

red flower
#

club??

#

like

#

the suit

modern kindle
#

u get me

robust marsh
#

how the hell do tags emplace cards into G.shop_jokers

red flower
#

they return the created card in create_card_for_shop

robust marsh
#

OH

#

i see it now

wide chasm
#

im tryna take some of the ancient joker code from vanillaremade so i can modify it and make a new joker, but like anything i do to the code breaks it

#
SMODS.Joker {
    key = "galaxy",
    blueprint_compat = true,
    rarity = 3,
    cost = 8,
    atlas = 'nebula_atlas',
    pos = { x = 1, y = 0 },
    config = { extra = {xmult = 1.5} },
    loc_vars = function(self, info_queue, card)
        local suit = (G.GAME.current_round.nebula_galaxy_card or {}).suit or 'Spades'
        return { vars = { card.ability.extra.xmult, localize(suit, 'suits_singular'), colours = { G.C.SUITS[suit] } } }
    end,
    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play and context.other_card:is_suit(G.GAME.current_round.nebula_galaxy_card.suit) then
            return {
                xmult = card.ability.extra.xmult
            }
        end
    end
}

--- This changes vremade_ancient_card every round so every instance of Ancient Joker shares the same card.
--- You could replace this with a context.end_of_round reset instead if you want the variables to be local.
--- See SMODS.current_mod.reset_game_globals at the bottom of this file for when this function is called.
local function reset_nebula_galaxy_card()
    G.GAME.current_round.nebula_galaxy_card = G.GAME.current_round.nebula_galaxy_card or { suit = 'Spades' }
    local galaxy_suits = {}
    for k, v in ipairs({ 'Spades', 'Hearts', 'Clubs', 'Diamonds' }) do
        if v ~= G.GAME.current_round.nebula_galaxy_card.suit then galaxy_suits[#galaxy_suits + 1] = v end
    end
    local galaxy_card = pseudorandom_element(galaxy_suits, 'nebula_galaxy' .. G.GAME.round_resets.ante)
    G.GAME.current_round.nebula_galaxy_card.suit = galaxy_card
end
function SMODS.current_mod.reset_game_globals(run_start)
    reset_nebula_galaxy_card()
end

im literally just changing the name and it stopped working

#

replaced all the vremade_ancient with nebula_galaxy and it broke everything for some reason

gilded goblet
#

are you still trying to figure this out

hollow horizon
#

hand_chips works as intended - rounds up chips scored by current hand...
but mult is added instead of just being set

Anyone knows what could be the issue?

red flower
#

dont return them

#

i dont know why hand chips is working like that either

gilded goblet
#

im doing something silly for my "marked" sticker (1 in 15 chance for joker to be destroyed at the end of round)

apply = function(self, card, val)
  card.ability[self.key] = val
  G.E_MANAGER:add_event(Event({
    func = function()
      if card.ability.eternal then
        card.ability.eternal = nil -- removes eternal from card
      end
      return true
    end
  }))
end

the important part is in the event after card.ability[self.key] = val

viral ember
#
[patches.pattern]
target = "game.lua"
pattern = "replace_card.states.visible = false"
position = "before"
payload = '''
SMODS.change_base(replace_card, 'Hearts')
replace_card:set_seal('balalalatro_sans', true, true)
replace_card:set_ability('m_gold', true)
'''
match_indent = true
overwrite = false```
is there a way to have the patch happen after my seal is registered?
#

or is it just not allowed to use custom stuff

red flower
#

the seal should be registered before that patch

viral ember
#

I get that but how lol

red flower
#

no i mean your patch should work

viral ember
red flower
#

check the key is correct

gilded goblet
viral ember
#

yep

old void
red flower
viral ember
#

I forgot the key lol

old void
#

🗣️

gilded goblet
viral ember
#

thanks a lot man!

gilded goblet
#

balltro

vale berry
#

balltrö

chrome token
viral ember
#

get it right smh

#

ball🍌trö

vale berry
#

awesome

modern kindle
viral ember
#

I should add wiht knuckles

slim ferry
viral ember
#

it got worse

modern kindle
viral ember
#

That's a new one

#

saw the blue in my taskbar and thought my pc bluescreened lol

frail parcel
#

So I split my mod into multiple files using assert(SMODS.load_file())()
Is it possible to have all the atlases in 1 file or do I have to put them in a file-by-file basis

red flower
#

you can put them in 1 file

modern kindle
#

dear god why that shit so BLUE

red flower
#

but make sure it loads before the other files that use them

stiff locust
#

it's not necessarily a worse crash

viral ember
#

I know

#

I just found it funny

stiff locust
#

it is funny

viral ember
#

I hate working with shaders but this looks funny

stiff locust
#

shaders look cool but

#

how the fuck do you do that

#

how do you make one

modern kindle
#

shaders are awesome until i discovered i cant just type 'make me shader please' and it creates a cool shader thats exactly how i want in my mind because they fuckin baffle me

slim ferry
#

i need me a shader individual
and an art individual my joker art is like eh at best

vast bridge
#

ShaderForge would go crazy🔥

slim ferry
#

TRUE ACTUALLY

modern kindle
#

finally, a sequel to jokerforge

#

my goat

viral ember
#

If someone made that I would be adding way more editions

stiff locust
#

i want a shader that is the aurora borealis

#

i think that would look sick as hell

red flower
#

jokerforge is going to include shaders soon iirc but i dont think its going to be a full editor

modern kindle
#

programming should be as simple as 'make cool' and there you go

red flower
#

i think it would be easier if we could go into someones mind

#

"check out this new mod i thought about"

modern kindle
#

youre already in my mind all the time

stiff locust
#

same

robust marsh
#
    calculate = function(self, context)
        if context.ante_change then 
            ease_ante(-2)
    end
end

I'm trying out the new ante contexts to make it so while the joker is held you go back down an ante instead of going up. This is my first time trying the next contexts so i'm probably doing it wrong since this doesn't work

stiff locust
#

the ante will always go up when you beat a boss

modern kindle
#

whats the diff in end of round and beat boss, is it just timing

stiff locust
#

beat_boss is during end_of_round

#

beat_boss only triggers if you beat a boss

red flower
stiff locust
#

what do you mean it doesn't work

robust marsh
red flower
#

i never used it but thats what the docs say

#

i think context.ante_end doesnt work properly in the release

robust marsh
#

ah

#

huh

#

weird, it still just goes up

red flower
#

weird it looks like it should work

#

im not at home to test it sadly

sturdy compass
#

Does the base ease_ante function have a nil or 0 check?

red flower
#

it doesnt seem like it

#

it's always called with 1

sturdy compass
#

Just cuz it’s called with 1 all the time doesn’t mean thunk didn’t add a check

#

He’s done weirder things 💀

red flower
#

those were two separate statements sorry

sturdy compass
#

Ah

red flower
#

i did check first

#

oh wait there's one but just for nil

sturdy compass
#

Huh

red flower
#

+0 ante

royal badger
#

So I finally got the video playing ( single frames put into a video) in game after the joker gets activated but it never stops playing then, can someone maybe help with that?

slim ferry
#

why does this not work? its supposed to multiply the return values of jokers, but for some reason it only does the message. i know vanilla jokers have wierd hardcoded messages but the mult counter is also no different

#

are vanilla joker returns just hardcoded in general or smth actually

wintry solar
shell timber
#

passing balatro in 5 minutes

robust marsh
#

weird...

wintry solar
#

It’s just because it was done with an extra arg that hooks haven’t updated too, but the dev build has a fix anyway

red flower
shell timber
#

nxkoo took it

#

wait i sent it in modding dev Ooops

faint yacht
#

...how do I "reopen" a mod config menu tab?

robust marsh
#

!

wide chasm
#

yo how do i make a joker change its scoring suit after each round

ocean sinew
#

how do I get the path to the game?

robust marsh
#

i have no clue how obscure this is, is it possible to make it so you fight blinds in the order of boss blind -> big blind -> small blind? I imagine that would break things but it's worth asking.

wintry solar
slim ferry
#

it should work just fine

#
G.GAME.round_resets.blind_choices.Small = get_new_boss
G.GAME.round_resets.blind_choices.Boss = "bl_small"

will break when boss is rerolled though

#

since itll call get_new_boss for the boss blind again

ocean sinew
charred widget
#

Hello again friends! If I wanted to make a joker passively debuff an entire suit of cards, how would I do that?

robust marsh
#

Probably look at how the boss blinds do it

slim ferry
#

if context.debuff_card and context.debuff_card:is_suit(<suit>) then return { debuff = true } end

slim ferry
#

so they dont use a calculate for it

robust marsh
#

ah

charred widget
cyan lagoon
#

heya, so i got this thing to change the enhancement values, but it doesn't revert them if you reload. how can i fix that?

red flower
#

whats enhance change

cyan lagoon
#

my function for it

red flower
#

yes i know

#

show the code

cyan lagoon
slim ferry
red flower
#

remove from deck might not get called during the run ending

#

im not sure

slim ferry
#

ohh its a joker

#

yeah remove from deck doesnt get called on run exit

#

since it doesnt need to do that normally

cyan lagoon
#

yeah, that's the thing

primal robin
slim ferry
#

they do

red flower
#

also

slim ferry
#

just a bit too much

slim ferry
#

also thats like a bad way of implementing such a function tbh, changing P_CENTERS is a very bad idea

cyan lagoon
#

i know

slim ferry
#

you should probably hook Card:set_ability and create_card instead

#

to change the enhancement values every time when it is applied/created rather than changing the default config

willow scroll
#

if i were to extend SMODS.GameObject, how would i implement calculate stuff for it? trying to turn my backstickers into something not jank

strong terrace
#

is there a way to make a joker gain mult every time you encounter it in a new run?

red flower
#

you would probably need to save the mult to the profile

robust marsh
slim ferry
#

as long as you just call it at the start of every ante it should work i think? idk when the next blinds are generated tho

robust marsh
#

probably doing it too late

willow scroll
#

i have the custom object properly set up i believe, how would i connect Card:calculate_backsticker() to other stuff so that it actually gets called when needed?

slim ferry
# robust marsh probably doing it too late

maybe context.starting_shop and G.GAME.round_resets.blind_states.Small == "Select"
for the first ante you could just use SMODS.current_mod.round_resets to add an event for it at run start i imagine

robust marsh
charred widget
#

Alright, I have a little tweak I'd like to make to a pair of my jokers

slim ferry
robust marsh
#

alright

charred widget
#

I'll just start with Koraidon. He applies red seals to played wild cards, but if you play the same wild cards that already have seals, it just applies the red seal again, which just wastes time. is there a way to detect if a card already has a red seal, and then skip the seal-applying function?

slim ferry
#

add and context.other_card.seal ~= "Red" to one of the checks

#

wait

#

no

#

there

cursive gazelle
#

Eris

slim ferry
#

i forgot the wierd not interaction

#

lmao

slim ferry
#

s

charred widget
robust marsh
#

holy depression

slim ferry
#

so wherever you like to have the check idk

charred widget
#

alright i'll check if it works

#

welp

#

it crashed

#

as soon as it started scoring

#

must've put it in the wrong place

charred widget
slim ferry
#

`can i see the code

charred widget
slim ferry
charred widget
#

well i put it after local temp_card = context.other_card because i thought that might work but it didn't

slim ferry
#

it should go into an existing if statement if youre just raw copy pasting it

#

because thats what and is for

charred widget
#

ok

slim ferry
charred widget
#

so i just put it in the same line as local temp_card = context.other_card

slim ferry
#

the line before

charred widget
#

ok

slim ferry
#

before the then of the if statement ofc

charred widget
#

ok

#

i'll try it out then

#

ok it works!!! ty

#

i'll do the same for miraidon

slim ferry
#

hell yeah

strong terrace
#

the fuck did i do?

slim ferry
#

you did everything outside of the calculate

strong terrace
#

so what do i need to do?

slim ferry
#

put the end at the actual end of the calculate function

strong terrace
#

sorry i'm fucking dumb where is the actual point i have to put the end?

slim ferry
#

after the code of the function

strong terrace
#

isn't it at end of all the code written in the image?

slim ferry
#

no?

#

its literally right after the start of the function

short girder
#

you can't end the function immediately after you started it

#

that just does nothing

strong terrace
#

so i have to remove that

slim ferry
#

you have to move the end

#

to after ALL of the calculate code

willow scroll
#

trying to find how the return table is used eventually

clear ocean
ebon hawk
#

Does anyone have a sample Joker code that adds a card to the deck?

slim ferry
clear ocean
#

i keep geting this feeling to mod balatro idk

gilded goblet
#

this shit is the devil

clear ocean
#

man this computer programming a bitch 😂

#

like i get motivated, work on it, get demotivated, delete my work, and just play vanilla+ balatro

#

i should probably stop doing that

gilded goblet
clear ocean
#

i don't know! its like second nature to me to just delete my work...

robust marsh
#

it stays the same

gilded goblet
robust marsh
#

the small blind however does turn into a boss blind

clear ocean
slim ferry
#

hmmmmmmmmmmmmmmm

clear ocean
#

might not do much since i have my music lessons tonight

#

is there any way to prevent myself from doing that

gilded goblet
clear ocean
#

💯

#

it gets off the chainwax

gilded goblet
clear ocean
#

got this on repeat

willow scroll
#

actually i might be crazy, was there an "easy" way to give a new object type its own calculate function?

red flower
#

why dont you extend from center or something else with a calculate function

willow scroll
#

actually no im not

#

or maybe i am ffs

red flower
#

😭

willow scroll
#

im extending SMODS.GameObject rn

#

because im doing smth similar to a sticker

#

should i have instead extended Center?

red flower
#

no idea never tried anything like that

latent perch
latent perch
willow scroll
#

stickers extend gameobject and seals too

#

surely if i just swap what i have to extend center it will magically work :clueless:

red flower
#

i would ask eremel

daring fern
red flower
#

i think the counters Ice made for blockbuster also work like stickers

willow scroll
#

no i have not

#

lets see

slim ferry
#

most custom modifiers ive seen extend stickers

versed swan
#

What's the context that is sent to a playing card when it is drawn to hand?

gilded goblet
#

the only thing i wish for stickers rn is the ability to have stickers not be applied to jokers with other stickers

daring fern
versed swan
#

damn

#

hmm

daring fern
versed swan
#

but docs is saying that's a boolean?

#

unless docs is outdated

willow scroll
daring fern
versed swan
#

sobbing rn

#

i can work with this, thank you

versed swan
#

(ig this is mainly a lua question than anything)

#

oh wait i have an idea for a better implementation of what I need, nvm

gilded goblet
robust marsh
#

@slim ferry alright so uhhh the thing is, the boss blind actually advances the ante when it is beaten and because it's first it means that the other two blinds are useless droidcry

slim ferry
#

wha

#

i thought the game was hardcoded to where the last blind only increases the ante...

#

because cryptid makes bosses appear early but they DONT increase ante

charred widget
#

Hello again! I have a new joker that I'm having trouble with

slim ferry
#

does skipping work tho

#

does the small blind still up the ante

robust marsh
#

mmm i'll try rn

wintry solar
#

This is why I said it wasn’t properly supported

#

There’s a lot of work to do for changing the small and big blinds

slim ferry
#

idk i thought it was hardcoded the other way around

#

as in last blind specifically always increases ante regardless of type

#

but its apparently the opposite

red flower
#

reading the code the best thing to do is to take_ownership of whatever sticker you want to conflict with and make its should_apply also not compatible with yours

robust marsh
slim ferry
#

okay yeah maybe this doesnt work

robust marsh
#

I was expecting it to break but this is bad

gilded goblet
wintry solar
robust marsh
red flower
#

but they did make it so if you add should_apply to them then those get ignored so mods can change that

gilded goblet
#

yea

charred widget
#

I want Incineroar here to disable the boss blind effect ONLY on the first hand of the round. How can we go about implementing this? Also please don't mind the clusterfuck code it was generated in Jokerforge

#

also it's lowkey crashing my game

slim ferry
#

youre missing an end my friend

#

according to the crash

modern kindle
#

I do enjoy the concept of something simply lowkey crashing the game
Not a super big deal

charred widget
robust marsh
slim ferry
slim ferry
#

you use vscode right?

charred widget
#

yeah

slim ferry
#

shift+alt+f should also work

robust marsh
charred widget
#

ok i tried that

#

i'll see if it works

#

still has 7 problems according to the software

slim ferry
#

well yeah but it should look cleaner

#

its not there to solve code issues

charred widget
#

true

#

ok it doesn't look like it solved anything

slim ferry
#

can you send the code again

charred widget
#

it gave me the same crashlog

slim ferry
#

maybe i can find the missing end

#

now

charred widget
slim ferry
#

<@&1133519078540185692>

charred widget
#

<@&1133519078540185692>

grand violet
#

Gone

charred widget
#

thank you mods :3

slim ferry
#

thanks egg

versed swan
#

card_limit and extra_slots_used is so janky

#

i put them on an enhancement, but then when i change a card with that enhancement to something else, that card limit/extra slots value sticks around

slim ferry
#

vscode seems to not like that for me

modern kindle
#

yea thats what im seein too

charred widget
#

i'll admit i left the code for incineroar half-done because i couldn't find the options i was looking for in jokerforge

slim ferry
#

it works when you merge the two functions

charred widget
#

oh it does clear up several issues

#

oop and it fixed everything

#

game no longer crashes

daring fern
#

charred widget
#

ok so something i wanted to fix initially

#

i mentioned i left incineroar half-finished because i couldn't find the code for the functions i wanted

#

I want incineroar to disable the boss blind effect ONLY on the first hand

#

How can we set that up?

slim ferry
#

The only mod i know that does actually re-enable the boss blind is cryptid

#

And cryptid code is well
Cryptid code

cursive gazelle
charred widget
#

well I think it could work, i don't think it would have too much variation that would make the game crash

daring fern
# charred widget How can we set that up?

You would disable the blind, then on the next hand call G.GAME.blind.config.blind.set_blind if it exists elsewise call the set_blind functions for the vanilla blinds set G.GAME.blind.disabled to false

charred widget
#

Ok let me go back into joker forge

#

im gonna see if there's a way i can make this easier on us

cursive gazelle
#

By the way i think you can use SMODS.Hook for that case

#

The seal thing

daring fern
cursive gazelle
#

?

#

What

charred widget
#

oh yeah i found something in jokerforge that works exactly the way i want it to

cursive gazelle
#

I could swear i’ve seen something in the lines of SMODS.Hook

daring fern
slim ferry
#

I have seen SMODS.Hook only be used by someone who has just started modding and has no idea what a hook is

robust marsh
cursive gazelle
#

Omg I’m degenerate

red flower
cursive gazelle
#

I was looking at other code

red flower
#

probably chatgpt

cursive gazelle
#

Nevermind

red flower
#

there was a smods feature request to make an smods.hook

wintry solar
modern kindle
#

yea these are the only results that show up

wintry solar
#

it was a request from some cryptid folk

slim ferry
cursive gazelle
#

Ah i see

red flower
cursive gazelle
#

Lmao

red flower
#

let me find it

slim ferry
#

I suppose so

slim ferry
#

But it would also be far more limited than an actual hook

cursive gazelle
#

I remember someone like said

#

You can hook retrigger stuff with smods.hook

charred widget
#

WAIT IT WORKS

cursive gazelle
#

But i just kept it in the back of my head

#

Lol

red flower
slim ferry
#

Smods cat...

modern kindle
#

i saw a discord link pop up and i was startled

#

sigh i GUESS ill join

red flower
#

@ mods

cursive gazelle
#

Are you a mod developer?
Yes
Yes

versed swan
# wintry solar it shouldn't do, can you show your code?
SMODS.Enhancement {
    key = "dense",
    loc_vars = function(self, info_queue, card)
        local item = card and card.ability or self.config --[[@as any]]
        return {vars = {
            item.extra.tungsten_handsize_mod,
            item.extra.holdingthis
        }}
    end,

    atlas = "opticenhance_atlas",
    pos = { x = 1, y = 0 },
    in_pool = function() return false end,
    config = {
        card_limit = -1,
        extra = {
            tungsten_handsize_mod = 1, holdingthis = 0
        }
    },

    -- (not relevant to enhancement change)
    calculate = function(self,card,context)
        if context.cardarea == G.play and context.before then
            Ovn_f.temp_handsize_change(card.ability.extra.tungsten_handsize_mod)
        end
    end,
}

Important bit is card_limit = -1 - on a card this persists even when enhancement is changed

charred widget
#

nevermind, it is not in fact working as expected

cursive gazelle
#

I feel like a better dev already

robust marsh
#

i still have a ton of room for improvement

red flower
#

i still have time to quit

robust marsh
cursive gazelle
#

I think you’re too deep

slim ferry
#

How it feels to watch the debugging joker forge to fully coding pipeline in modding-dev

cursive gazelle
#

In this rabbit hole

wintry solar
willow scroll
robust marsh
#

top 10 modding tips, tie print to all of your functions and enable debug plus so you look like a professional in front of your friends

cursive gazelle
#

N do you have draggable ui in js ?

red flower
#

no

wintry solar
#

huh

#

oh there's a typo T_T

versed swan
charred widget
#

ok so i have a recurring theme with some of my new jokers

#

if the codeblocks aren't available, i just leave it half coded

primal robin
#

HotPot have draggable UI trash

charred widget
#

and in that spirit, I have Zygarde 50%

slim ferry
#

The joker forge to coding pipeline is real :P

charred widget
#

what I WANT it to do is convert the first hand played into cell cards, and retrigger the highest ranked cell card twice

#

How can we go about finishing the code?

daring fern
#

How does one rescore a joker?

wintry solar
#

this does literally nothing

slim ferry
#

Le forge code i imagine

#

Joker forge trigger + condition but no effect

charred widget
#

yeah i literally said it's half done

#

which admittedly isn't the best idea

robust marsh
slim ferry
robust marsh
#

every day i pray to vanillaremade gemmytroll

charred widget
#

anyways my reasoning with leaving the joker half coded is that maybe we could use the initial code as a starting point and build from there

#

but then i realized that jokerforge code is a clusterfuck

slim ferry
#

Vanillaremade is like half of the way i learned lua lmfao

#

It goes crazy

red flower
#

i learned lua from reading smods code

charred widget
#

where can i find vanilla joker code?

#

it's probably in vanillaremade but i can't find it atp and i'd like some help

robust marsh
#

i learned smods code from reading assembly

ocean sinew
#

I learned assembly from reading smods code

robust marsh
primal robin
#

I learned lua by seeing it in dota2 custom games, and then from vanilla code, lul

wintry solar
#

I learned lua by fixing old wow addons and writing smods code 😭

slim ferry
primal robin
#

In my future plans is some kind of wiki about Balatro's entire UI thing

primal robin
#

Not sure is this will become true, but who knows

robust marsh
#

i genuinely struggled with the UI so fucking much

charred widget
#

ok now zygarde-10 is giving me trouble

#

so basically Zygarde-10 is supposed to create a Cell consumable card when you play a full house

#

but it just crashes the game instead

#

wait no i fixed it

#

ignore this

#

alright i have a different problem with zygarde-10 now

#

actually no, with the Cell cards it creates

#

here's the edition for Cell cards

#

the problem is the cell consumable is turning cards into foil cards, not cell cards

#

and i genuinely cannot figure out why

willow scroll
#

G.hand.highlighted[i]:set_edition({ foil = true }, true)
i think its this?

#

chance foil to your edition key

#

iirc

charred widget
#

where the hell is that in the code???

#

(rhetorical)

slim ferry
#

Why the fuck is joker forge code so wierd

#

Ive never looked at it before

charred widget
willow scroll
#

did you add the mod prefix?

charred widget
#

i may be stupid

willow scroll
#

and or normal edition prefix

#

i forgot if editions have those

slim ferry
#

Yeah they do

#

e_

charred widget
#

ok new crash just dropped

#

so what happens is when it detects 10 Cell-edition cards in the whole deck, it transforms into zygarde-50

#

and i had more than 10 cell cards in the deck

#

so i think it tried to transform but

#

couldnt

willow scroll
#

lets go i got back to where i had this but now instead of being entirely jank its actually its own object type and the ui just injects itselfs into existence

#

but it still jankily uses global mod calculate to actually function 😭

slim ferry
#

Just like vanilla code 🤷

charred widget
willow scroll
# slim ferry Just like vanilla code 🤷

raaah i want to be able to just put calculate = function(... into my object and have it work but i tried to read smods documentation for an hour or so and it turns out im stupid and i dont get it 😔

slim ferry
#

If it works it works

charred widget
#

so that's just smack dab in the middle of the code and i don't know what it's trying to do

slim ferry
#

I would just remove it and see if the crash changes at all

charred widget
#

ok

#

ok there's another undefined value

#

SMODS.add_card{set = 'item', soulable = undefined, key = 'c_legendar_cell', key_append = 'joker_forge_item'}

#

soulable = undefined

#

what does that mean

slim ferry
#

soulable is supposed to be true/false how the fuck did that get there

#

I would also just remove that

red flower
#

i mean that wont do anything if undefined is undefined

slim ferry
#

True

#

I suppose

charred widget
#

tbf it didn't crash my game when it was there

slim ferry
#

But why doesnt joker forge just use nil directly 😭

red flower
#

I don't think we should use jokerforge code as a base

slim ferry
#

Mayhaps

red flower
#

lol

charred widget
#

probably not lol

slim ferry
#

The using joker forge > debugging joker forge code > what the fuck is this dogshit code > coding from scratch moment

#

I kinda like joker forge for that though

#

It gets more people into mod development

charred widget
#

ok zygarde did transform but not completely

#

it created zygarde-50 but didn't destroy itself

willow scroll
#

day ruined

slim ferry
#

Also tbh i wish more people did flip card > set_ability > flip back for jokers transforming
It looks very clean

#

I just feel like most people dont know that set_ability can be used with and on any center in theory

#

Instead of just enhancements

red flower
#

i used to do it but i now i just do a wiggle

#

mainly because i have a lot of transformation effects

#

so it becomes annoying

slim ferry
#

Fair

#

At least i prefer set_ability over destroying self and creating next card

#

Because cool

red flower
#

yeah

charred widget
#

ok so if i want zygarde-10 to destroy itself when it transforms, should i use SMODS.destroy?

#

and then like destroy_joker or something

willow scroll
charred widget
#

i'm grasping for straws here because i can't find a "destroy self" code in the vanilla remade wiki section

red flower
#

it should be therr

#

there

charred widget
cursive gazelle
#

What are you trying to do exactly

charred widget
#

Zygarde-10 is trying to destroy itself after creating zygarde-50

#

as a "transformation"

cursive gazelle
#

Yeah just add smods.destroy_card after smods.add_card

cursive gazelle
#

Can i see the code

charred widget
cursive gazelle
#

A screenshot (i’m on phone )

charred widget
cursive gazelle
#

Starting from local count

cursive gazelle
#

This code is on life support no offense

charred widget
#

it was generated in joker forge i know it's abysmal dogshit

#

how tf did the devs fuck up the code generation that much

cursive gazelle
#

It’s probably txt

#

I mean you can fix it

#

Lol

charred widget
wintry solar
#

it's not fucked, it's just done in a way that is awful to read as a human

cursive gazelle
#

Try fixing the syntax errors first

modern kindle
# daring fern https://discord.com/channels/1116389027176787968/1233186615086813277/14115968911...

im sorry somethingi have no idea aside of just like, somehow retriggering the jokers calculate itself through the seal but i feel like thats far too messy

i know when i was originally messing with my calculate joker hook all of the aspects of specific jokers would retrigger (such as things like destruction rolls)

my brain would say if you could just read the ability or ability extra and see its values then just replicate them within the seal, but then again that value manipulation is tiresome

charred widget
#

i have almost 0 knowledge of any coding language

cursive gazelle
#

I’m glad you’re pushing through it honestly

#

You have my respect

#

But at least watch some youtube tutorials about lua

#

Nonetheless you can read vanillaremade wiki

#

It’s very simple

charred widget
#

well now it's saying i dont have a lua formatter installed when i literally do

cursive gazelle
#

Maybe it’s your workspace

#

Try changing it

charred widget
#

workspace???

cursive gazelle
#

Man

charred widget
#

i'm actually restarted

#

i know nothibng

cursive gazelle
#

😭

charred widget
#

valid reaction

cursive gazelle
#

Just google it it’s not a big deal

#

We all start from the 0 point

charred widget
#

ok from what i can tell idk what would be wrong with my workspace

#

i only have zygarde10.lua open

#

i don't know why it thinks i don't have a lua formatter

#

ok i'm actually considering restarting the entire development process for my mod from the beginning

#

just so it would make it easier for other people to help me

#

and would cause less public humiliation for me

#

and less secondhand embarrasment for everyone else

#

but at the same time i can;t

#

because it's all built on Jokerforge

#

and it handles everything else pretty well

#

it handles the textures well

#

and the base code is good

modern kindle
candid prism
#

uhh why is this displaying nil as the number?

daring fern
charred widget
daring fern
#

Also eechips should be a number.

modern kindle
candid prism
charred widget
#

alright i come to y'all with the most puzzling crash yet

#

it's trying to indext field 'ability'

#

but i looked in the code and there are NO instances of 'ability'

red flower
#

it's not from your file, it's from the smods files

#

it says that it's from destroy_cards

charred widget
#

so what do i do about this

red flower
#

what's the code

charred widget
red flower
#

destroy_cards takes a card object

#

not a key

#

so it would literally be SMODS.destroy_cards(card)

#

in this situation

charred widget
#

i think i get it

#

let me see if it changes anything

#

aaaaaaaaaaaaaand

#

it's a syntax error that i can't locate

errant arrow
#

how would i make my code check for higher than a certain number, but less than another?
-# ex: Greater than 50, less than or equal to 75

#

i currently have

if randomnumber <=75 and > 50 then

but i get hit with the error

brave blade
errant arrow
#

ah

brave blade
#

But if you are trying to make a chance-based effect, you should probably use the built-in probability system in SMODS

errant arrow
#

the pseudorandom? i have it

brave blade
#

Specifically SMODS.pseudorandom_probability()

#

You can read more about it here

GitHub

Main Notes

Added SMODS probability functions
Poker Hands visible property adjustments
Animation adjustments

certificate/marble
card juicing on conditional upgrades
level not updating when levelli...

errant arrow
#

im using randomnumber = pseudorandom("prefix_jokerkey", #, #)

brave blade
red flower
#

*only if you want your stuff affected by probability modifiers

#

if you actually need a random number then it's fine

brave blade
#

Oops yeah

errant arrow
brave blade
#

Sorry

red flower
#

because probability

charred widget
#

ok while you guys are here, could you help me figure out a syntax error that's evading me?

errant arrow
#

insert prowler goku meme

charred widget
red flower
#

also destroy_cards doesnt return anything

charred widget
red flower
#

see the part underlined in red?

#

it's wrong, remove it

charred widget
#

well that makes a different set of brackets turn red

red flower
#

you're missing parentheses in the event

#

these should be closed there

#

oh also add_event is missing some too

#

im sorry this code is kinda a mess lol

charred widget
#

it's straight from jokerforge, i only just now formatted it

#

so it's on me

red flower
#

use this other event earlier as a guide

charred widget
#

ok i did some stuff and i'm no longer seeing any red brackets

#

so i'll check if it's working

charred widget
red flower
#

post code again

charred widget
red flower
#

why are you doing the table with the key again

rocky plaza
# charred widget i literally can't figure this out for the life of me

so think about the event manager like the checkout line at a store
func by default represents what happens once an event reaches the "register", and if func returns true then the event is done at the register
so in N's event above once the event is "at the register", the function adds a card and resets the consumable buffer

charred widget
red flower
#

i would honestly recommend starting from scratch

#

this code is too convoluted for what it seems to be like a simple effect

charred widget
#

ok then

#

so the main function of Zygarde 10% is that it creates a Cell consumable when you play a Full House

daring fern
#

if context.scoring_name == "Full House"

charred widget
#

what prefixes do planet cards have

#

I found the add card function

#

and it says { key = "c_fool" }

#

does the "c" stand for Consumable?

daring fern
charred widget
#

so if I wanted to give an Earth instead, I would just replace the "fool" with "earth"?

#

it doesn't seem like the prefix would change

#

now the "if" at the beginning of the function is acting up

charred widget
daring fern
charred widget
#

where would i put that?

errant arrow
#

question, for doing exponent modifications and their message, can i do

return {
(insertmultandchipcalc),
mult_message = 'text',
chip_message = 'text'
}

and it would post the message when the exponent modifier plays?

daring fern
daring fern
errant arrow
#

Steamodded's wiki says otherwise though...

#

-# have to use my phone to access GitHub

charred widget
#

and thankfully balatro opened

#

but as soon as i tried to select the last card for a Full House, my game crashed

daring fern
charred widget
#

wait hold on

daring fern
charred widget
#

Okay, it technically works now

#

i just doesn't do what i want it to

#

when i select the full house, it creates 3 consumables

#

i want it to create 1 consumable one the full house is done scoring

daring fern
charred widget
#

ok thank you

#

ok next i want it to check if there are more than or equal to 10 cell cards after a blind is defeated.

#

you know what i'll come back at another time

errant arrow
#

What's the format for creating a joker?
-# as in at the end of a round, create joker

daring fern
errant arrow
#

Is "Joker" the key for the joker?

daring fern
errant arrow
#

I need it to make a specific joker.

#

this is the code

spark owl
errant arrow
#

peak as in based off peak game?

daring fern
winter flower
#

how do i get it so that a config option enables a set of jokers

daring fern
robust depot
#

so im new to making mods for balatro, is there a list of syntax cause im confused on what to put to make some things happen

#

specifically trying to make a joker retrigger itself

spark owl
wild escarp
#

How can I check for whenever a joker is destroyed or sold?

daring fern
unreal cosmos
#

i think steamodded is broken

#

balatro isnt booting with it

robust depot
#

how could one have a joker retrigger itself

daring fern
robust depot
#

ive def goobed something up cause its not working

daring fern
robust depot
#

what do you mean?

hallow slate
#

How do I juice up the UI

wild escarp
#

How could I make cards appear in other vanilla packs? Like black hole and the soul.

daring fern
daring fern
robust depot
#

dawg ngl i forgot joker retriggers arnt vanilla

#

well it works after that so major W

robust depot
daring fern
robust depot
#

So it’s checking other_card as itself and going from there?

robust depot
#

Ok so it’s saying context.other_card(what’s being affected) == card(itself)

frosty rampart
#

context.retrigger_joker_check is true every time any joker triggers. you want to see if the joker currently triggering (i.e. context.other_card) is the same as the joker running the calculate code (i.e. card), because you want the joker to only retrigger itself

daring fern
azure laurel
#

someone can give me an example of how works "G.GAME[key:lower() .. '_rate']" for custom consumable types. what is lower, why there is a (), why there is inside []?

azure laurel
maiden kindle
#

crack pot behavior

spark owl
daring fern
maiden kindle
#

This mod’s non serious

maiden kindle
spark owl
maiden kindle
#

That’s all I gotta share grabber

spark owl
#

I fear those who know code…

#

Because they do be making some crazy ass shit…

maiden kindle
#

Aight im off. Be back with more crackpot stuff tomorrow

#

-# maybe

spark owl
#

Byebye….

#

I guess….

clear ocean
#

is 80 chips good or should i do something like 8 mult as well or would that make it uncommon this is the joker of my mod just a starter

#

which one is better i could make it where the mult is for like the last hand or something

feral tree
#

what does key_append do?

daring fern
clear ocean
#

or is a static 80 chips and 8 mult okay for a common

frosty rampart
#

scholar is common and can pretty consistently give +40 Chips +8 Mult

jolly shadow
#

if it was scaling or it triggered multiple times it mightve been unc

clear ocean
#

It might be unc…

feral tree
#

How can i tell what the key of base jokers are?

feral tree
#

thx

#

how do i remove a joker from the shop?

daring fern
dreamy lodge
#

Why is it G.consumeables and not G.consumables? is it just a balatro code misspelling or is there some other reason?

umbral zodiac
#

but if someone were to fix it itd cause infinitely more issues than the convenience of it being spelled right

dreamy lodge
#

xD

slim ferry
#

caino type shit

robust depot
#

new issue, could be related to the old one. probably is

daring fern
robust depot
#

well it loaded, but then crashed when i hovered over the joker

daring fern
#

Also card.ability.extra.mult doesn't exist.

robust depot
#

it was working before i tried to add probability into it

robust marsh
#

typo, it happens jimbo_spin

robust depot
#

dawg the guide had that mispelled lol

daring fern
robust marsh
#

oh? I thought he declared them mb

#

On mobile rn

robust depot
#

this is bringing back bad memories of AP comp sci

robust depot
daring fern
robust marsh
#

you can probably take a look at how the lucky cards do it in vanillaremade if you're confused. I used that for one of my jokers

robust depot
#

im guessing not like this

slim ferry
#

besides other_value not existing

daring fern
slim ferry
#

right

#

i forgot

robust depot
slim ferry
#

you use the variable that you defined in your joker config

daring fern
slim ferry
#

also yeah loc_vars is pointless if youre just not going to use them anyway

robust depot
slim ferry
#

fym

#

no they arent

#

?

#

loc_vars are for the description

#

they pass the joker variables into the joker description

robust depot
#

yea i need that to update the chance

slim ferry
#

okay

robust marsh
#

I'm at school so I can't really check for myself rn but it's possible to patch the joker area so it doesn't score if its states.visible is false, at least I'd assume

#

right?

robust marsh
robust depot
#

how in tarnation is numerator nil

slim ferry
#

because it doesnt exist

#

there is no variable called that

#

you also need to put actual numbers in the pseudorandom roll

robust depot
#

does the numerator in my config area not define it

#

where does one define it properly

slim ferry
#

not just numerator

frosty rampart
#

whenever you define a variable in the config -> extra table, you must use it as card.ability.extra.[variable]

daring fern
frosty rampart
#

yes
and i specified in the extra table

robust depot
#

i did that and now this has shown up

daring fern
robust depot
#

oh never mind im an idiot

#

ignore me

#

new trouble brewed

robust marsh
#

comma award

robust depot
#

wait did i miss a comma

robust marsh
daring fern
manic rune
robust depot
#

how does one make that exist, where would it go.

daring fern
robust depot
#

back to this one

robust marsh
#

should also add extra since card.ability.numerator doesn't exist. Should be card.ability.extra.numerator no?

#

same for denominator

queen meadow
#

is there a check for when a card is debuffed? i want to do something similar to steel joker but for debuffed playing cards.

daring fern
queen meadow
#

damn 💔

robust depot
#

uhhh this is new

daring fern
robust depot
#

but earlier i had to remove context

#

or should i have kept one in specific.

daring fern
robust depot
#

now were back to this one

daring fern
robust depot
robust marsh
daring fern
robust depot
#

so this

#

if context.card.ability.extra.numerator >= 5 then

red flower
#

remove the context from these

robust depot
#

dawg were going in circles

red flower
#

no we're not

robust depot
#

if i do that its gonna overflow

red flower
#

thats another different problem

#

the probability check needs to be inside a context check

#

so like

if context.retrigger_joker_check then
  if SMODS.pseudorandom_probability(...) then
  end
end
robust depot
#

still overflew : (

red flower
#

whats the code

robust depot
#

ok i tried having both the rng things inside the retrigger check and it worked

#

playing the hand broke it tho

#

but now it loads into the ante

red flower
#

you still have context.card
...

robust depot
#

oh wait that did it

#

i was so confused on the context.

#

i added it and removed it like 8 times

#

ok but now it doesnt retrigger at all

#

even with 3 oops's

daring fern
robust depot
#

probs the math i rushed it

daring fern
robust depot
#

but with 3 oops it would be 6 right

#

or are they not interacting

daring fern
robust depot
#

now this is just confusing, ive been tinkering with the code looking at bloodstones. But this is nowhere near what i was touching?

true jasper
robust depot
#

oh yea i did remove alot of lines i def forgot to remove some of those