#💻・modding-dev

1 messages · Page 219 of 1

simple mural
frosty dock
#

they exist because the vanilla function sucks

glad osprey
#

thats just what big smods want you to do

modern kindle
#

is there a reliable way to add specific types of cards to display in poker hand example?

ie, gold cards, stone, steel

simple mural
#

I don't understand

bold sleet
#

Now where do I get to learn how to use the new bs?

frosty dock
frosty dock
gleaming zealot
#

SMODS.Aure:take_ownership

long urchin
#

@dreamy thunder ok first step is done: the description

#

lol

frosty dock
frosty dock
dreamy thunder
#

🙏

simple mural
gleaming zealot
frosty dock
simple mural
stiff locust
#

how can I access values stored inside an enhancement from a joker

simple mural
#

oh it was disabled

frosty dock
#

duh

stiff locust
#

tried printing out a playing card to figure out the path and it didn't help

long urchin
#

where do i find the contexts

stiff locust
#

might not be up to date with better calc

#

but that just means it is missing main_eval and main_scoring

#

and some other stuff

maiden phoenix
bold sleet
#

I will always wonder where the fuck do the values I return go...

simple mural
frosty dock
bold sleet
#

uh...

frosty dock
bold sleet
#

Thanks, I guess? (I mean, it did answer my question but uh...)

frosty dock
#

they're supposed to be 1x and 2x, not x1 and x2

frosty dock
simple mural
frosty dock
#

it basically goes through keys in the returned table in a specified order and applies the defined effect for each

simple mural
#

I see my joker in the collection now

bold sleet
#

found this

#

Which uh...

#

Time to guess where the fuck 'calculated' goes, yay!

simple mural
#

I need... to copy the calculate function from the vanilla bull jokers...

woven turtle
#

anyone know where in the base game the "label" ui gets handled?

frosty dock
bold sleet
#

wahoo

#

found uh...

#

^ clueless dumbass right here

#

*probaly shouldn't be doing this at midnight

frosty dock
#

i mean it goes on, that's just handling the effect for chips

long urchin
#

in the function

lyric wadi
bold sleet
rose dragon
lyric wadi
#

card, the variable, as card, the object

bold sleet
long urchin
#

so then like

old bane
#

does G.GAME store the current played hand?

long urchin
#

if im making something that triggers at the end of the round do i include it

frosty dock
#

it's needed in vanilla scoring calculation in some places

#

with smods you don't ever need to include it

long urchin
#

ok so im not calculating score

onyx sonnet
#

Im trying to create a random playing card with equal chance for all seals, editions, enhancements and lack thereof but instead of the card being added to the deck it gets created on the screen and it kinda just stays there?

long urchin
#

alright

bold sleet
frosty dock
#

card = card just isn't needed with smods

bold sleet
#

sounds funny, tho

long urchin
#

ok so additionally

frosty dock
#

yeah but it does nothing

bold sleet
#

card = card "no shit!"

long urchin
#

whens the context for like

#

when you buy it

#

or obtain it in general

lyric wadi
#

uhh

frosty dock
#

that is not a context

onyx sonnet
#

thats an smods function

long urchin
#

fuck

frosty dock
#

it's a separate function, add_to_deck

bold sleet
long urchin
#

ah ok ok

#

ty

lyric wadi
#

hey chat

bold sleet
#

It works for me.

frosty dock
bold sleet
simple mural
#

@frosty dock What do I need to copy a calculation function?

lyric wadi
#

im gonna going into bad territory here

#

how do i blueprint

bold sleet
bold sleet
lyric wadi
#

how to code blueprint

bold sleet
#

-# fuck no idea on that one

frosty dock
lyric wadi
#

i want to make Redprint real

frosty dock
#

it will be reset as soon as set_cost is called on the card

bold sleet
#
print()
lyric wadi
#

and also preferably Green Needle

bold sleet
frosty dock
#

you should set card.ability.extra_value to modify sell cost

bold sleet
#

It has to be a fixed value, always.

frosty dock
#

the other effect is that it resets when the card gets undebuffed

frosty dock
long urchin
#

whats the default sell cost

frosty dock
lyric wadi
#

half of buy cost rounded down

bold sleet
lyric wadi
#

not accounting for editions

frosty dock
#

fg_common?

frosty dock
bold sleet
lyric wadi
#

no i just meant that i have not account for editions yet

frosty dock
#

common but common, huh.

long urchin
bold sleet
lyric wadi
#

is this paralell universe content

frosty dock
long urchin
#

alright

#

so then

simple mural
long urchin
#

if i want the sell cost to be -100 then its card.ability.extra_value = -101

#

right

frosty dock
#

yeah

long urchin
#

alright

#

cool beans

sonic cedar
#

For some reason my Debug Menu doesnt pull up when i hold Tab? I have version 1.3.1, but does anyone know if it's a version issue?

long urchin
#

so whats the command to add money

frosty dock
#

do you have anything else messing with debug mode status?

lyric wadi
#

ease_money() i think

#

lemme check

red flower
#

ease_dollars

frosty dock
#

ease_dollars

sonic cedar
lyric wadi
#

ease_dollars

#

yeah

old bane
#

lets goooo (ignore the blind chip i haven't made art yet)

mellow sable
#

UI design is my passion

simple mural
long urchin
#

ease_dollars 100, would add 100 dollars correct?

frosty dock
frosty dock
long urchin
#

mk

#

thanx

lyric wadi
#

how do i blueprint

frosty dock
#

SMODS.blueprint_effect (i love undocumented functions

lyric wadi
long urchin
#

whatd i fuck up help

lyric wadi
#

is there an example i can look

simple mural
frosty dock
# lyric wadi undocumented :dismay: how do i use it
local ret = SMODS.blueprint_effect(card, blueprint_card, context)
if ret then
  -- SMODS.calculate_effect(ret, card) -- use this if you need to do other things afterwards
  return ret -- use this if you're copying a single joker
end
old bane
#

i know G.GAME.last_hand_played gets the last hand played, but does it work for the current hand? and if not is there na equivalent

frosty dock
edgy reef
lyric wadi
#

ok so that's blueprint function that defaults to right card like blueprint right

edgy reef
#

ah it was added 6 days ago makes sense

lyric wadi
#

how do i define which card it should copy

#

like if i want to make Redprint

frosty dock
simple mural
lyric wadi
#

oki

long urchin
#

why are they shaped weird

lyric wadi
#

so im assuming

bold sleet
#

what is up with that hand

frosty dock
# sonic cedar

not using windows search 😭 that does not look for file contents

lyric wadi
#

i first grab a list of jokers held

frosty dock
#

i mean vscode search

lyric wadi
#

i check where blueprint is

#

and then i offset its index to get the card i want to copy

#

or something

stiff locust
#

what if there's two blueprint

onyx sonnet
frosty dock
long urchin
#

is that normal with cards that use add_to_deck

gleaming zealot
frosty dock
simple mural
long urchin
#

oh wait no it just

#

doesnt work

#

the sell value is $1 it should be $-100

#
        add_to_deck = function(self,card,from_debuff)
            card.ability.extra_value = -101,
            ease_dollars(100)
        end
    end```
#

why doesnt this give me 100 dollars and set the sell to -100 dollars

red flower
#

after setting the extra_value try calling card:set_cost()

frosty dock
#

what you are doing is this

long urchin
#

cuz

red flower
#

lmao

frosty dock
#

you're creating a global function called add_to_deck when calculate is called

long urchin
#

the tutorial do it

frosty dock
#

nah

#

the tutorial puts those next to each other

#

not inside each other

long urchin
#

tutorial did it tho?

frosty dock
long urchin
#

i

#

iunno man

#

i may be stupid

frosty dock
#

that's because it isn't

long urchin
#

i was just told to replace if context.joker.main with add_to_deck = function(self,card,from_debuff)

frosty dock
#
calculate = function(self, card, context)
  -- ...
end,
add_to_deck = function(self, card, from_debuff)
  -- ...
end,
long urchin
#

ok ok so

#

i get it now

#

wheres the copypasta

manic rune
#

https://github.com/Steamodded/smods/wiki/Your-First-Mod
this should give you some instructions
https://www.youtube.com/watch?v=Zp-4U5TlbxY&t=7s
the video is a bit oudated, but generally does well at telling you what to do
-# (note: there are some parts in the video where they called cards "center". don't do that, it's a bad practice, they are cards)
https://github.com/Steamodded/examples/blob/master/Mods/EditionExamples/EditionExamples.lua
its a good practice to check out the example mods, as well as other mods too for reference
https://github.com/Steamodded/smods/wiki/calculate_functions
on top of that, remember to read the documentation

GitHub

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

STEAMODDED 1.0.0
A tutorial on how to make a modded Joker.

https://github.com/art-muncher/Example-Mod -- EXAMPLE MOD
https://github.com/Steamopollys/Steamodded -- STEAMODDED
https://github.com/WilsontheWolf/DebugPlus -- DEBUGPLUS
-----------------------------------------------------...

▶ Play video
GitHub

Steamodded example mods. Contribute to Steamodded/examples development by creating an account on GitHub.

GitHub

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

#

:3

long urchin
#

there it is

obtuse bronze
#

anyone know if its possible to give wee joker a different texture than what jimbo uses?

stiff locust
#

no

#

wee joker is scaled down jimbo

long urchin
stiff locust
#

well, unless you take_ownership of wee joker

frosty dock
#

sends a link to the documentation
on top of that, remember to read the documentation

stiff locust
#

in which case you could override its atlas

manic rune
#

...i mean, i gotta make sure they know where the documentation is

#

:3

plush cove
stiff locust
#

anyone know why a modded seal's label would show up as ERROR

obtuse bronze
#

wondering if its worth the effort to do that or just leave wee joker as is (<- making a texuture pack)

manic rune
#

cant forget the documentation

stiff locust
#

ive made 2 seals so far and one of them has this problem and the other does not

red flower
stiff locust
#

and yet they both use almost identical code and localization

frosty dock
stiff locust
#

i literally copy pasted it and only changed the strings so im very confused by this

frosty dock
#

you got this?

long urchin
stiff locust
#

i do have the label section

#

it simply does not work for the 2nd seal, only for the 1st

plush cove
frosty dock
#

does it use the correct key?

stiff locust
#

yep

#

the rest of the localization works as expected

long urchin
red flower
stiff locust
#

and its info queue shows up properly on the corresponding spectral card

long urchin
#

ah ok

frosty dock
#

can i see

old bane
#

wiggles don't work for modded blinds for some reason >_<

manic rune
#

wiggles?

#

do you mean 🧃

long urchin
#

does debugplus have a way to restart the game so i can reload my lua when i make a change?

manic rune
#

hold M

long urchin
#

ty

manic rune
#

but I think its a smods thing

stiff locust
# frosty dock can i see

not the exact code (i dont wanna show it) but it's literally this with the key and strings swapped out and both seals do this, it is in the Other set as expected

["pref_placeholder_seal"] = {
                ["label"] = "Seal Name",
                ["name"] = "Seal Name",
                ["text"] = {
                    "Seal {C:attention}Effect",
                    "{C:inactive}(must have room)",
                },
            },
manic rune
#

not just debug.plus

frosty dock
old bane
#

okay

stiff locust
#

ohh my god

#

I

#

yeah

#

I forgot about that

#

the other one is in misc.labels but this one isn't

#

also is there an easy way to apply the gold seal shader to a modded seal

long urchin
rose dragon
#

how can i remove an edition from a joker/playing card?

red flower
long urchin
#
        card.ability.extra_value = -101,
        card:set_cost(-100)
        ease_dollars(100)
    end,```
#

i tried it with just card:set_cost) aswell without the -100

red flower
#

it's weird that the comma didn't throw a syntax error

old bane
#

would a card without an edition return nil if card:get_edition() was called?

long urchin
#

oh my god i didnt even notice

#

adding the comma didnt fix

red flower
#

oh my problem was that you had an extra comma, not that you were missing one lol

sonic cedar
long urchin
#

wait whar

frosty dock
long urchin
#

the -101 isnt supposed to have a comma?????

red flower
#

no

long urchin
#

why?????????

red flower
#

lua

sonic cedar
long urchin
#

luas rules do not make sense

frosty dock
long urchin
#

IT WORKS

red flower
#

yeah i imagined

long urchin
#

YIPPEEEEE

old bane
#

yippeeeee

sonic cedar
#

hooooooooray

long urchin
#

@dreamy thunder yo check it

#

i got the sell to work

#

you can make it sellable now :)

sonic cedar
sonic cedar
sacred lily
#

for some reason this is triggered by every single hand i play, not just flushes and straight flushes

#

what have i done wrong here?

long urchin
#

not or?

manic rune
#

context.poker_hands["Flush"] or context.poker_hands["Straight Flush"]

long urchin
#

oh

manic rune
#

shouldnt it be that

long urchin
#

nvm iunno lua like that lol

manic rune
#

im dumb tho so maybe they r the same :3

sonic cedar
sacred lily
#

ok

simple mural
sonic cedar
#

you could say there would be

#

development tomorrow

long urchin
#

so i have a question about this code:
if i were to find an edition of this card would it throw off the sell value or is it still 100?

        card.ability.extra_value = -101
        card:set_cost(-100)
        ease_dollars(100)
    end,```
manic rune
#

development resumes tomorrow, some may say...

sacred lily
long urchin
manic rune
#

oh yeah

#

shouldnt there be next before the context.poker_hands stuff?

#

i saw it being used for this before

red flower
#

yeah poker_hands start as an empty table iirc

sacred lily
#

thanks that fixed it

manic rune
#

next(context.poker_hands["Flush"]) or next(context.poker_hands["Straight Flush"])

#

probably that

#

oh, nice

long urchin
# red flower it will be higher

ok how do i account for that is there a variable for the current sell value that i can do a calc with, like something like this (hypothetically)

        card.ability.extra_value = -100 - card.sell
        card:set_cost(-100 - card.sell)
        ease_dollars(100)
    end,```
sacred lily
#

now the thing is pretty much done except tfor the art

long urchin
#

(card.sell isnt real probably)

red flower
long urchin
#

oh

frosty dock
#

card.sell_cost, not card.sell

red flower
#

you can change card.sell_cost directly but that might get ruined if set_cost is called again
personally I hook set_cost for this

long urchin
#

but i did get close lol

frosty dock
frosty dock
sonic cedar
#

ahhh i see

frosty dock
red flower
sacred lily
#

yeah the issue has been fixed earlier but thank you

sonic cedar
#

does this not work

frosty dock
frosty dock
#

unlocked, discovered and no_collection should be outside of config

#

and extra should not be inside of another table inside config

sonic cedar
#

why are they in the config section on the wiki though?

long urchin
#

is this because i am switching the edition with debugplus or does my code not work :V

frosty dock
sonic cedar
#

regardless ill fix

frosty dock
#

these are all separate parameters

long urchin
#

im assuming its the debugplus since it happened not when i added it to my deck but after, but how do i add an edition version without doing that?

frosty dock
#

you can tell by how they're not inside of config

#

(also there's a reference link in case you're confused-)

sonic cedar
#

(mb)

long urchin
#

how do i spawn an edition of a joker in debugplus without having to change it AFTER i get the card

frosty dock
#

eval SMODS.add_card { key = 'j_modprefix_key', edition = 'e_polychrome' }

sonic cedar
#

and obv modprefix is your mod's prefix, and key is your joker's key

red flower
#

and j stands for joker

long urchin
frosty dock
#

then it's not the right key

sonic cedar
long urchin
#

thats the prefix in the json, right?

#

(i dont know why the eyebleeding text is their either)

sonic cedar
#

your MOD's prefix is in your metadata file

#

wait this is it

long urchin
#

metadata file

#

what the fuck is that

sonic cedar
#

nvm nvm im blind

long urchin
#

ok ok

#

i got so scared

sonic cedar
#

your id is banker

#

so put banker

frosty dock
#

no it's the prefix

#

which is indeed bank

sonic cedar
#

why did i look at the id

frosty dock
#

show the joker code

long urchin
#
    key = 'Banker',
    path = 'Banker.png',
    px = 71,
    py = 95
}

SMODS.Joker{
    key = 'bank',
    loc_txt = {
        name = 'Banker Joker',
        text = {
            'Gives a {C:attention}loan{} of {C:money}$100{}.',
            'Lose {C:money}$5{} at end of round',
            'until {C:attention}loan{} is paid back.',
            '{C:inactive}(currently {}{C:money}$#1#{}{C:inactive} owed){}'
        }
    },
    atlas = 'Banker',
    pos = {x = 0, y = 0},
    config = { extra = {
            money = 100
        }
    },
    loc_vars = function(self,info_queue,card)
        return {vars = {card.ability.extra.money}}
    end,
    add_to_deck = function(self,card,from_debuff)
        card.ability.extra_value = -100 - card.sell_cost
        card:set_cost()
        ease_dollars(100)
    end,
    calculate = function(self,card,context)
        
    end
}```
frosty dock
#

the joker key is bank

#

not Banker

long urchin
#

oh

frosty dock
#

that is the atlas key

long urchin
#

i oughtta change that

sonic cedar
#

so you would do j_bank_bank

#

that could get confusing oh wow

long urchin
#

yeah

#

so i reloaded the game and changed the key to banker

#

fuck

#

it didnt work

frosty dock
#

... in that order?

#

(also it's case sensitive)

long urchin
#

i feel stupid

frosty dock
long urchin
#

is it j_banker_bank and not the other way around

frosty dock
#

no

long urchin
#

oh

sonic cedar
#

did you change then reload or reload then change

long urchin
#

change then reload

frosty dock
#

and did you save the file?

long urchin
#

but ill reload again

long urchin
spring lantern
long urchin
#

yeah its the same error after the second reload

#

:V

frosty dock
#

can you find it in the collection and do

#

eval dp.hovered.config.center.key

spring lantern
#

ive created 2 mods in the last month now im out here looking for ideas for a third one i think im a bit hyperfixated

rose dragon
quartz ravine
#

set_edition(nil)

#

Here is the docs for it btw

long urchin
#

WHAT

quartz ravine
long urchin
#

WHYS IT XMPL

#

oh

#

i forgot to get rid of the old header

frosty dock
#

💀

long urchin
quartz ravine
spring lantern
#

my god

#

it's perfect

quartz ravine
#

And yoshi's weird noise from Super Mario World 2

long urchin
#

like the card isnt in the collection

spring lantern
#

check your json

frosty dock
#

you copied from the explanation

#

comments aren't allowed

#

there are also no trailing commas in json

spring lantern
#

and also it should have the same name as the mod's root folder

#

i'm seeing a main.json up there lul

long urchin
#

oh

#

duh doi

frosty dock
#

not really, the name ain't matter

spring lantern
#

really

long urchin
#

wait really

spring lantern
#

good to know

frosty dock
#

it can be anything

spring lantern
#

thought it did

frosty dock
#

nope

spring lantern
#

i have been misinformed

#

you know what im making a new consumable type

rapid stag
#

i don't understand. how are all of you adding tooltips so easily and yet when i try, all i get is errors

spring lantern
#

thats definitely never been done before

long urchin
frosty dock
#

neither of these dependencies do anything btw

spring lantern
#

le comma trailed

frosty dock
#

if you're gonna set a steamodded dependency, use the version you developed on

long urchin
#

ok NOW fixed

glad osprey
plush cove
plush cove
#

except the last one

long urchin
#

WHAT

#

YOU SAID NO TRAILING COMMAS

spring lantern
#

commas after every item except the last one

long urchin
#

wait

frosty dock
#

trailing commas means commas at the end of the object

long urchin
#

oh...

frosty dock
#

not between stuff

long urchin
#

i may be stupid......

spring lantern
#

oops

rapid stag
#

please help me. i am at my wits end with these ridiculous tooltips

long urchin
#

this didnt fix it

#

WAIT

rapid stag
#

cirDerp i swear, if that's it i'm gonna scream, how did i not see that. thank you

long urchin
#

trailing comma

spring lantern
#

rip

long urchin
#

ok its still not fixed

    "id": "banker",
    "author": ["maxx"],
    "description": "check this shit out",
    "prefix": "bank",
    "main_file": "main.lua",
    "priority": 0,
    "badge_colour": "666665",
    "badge_text_colour": "FFFFFF",
    "display_name": "Banker Joker",
    "version": "1.0.0"
}```
spring lantern
#

does it still not show up

long urchin
#

nope

spring lantern
#

is the mod enabled

long urchin
#

yerp

frosty dock
long urchin
#

youre like a godsend john youre so good at debugging all of this 😭

sonic cedar
#

where would i start with a dynamic description?
like the joker’s text is different depending on either it’s in the shop or something versus you have it in your jokers….area….thing….

long urchin
#

how did you learn all of this so well

vale lake
#

does anyone know why this isn't giving Xmult? x_mult and x_mult_mod both aren't working here for some reason

#

the message works fine though

frosty dock
spring lantern
long urchin
vale lake
#

I don't think so

spring lantern
#

wait yeah

long urchin
#

the tutorial i watched does think so :V

frosty dock
spring lantern
#

it's Xmult

long urchin
#

and it worked in the tut

frosty dock
long urchin
#

oh is it

sonic cedar
spring lantern
#

i mean yeah Xmult_mod isn't in use anymore

rapid stag
vale lake
#

I was going to say because I checked both baseball card and the SMODs version of observatory to double check

frosty dock
frosty dock
long urchin
#

ohh

spring lantern
#

what the fuck

long urchin
#

weird

spring lantern
#

i know nothing

vale lake
frosty dock
vale lake
spring lantern
#

uoh

long urchin
#

point and laugh

#

/nsrs

sonic cedar
#

is gray a valid color actually

frosty dock
vale lake
#

yeah that's why I'm confused

long urchin
sonic cedar
#

im trying to get that OTHER gray that's not inactive

long urchin
#

ok

frosty dock
#

that's not a thing

sonic cedar
#

maybe it was modded then

frosty dock
vale lake
#

yeah

#

again the message works

#

and it juices up the joker

#

just not the x mult

frosty dock
#

but {C:gray} isn't a thing

sonic cedar
vale lake
#

you can always define it yourself though

#

just replace 'Gamer' with the name of the color and the hex code with the color you want

sonic cedar
#

oooo-

#

where would this go

#

main file?

frosty dock
#

doesn't matter

#

preferably not nested inside anything else though

simple mural
#

I made my first joker

frosty dock
sonic cedar
long urchin
#

would something else disable it?

simple mural
unkempt thicket
#

Where does this go in a localization file?

vale lake
sonic cedar
# vale lake

what's the 'red' for? i change that too right?

vale lake
#

I think it's just for initializing the color thing

#

don't change it

#

it doesn't actually do anything

frosty dock
long urchin
#

maybe the code is being mean

sonic cedar
#

got it thanks you two

long urchin
#

it might just be picky

#

and annoying

frosty dock
#

like i said smods doesn't care and definitely recognizes x_mult

long urchin
#

but like

#

what if

vale lake
#

tried it, didn't work

long urchin
#

alr

vale lake
#

let me see if regular mult and chips work

#

nope

#

at least chips doesn't

long urchin
#

then is it a problem with the return function that message is bypassing?

sonic cedar
#

does color changing work on the NAME of a Joker?

frosty dock
#

... that's cursed

long urchin
#

i dont see why not

#

try it

vale lake
#

it was already not working before I added it

long urchin
#

hm

#

then

distant grove
#

if im using different pngs

#

for the sprites

frosty dock
#

sanity check, does Xmult_mod work?

distant grove
#

what do i put for the path and atlas?

long urchin
#

yeah try calling it somewhere else maybe

vale lake
long urchin
#

wuh oh

frosty dock
vale lake
#

yes

#

which is even weirder

frosty dock
#

(Xmult_mod only gives xmult, no message)

#

are you sure it didn't change the mult

vale lake
#

yes

#

I double checked

#

it goes from 1 straight to 5 (I'm testing on plasma deck)

frosty dock
#

do you still have a message

vale lake
#

yes

#

and it still juices the card

long urchin
#

have you tried a salt circle

sacred lily
#

I’ve noticed that the “random” number my joker triggers is the same for every hand and only changes per seed

frosty dock
#

and on the message, the mult does not change

sonic cedar
sacred lily
#

can it be made truly random? so it changes every turn?

vale lake
vale lake
frosty dock
#

okay something isn't adding up

#

is baseball card actually changing mult?

#

or does it just say that it does

vale lake
#

I can check rq but I think it was

frosty dock
#

because there is literally no difference

distant grove
#

nvm my problem is fixed

#

yay

vale lake
#

yeah

#

wait what

long urchin
#

is there a problem with calling the function? since baseball card is built into the game but this is a separate file maybe

vale lake
#

oh

#

you have to be fucking kidding me

#

I just realized the problem

long urchin
#

what

vale lake
#

I kept continuing the same run

long urchin
#

YOU WERENT RESETTING?????

vale lake
#

and since card variables persist between runs it didn't update the card's xmult

frosty dock
#

okay that's enough of y'all for tonight

#

i have to go to sleep

long urchin
#

good night john

frosty dock
#

i can't take any more of this

sonic cedar
#

get good rest 😭

vale lake
#

I'm so sorry aure, get some rest

long urchin
#

i still dont know why my mod isnt showing up :(

frosty dock
#

guys don't 😭 me

#

it's literally 2am

vale lake
long urchin
sonic cedar
#

it was a pity 😭

long urchin
vale lake
#

do you have a json file? if so post it

long urchin
#
    "id": "banker",
    "author": ["maxx"],
    "description": "check this shit out",
    "prefix": "bank",
    "main_file": "main.lua",
    "priority": 0,
    "badge_colour": "666665",
    "badge_text_colour": "FFFFFF",
    "display_name": "Banker Joker",
    "version": "1.0.0"
}```
frosty dock
long urchin
#

shut up :(

#

lol

frosty dock
#

i'm just asking

long urchin
#

oh i was saying it being 2am was a skill issue

latent portal
#

hi

#

im having

long urchin
#

i thought you were turning it around on me

latent portal
#

problems

long urchin
#

whats the problem :3

sonic cedar
#

hi having problems

frosty dock
latent portal
#

so

frosty dock
#

🤫

long urchin
#

oh lol

latent portal
#

im trying to add some new jokers to the game

#

and i made a custom challenge to test them

#

but when i go to play it

#

the game crashes because "center is a nil value"

frosty dock
#

before i get myself into more tech support, i shall vanish

latent portal
#

i suspect that the issue lies in my joker's code

long urchin
vale lake
latent portal
frosty dock
vale lake
#

that's probably required

latent portal
#

that's a thing

tall apex
#

this is a chat????

long urchin
tall apex
#

based asf

vale lake
#

just add like
"name": "The mod",
and see if it works

sonic cedar
long urchin
# vale lake long shot but it doesn't have a "name" section
    "id": "banker",
    "author": ["maxx"],
    "description": "check this shit out",
    "prefix": "bank",
    "main_file": "main.lua",
    "priority": 0,
    "badge_colour": "666665",
    "badge_text_colour": "FFFFFF",
    "display_name": "Banker Joker",
    "version": "1.0.0",
    "name":"funny 2"
}``` so this
vale lake
#

yeah

sonic cedar
#

yeah i was gonna say you’re missing name

vale lake
#

bye aure, sorry for causing you distress with my stupidity lmao

long urchin
#

its showing up and is called funny 2 i may just be stupid and forgot the name part

#

thats awesome

vale lake
#

happens to the best of us

sonic cedar
#

it will happen again

#

inevitable

vale lake
#

I would be a very power person if I had a dollar for everytime I forgot a "then", "end", or "do" in my lua code

long urchin
#

no delirium you dont understand

#

theres a hole in my brain

tall apex
long urchin
#

brb

#

i did the opposite

tall apex
#

where do people put the atlas usually?

vale lake
#

I think I just type too fast for my own good

simple mural
latent portal
#

so good news is my joker doesnt crash the game

#

bad news is it also doesnt do... much of anything

simple mural
tall apex
vale lake
#

unless your mod also adds more cards that change probabilities

simple mural
latent portal
#

This is the code for my joker. I'm trying to make it so that it grants +22 Mult if all played cards are suitless. Did I do somehting wrong here?

        if context.final_scoring_step and context.cardarea == G.play then
            for _, v in ipairs(G.play) do --For each card in played hand...
                    if not SMODS.has_no_suit(v) then
                    return --Returns nothing if card has a suit
                    else
                    --Continues if card is suitless    
                    end
                    return {
                        mult_mod = card.ability.extra.mult,
                        message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } }
                    }
            end
        end
    end
}```
vale lake
#

why are you using final_scoring_step?

latent portal
#

I'm not supposed to?

vale lake
#

only for certain situations

latent portal
#

Fair

vale lake
#

like plasma deck balacing your hand

latent portal
#

Should I use joker_main instead then?

vale lake
#

yeah

#

not sure if that's the issue but it's just a good thing to do

#

actually it might be

#

idk

#

final_scoring_step is weird

latent portal
#

Still nothing.

vale lake
#

oh

latent portal
#

Is G.play the right thing to reference?

vale lake
#

context.cardarea won't G.play

#

yeah

#

just do context.joker_main

#

you don't need context.cardarea here

latent portal
#

ah okay

simple mural
latent portal
#

Still nothing.

simple mural
#

Too unbalanced?

vale lake
#

maybe

tall apex
#

hey question goobers

vale lake
#

I think the main issue is that probabilities can only be affected by one joker

tall apex
#

im trying to put my joker descriptions in localization but this says its a null value

vale lake
#

if you want to do something that gives mult for it, you would probably need to add more stuff to raise them

tall apex
#

i swear i like set a key tho

simple mural
vale lake
#

it's easier to examine with syntax highlighting

latent portal
#

is for _, v in ipairs(G.play) do correct?

#

I think the issue lies there

vale lake
#

yeah

latent portal
#

I'm not really familiar with pairs and ipairs

vale lake
#

what you would want to do in this situation

#

is loop through the entire hand

#

with for i=1, #G.play.cards do

#

actually first you would want a local variable called hasnosuits

#

and you set it to true

distant grove
#

how do you do per discarded card?

vale lake
#

and in the loop if it has a suit

#

then set it to false

latent portal
#

it's easier to exit if you find a card with a suit

#

and then put the actual return after

vale lake
#

yeah

#

that's what I'm saying

#

you put the actual returning in the loop itself which isn't correct

tall apex
#

uh.h,,

#

any help for me? :c

simple mural
#

For example: money -> probabilities, chips -> xmult

vale lake
#
    if context.joker_main then
        local hasnosuit = true
        for i=1, #G.play.cards do --For each card in played hand...
            if not SMODS.has_no_suit(G.play.cards[i]) then
                hasnosuit = false
                break
            end
        end
        
        if hasnosuit then
            return {
                mult_mod = card.ability.extra.mult,
                message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } }
            }
        end
    end
end```
#

something like this would work

latent portal
#

oh

#

i forgot to update the v

#

thank you

vale lake
#

no problem

vale lake
#

as long as there are more jokers that give you more opportunities to increase your probabilities it's a good card

#

though I would say they should probably be conditional

manic rune
#

what the fuck? 😭

#

0.3% AND he hit the polychrome on top of that

#

crazy...

latent portal
#

IT WORKS!!!

simple mural
#

With vanilla jokers

vale lake
#

when are you gonna get 7 oops jokers though

#

unless you're doing a showman run

simple mural
#

yea

summer flume
#

chat i need help... trying to make a challenge deck using custom suits and getting this.
works just fine with nothing set under deck.cards (therefore all cards are enabled, including modded ones), or only vanilla cards set under deck.cards, but the moment I add a custom card that I have already defined through SMODS.Atlas, SMODS.Suit, and SMODS.Rank it breaks

latent portal
#

does anyone know what C: tag i need to use to get green text

old bane
#

just green

latent portal
#

thank you

simple mural
#

or u can get 5 oops and blueprint

#

or 4 oops and blueprint + brainstorm

old bane
#

does anyone know if there a mod that does like reverse foils reverse holographics etc. for jokers? cause it would be kinda cool if you could have the border like be holographic and not the artwork

rich roost
#

Is there a way to boot the game (change config file maybe?) into windowed mode instead of it going from full screen to windowed? I saw this answered on reddit, but I don't have a conf.lua file to alter

rich roost
orchid scaffold
#

does anyone know if there is a mod that helps me spawn in jokers, ive been trying to test my mod but cant find the joker im testing

tall apex
#

im so stupid i solved my issue

#

i didn't put a god damn equals sign

long urchin
#

im back

distant grove
latent portal
#

quick question

tall apex
distant grove
#

why is it nil?

long urchin
#

did you set up the value table

latent portal
#

i'm making a joker that has double sell value by default

#

and always has x2 sell value

#

how would i go about doing that

distant grove
#

wait

#

your god damn right.

#

IM DUMB

#

DID I FUCKING FORGET

long urchin
#
        card:set_cost()```
#

i think

distant grove
#

chat

#

i forgot😭

long urchin
#

rip

latent portal
distant grove
#

the hell

#

no i didnt

#

i think?

#

still dunno why no work

long urchin
#
        card.ability.extra_value = card.sell_cost * 2
        card:set_cost()
    end,``` put this in the smods.joker area
latent portal
#

well okay

long urchin
#

thats the call to activate at the time its added to your jokers

latent portal
#

okay but i want it to activate

#

all the time

#

so it has synergy with jokers that increase sell value

long urchin
#

i dont exactly know how to do that

#

@vale lake hey youre smarter than me

#

do you know

vale lake
#

I have been summoned

#

what is your first wish

red flower
#

infinite wishes

long urchin
#

cherry wants a card to permanently have x2 sell value

#

like not just when its made, but all the time so it has synergy with like gift card n stuff

#

i only know how to change it initially not how to keep it x2

vale lake
#

that sounds like a massive headache but technically possible IF it's an edition or ehancement or something

red flower
#
local set_cost_ref = Card.set_cost
function Card:set_cost()
    set_cost_ref(self)
    if self.config.center.key == "j_modprefix_key" then
       self.sell_cost = self.sell_cost * 2
    end
end

that's basically what i would do

(edited to check for key)

latent portal
#

i'll try it

vale lake
#

also

#

sell_cost isn't what you should be using I think

red flower
#

oh but you need to check for your jokers key

vale lake
#

I think that breaks with some stuff

red flower
#

like what

vale lake
#

like giftcard I think

sonic cedar
#

trying to set up a dynamic description. where do i go from here?

vale lake
#

and victin said it could also break with loading the run again

#

I think

red flower
red flower
#

the giftcard thing might be

vale lake
#

they told me this ages ago when I was making Jocker for balatrostuck so it's possible it's changed

sacred lily
#

how do i check if a card is a glass card?

distant grove
long urchin
#
            money = 100
        }
    },``` an example of what i mean by make a table
#

this is the table in mine

distant grove
#

i dont think i made my table mine

vale lake
#

card.ability.extra_value

#

that's what you use

sonic cedar
long urchin
#

ya

#

the #1# checks the first thing in the config extra

#

my fist thing is money

distant grove
#

instead of card.ability.extra.mult_mod??

vale lake
distant grove
#

nvm

long urchin
#

so if you plug that in, itll display 100 in your description

old bane
#

does G.play only store scored cards or does it store every card, even if they aren't scored? cause i need to know what cards are scored and what cards are not scored for a blind

sonic cedar
#

im trying to get it to change depending on whether or not you have the joker

long urchin
#

OH

sonic cedar
#

like in your area

latent portal
long urchin
#

i thought you meant how to use the # thing

sonic cedar
long urchin
#

uhm there should be a way to check if its in your hand, you could just do an if else with that

#

lemme see

red flower
latent portal
#

okay thank you

sonic cedar
long urchin
#

if context.joker_main then?

sonic cedar
#

well that's for calculation

red flower
long urchin
#

could you not use that in any case, not just calcs?

sonic cedar
#

i dont

believe so?

long urchin
#

try it and see if it breaks

#

if it does then ctrl z

sonic cedar
#

i mean considering they are literally calculation contexts they're likely gona break but

#

sure i'll give it a whirl

sacred lily
#

how do i permanently give a joker more mult based on a condition?

long urchin
#

i mean is there a way to change the local txt in add_to_deck = function(self,card,from_debuff)

red flower
sonic cedar
long urchin
#

lmao

long urchin
#

the description of a joker when it goes in your hand

sonic cedar
red flower
#

Ok, if I understood correctly you should be able to check card.area == G.jokers in loc_vars

long urchin
#

hey stupid question but im able to update the money variable outside of the config extra table right

#

like this is okay

red flower
#

yes but it's card.ability.extra.money

long urchin
#

ahh

red flower
#

also don't use calculate without a context

long urchin
#

oh shit youre right i almost forgot to add the context

#

ty

sonic cedar
manic rune
#

:3

red flower
sacred lily
#

i know how to get a joker to recognise a number card being played, is it more or less the same thing to know if it;s glass?

distant grove
#

hi bepis

manic rune
#

hi peak :D

sonic cedar
red flower
#

They look similar enough to me to change them with loc_vars

distant grove
#

i need help

#

😭

sonic cedar
distant grove
#

the rats are not harvesting the guts

red flower
weak gate
#

is there a way to make an atlas that loads assets from another mod?

sonic cedar
manic rune
long urchin
#

am i stupid chat

manic rune
#

you dont uh, run functions in return like that

distant grove
long urchin
#

oh

#

i am

distant grove
#

NILLL ITS NILL

manic rune
#

and the return part is definitely wrong too

manic rune
red flower
manic rune
#

...its supposed to give 1 more hand, not set it to 1 hand 😭

old bane
#

;-;

distant grove
#

trying to make it so that they're like castle

red flower
long urchin
#
        if context.after then
            ease_dollars(-5)
            card.ability.extra.money = card.ability.extra.money - 5
            card:set_cost()
        end
    end```
hey so this didnt update the cost
red flower
#

or not

manic rune
#

i mean, im doing just that.....

#

its only running once, im gonna check other code

red flower
long urchin
#

it changed the value cuz the description is different but the sell value is the same

manic rune
#

like, it doesnt increase round_resets.hands

#

but hands_remaining or something

distant grove
#

SMODS.Atlas {
key = 'TheRats.png',
path = 'TheRats.png',
px = 71,
py = 95
}
SMODS.Joker {
key = 'TheRats',
loc_txt = {
name = 'The Rats',
text = {
"This joker gains {C:chips}+#1#{} Chips",
"and {C:mult}+#1#{} Mult",
"per discared {V:1}#2#{} card",
"{C:inactive}(Currently {C:chips}+#3#{C:inactive} Chips)",
"{C:inactive}(Currently {C:mult}+#4#{C:inactive} Mult)",
"Gut Harvesting go BRRR"
}
},
atlas = 'TheRats.png',
pos = { x = 0, y = 0},
config = {extra =
{ chips = 0,
mult = 0,
chips_mod = 3,
mult_mod = 4}},
loc_vars = function(self, info_que,card)
return {
vars = {
card.ability.extra.chip_mod,
card.ability.extra.mult_mod,
card.ability.extra.chips,
card.ability.extra.mult

}

}
end,
calculate = function(self, card, context)
if
context.discard and
not context.other_card.debuff
then
card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chip_mod
return {
message = localize('k_Guts_ex'),
colour = G.C.CHIPS,
card = card

  }
end

end,
calculate = function(self, card, context)
if
context.discard and
not context.other_card.debuff
then
card.ability.extra.mult = card.ability.extra.mult + card.ability.extra_mod
return {
message =localize ('k_harvested_ex'),
colour = G.M.Mult,
card = card
}
end
end

manic rune
red flower
#

yeah

distant grove
#

i see

long urchin
#

makes it readable

distant grove
#

oh

#

sorry

long urchin
#

ur good

red flower
long urchin
#

oh

#

im trying to update the joker sell value

manic rune
red flower
long urchin
#

oh

#

duh doi

distant grove
#

oh

red flower
#

info_Q

manic rune
#

the spelling is wrong...

sonic cedar
distant grove
#

and balatro crashed

red flower
sonic cedar
manic rune
#

i love unnecessarily long var names :3

red flower
#

also you might need to check if card.area exists

#

bepis can i send u a link to my mods discord to test the verification thingy

winter elk
#

i hate winforms so much but i finally got one part working holy moly

red flower
#

yoo

manic rune
red flower
#

to check for nio

#

nil

distant grove
long urchin
#

oh shit

#

ok so i figured it out and its working

#

but

sacred lily
#

is there even a way to check if a hand contains glass card(s)?

long urchin
#

its doing it at the end of every hand not the end of the round

orchid scaffold
#

what is the atlas name for the default balatro tarot card atlas, im using it for a placeholder

sacred lily
#

i really cant figure it out

red flower
long urchin
#

if context.after then

long urchin
red flower
#

there's one called end_of_round

red flower
sonic cedar
#

yussssssss

#

test time

sacred lily
umbral zodiac
#

where are 1x sprites used

weak gate
#

I want something like this to work, but it doesn't... do I dare make a lovely patch on the part of smods that loads the path? ULTRAthink

red flower
sacred lily
#

in the bit where the joker affects are applied

long urchin
#

OGH

#

WHYT DID THAT HAPPEN