#💻・modding-dev

1 messages · Page 46 of 1

teal estuary
#

cool, gotcha

frosty dock
#

ok I just need your code

teal estuary
#

thank you so much for being so understanding 😭 i've had such a hassle trying to figure this out

hushed cradle
#

all of it?

frosty dock
#

well I'd like to be able to test it

hushed cradle
#

nws

#

can i dm it to you?

frosty dock
#

can you put it on github someplace?

hushed cradle
#

oh yeah thats a better idea

#

can i dm you the link to the github?

frosty dock
#

sure thing

hushed cradle
#

cool

#

lemme just set it up quick

frosty dock
#

👍

teal estuary
#

sorry, one more question, am i missing some code that makes the joker shake when activated? i just noticed mine isnt doing it 😭

wintry solar
#

You need to call juice_up

teal estuary
#

would that go in the calculate function or just the joker table?

frosty dock
#

not needed here, referencing vanilla code can help (replace self by card)

#

wait that's not the best example

#

add card = card, to your return table

teal estuary
#

thats what that does?

rough furnace
#

Curious does the debug 2 keybind work to discover these?

teal estuary
#

oh wait, whoops

#

it works now, ty

wintry solar
frosty dock
#

for reference if anyone ever has related issues, this happened because create_text_input returns a column

hushed cradle
#

is there anyway to have 2 toggles be mutually exclusive?

#

aha

#

toggle callback

wintry solar
#

Is DUMP_LOCALIZATION supposed to give me all modded content or just the mod I put the header in?

frosty dock
#

you're meant to disable other mods

#

it dumps everything that's added

lament fjord
#

I'm trying to cross-compile lovely-injector, it seems to work but then I get wine: Call from 00006FFFFFFA2DC8 to unimplemented function version.dll.GetFileVersionInfoSizeW, aborting and the game crashes

wintry solar
#

cool cool

lofty igloo
#

Close enough for a website?

languid mirage
#

yeah

frosty dock
#

not bad

narrow pollen
#

all right, so where's the code that counts the number of a rank or suit in a deck?

languid mirage
#

you can search where text Stones: is used

#

first find localization key for that text

shell tangle
#

How would I check if a card is locked? card.ability.unlocked == false?

frosty dock
#

unless it's in the collection or something

#

if you do have a Card, it'd be not card.config.center.unlocked, but more likely you'd just have a center to put in the place of card.config.center

shell tangle
#

card.config.center.unlocked seems to have hit it. I'm using an update function to switch between sprites, and was having some issues where it was defaulting to {0,y} on the joker sheet when unlocked.
If you're curious, the code is this, and without the unlock check, it was defaulting to Troubadour, or {x=0,y=2} on the joker atlas. Probably overwriting the default undiscovered/locked sprite of {x = 8/9, y = 9}. This seems to have solved it.

  update = function(self, card, card_table, other_card)
    local suitpos = {y=2}
    if card.config.center.unlocked == false then
      suitpos = {x = 8, y = 9}
    elseif card.ability.extra.cur_suit == "Spades" then
      suitpos.x = 0
    elseif card.ability.extra.cur_suit == "Hearts" then
      suitpos.x = 1
    elseif card.ability.extra.cur_suit == "Clubs" then
      suitpos.x = 2
    elseif card.ability.extra.cur_suit == "Diamonds" then
      suitpos.x = 3
    end
    card.children.center:set_sprite_pos(suitpos)
  end,
wintry solar
rough furnace
#

DebugPlus jumpscare

gilded narwhal
rough furnace
edgy reef
#

👀

#

eval?

rough furnace
#

yes

#

I need to do some testing, but I plan on also injecting some variables into the scope

rough furnace
#

That's a new one

narrow pollen
#

all right

rough furnace
lament zealot
languid mirage
rough saddle
#

how do you install lovely?? I have been trying to get it to work so i can play the new cryptid mod but somehow it wont work can someone pelaqse help?

lofty igloo
zealous glen
# wintry solar two new balloons 👀

This is really cool. I want to make a Joker that synergizes with them, because I had seen a painting of a red balloon dog and the idea of making a Joker inspired by it stuck with me.

I have some suggestions about VFX and mechanics but I imagine you’d have already thought of them

zealous glen
crisp coral
#

hopes and dreams

shell timber
#

i thought it was save the world

#

one of those two

#

actually wait it is hopes and dreams

zealous glen
#

Where from

#

The name makes me think of Undertale

#

But the composition makes me think of anime really

crisp coral
#

it is undertale

maiden phoenix
#

Just found a silly interaction with Steamodded (or lovely?) reload feature

zealous glen
#

By the way, I’ve had this idea of Jokers in the shop or packs coming with a free card, but I’m not sure what would be a good way to implement it, both in terms of coding and UI

frosty dock
#

hopefully we can get love.event.quit('restart') working with lovely again, that would be much cleaner

zealous glen
#

It does remind me of my idea of making HyperCards, which is an extension of a Card type that’s a Card + (0 or 1 HyperCard)

remote coral
zealous glen
#

Coke comeback

lofty igloo
#

Right, I turned the balatro background into a Svelte component with props:

Default values are the Balatro main bg colors

obtuse scarab
#

like what fo76 does

night pagoda
#

I just tried using ui nodes

#

...what the fuck

crisp coral
#

yeah

#

...yeah

frosty dock
crisp coral
#

god that image

maiden phoenix
#

I'm not sure why but this lovely patch doesn't work at all, does it have something to do with the function or it's a really dumb mistake I can't see? Even doing a function overwrite doesn't work

languid mirage
#

did you check steamodded

#

Maybe it overrides this function

maiden phoenix
#

Nope it doesn't

languid mirage
#

try putting debug at the start of the function

maiden phoenix
#

Like just "debug" ? Above amount = amount or 1?

wintry solar
#

you probably want it outside of that if anyway

languid mirage
#

send debug msg

maiden phoenix
wintry solar
#

I don't think that's the problem, but any level_up_hand that is instant won't hit your code

maiden phoenix
#

I'll just give it a try outside of the instant block

#

Still doesn't work

maiden phoenix
obtuse scarab
wintry solar
#

it works for me

#

can I see your patch?

maiden phoenix
#

Dont mind the comments typo I'm just tired

wintry solar
#

what other mods do you run?

maiden phoenix
#

DebugPlus, SDM_0's Stuff, FasterPlanet and MoreSpeeds

wintry solar
#

fasterplanet probably overrides the function

maiden phoenix
#

Oh wow Im checking it rn

#

It really replaces it

wintry solar
#

does it even change it?

#

that looks identical at first glance

maiden phoenix
#

The delay is set to 0

#

All of that for this

#

Why even put a delay in the first place?

wintry solar
#

I would have thought that faster planets would just patch all the calls to be instant speed instead

lament fjord
#

I've been starting to encounter periodic stuttering, so I tried using lovely patching to increase the amount of budget that the GC gets

This unfortunately only worsened the problem

wintry solar
#

you could always hook for your calculate call and throw it at the start or end

maiden phoenix
#

My mod have higher priority than this one so it gets overrided

wintry solar
#

No it won't

maiden phoenix
#

?

wintry solar
#

oh wait

#

yes it will

maiden phoenix
#

Well I tried with hooks and it doesn't work

#

Is there a forum post for Faster Planet? Discord search bar is dumb

crisp coral
#

this is why overriding functions bad

maiden phoenix
maiden phoenix
crisp coral
#

🗿

lament fjord
#

I'm trying to tune the nuGC method (in functions/misc_functions.lua) to try to reduce stuttering

rough furnace
# zealous glen What’s this song

Please check out my new channel! https://www.youtube.com/c/EluTranBugFables Make sure to check out the official soundtrack at: https://materia.to/undertaleID Determination!

(Doesn't have the cleanest transition between Hopes And Dreams to Save The World. Sorry about that! ^_^;) .
.
.
Feel free to send me a ko-fi if you enjoy my content, I app...

▶ Play video
zealous glen
#

How's the timing? Keep in mind it's affected by the speed setting. This is at 1x speed

wintry solar
#

feels a bit long to me,

#

but maybe I just read quickly

zealous glen
#

I think somewhere between 16 to 20 seconds is right. I made it a bit longer to see it since I have to load it from the Collection screen, but if you generate this with Soul it might take a moment until you start reading

wintry solar
#

Yeah that sounds about right

maiden phoenix
#

urple alloon

rough furnace
#

I think maybe just have it ignorebthr speed setting and then get a good balence

obtuse scarab
#

working on gum

#

its that shade of pink because i dont have a color for it yet

#

im working on the wrapper

zealous glen
zealous glen
obtuse scarab
wintry solar
#

I'm debating with the idea of whether you should get the effect of the balloon before it floats away or not

obtuse scarab
#

idrc if its ever used. i just wanna draw stuff

#

pomputer drawing. on my puter

rough furnace
#

Make the ballons just broken and add them to cryptid balatrojoker

maiden phoenix
#

Let's just add everything to Cryptid

zealous glen
#

No

maiden phoenix
#

Lobotomy Corp? More like Cryptic Corp

#

Victin's Collection? More like MathIsFun's Collection

rough furnace
#

I should make a modpack that has everything in it and call it cryptid

zealous glen
#

I just need to add mechanics that make Cryptid less fun balatrojoker

rough furnace
maiden phoenix
#

(I literally have them off because they plague the shop)

rough furnace
#

Actually someone should make a mod that just removes all the standard jokers, tarots, planets, etc.

zealous glen
#

What are M Jokers?

rough furnace
#

M

wintry solar
maiden phoenix
rough furnace
#

It should also remove ranks and suits

obtuse scarab
#

should only give you one card. hand size is one card

rough furnace
#

Honestly I'm xuroirs what would happen if I patched SMODS to not init any built in stuff

zealous glen
#

Lua question: can a local function be recursive?

#

Answer: yes but it's weird

lofty igloo
#

Sneak peek

zealous glen
#

Homestuck moment

lofty igloo
#

oops

#

how cursed would it be if I made the code preview font m6x11plus too?

rough furnace
frosty dock
#

just local function should do

rough furnace
#

I love functions that make functions

frosty dock
#

you can also have the local function outside of the global function and still call it inside (upvalues are fun)

rough furnace
#

Yeah that's how varibels work

#

That's why I have like 20 locla variables at the top of DebugPlus code

lofty igloo
# lofty igloo Sneak peek

Some plans: consumables, blinds, decks etc, build a texture atlas, resizing

While I'd also love to add a fully working editor with autocomplete/intellisense, I think it's too much work initially

frosty dock
#

local x = x

zealous glen
wintry solar
zealous glen
#

Now it only needs to bundle them together after being caught, but you may or may not want to do that

#

How do I access a localization dictionary?

#

I want to know how many entries there are in one of the arrays during runtime

wintry solar
#

I wanted them to be seperate if they're caught

#

they also have no sell price when caught

zealous glen
obtuse scarab
#

finished gum . gootbye

zealous glen
obtuse scarab
#

chewy!

hushed cradle
#

what do the different

G.UIT.R
G.UIT.T
G.UIT.C
``` mean
#

i assume its what kind they are

languid mirage
#

isnt it like

hushed cradle
#

like column and row

languid mirage
#

ye

#

t is probably table

hushed cradle
#

ah

languid mirage
#

I mean you can probably find

#

where it's initialized

hushed cradle
#

true

languid mirage
wintry solar
#

Huh, I didn’t realise that table had a padding item

hushed cradle
#

ah cool

#

thank you

#

whereabouts is this in the code?

#

i checked ui and ui defs and couldnt find it

crisp coral
#

looks like globals.lua

hushed cradle
#

ah cool

#

thanks

languid mirage
#

I just ctrl + shift + f to search in all files

rough furnace
#

I just realized jellymod is MIT licensed.

#

Someone could update and release it

#

Or maybe even PR it back

hushed cradle
#

wait

#

i didnt know

#

i meant to say

languid mirage
#

it's very useful

night pagoda
#

misprint but for chips 👀

lofty igloo
rough furnace
#

Now make a preview

lofty igloo
#

You mean that?

rough furnace
#

Oh my discord Is being broken

hallow forge
#

oof

lofty igloo
#

Since I did the sensible thing and turned everything into components, I can reuse a lot of stuff so it saves a bunch of time

lofty igloo
#

Oh wow

#

Discord, u ok?

rough furnace
#

Actuslly I saw something cool the other day which you could maybe use for that

lofty igloo
#

Oh? What's that?

crisp coral
#

as in, only this

lofty igloo
#

Isn't that what the screenshot is showing?

#

A little confused

crisp coral
#

the screenshot shows the whole code to add a joker

rough furnace
crisp coral
#

i'm suggesting a version formatted for localization files

lofty igloo
#

Ohh, you want to copy only the loc_txt part?

crisp coral
#

en-us.lua etc

lofty igloo
#

That's a good idea

rough furnace
lofty igloo
#

I'd probably just parse using regex

rough furnace
#

Fair enoifh

lofty igloo
#

Since running a whole VM just to get some values is a bit overkill

languid mirage
lofty igloo
#

I'll finish adding the joker editor and then upload to GitHub, then I'll set up some goals for future features

languid mirage
#

{X:red,C:white} X#1# {}

lofty igloo
#

Ah damn it

languid mirage
#

X background color

#

C text color

#

s: is size

#

has to be lowercase

lofty igloo
#

I could swear C:xmult works as well though?

languid mirage
#

no idea

crisp coral
#

noppers

lofty igloo
#

Ah okay, my regex needs expanding then

crisp coral
#

if it worked then it would've been the exact same as {C:mult}

shell timber
#

oh, this looks cool

crisp coral
#

absolutely does

shell tangle
# languid mirage X background color

One more letter is V, which takes the variable colours if stored in loc_vars. Edge case, but it's used in things like Castle and Ancient which change the colors when the suit changes as well. Haven't done much testing, but I've only had success with {V:1}, and no other numbers.

languid mirage
#

I see\

hushed cradle
#
{
                            n = G.UIT.R,
                                config = {
                                align = "cm",
                                padding = 0.1,
                                r = 0.1,
                                colour = G.C.CLEAR,
                            },
                            nodes = {
                                {
                                    n = G.UIT.T,
                                    config = {
                                        align = "cm",
                                        padding = 0.1,
                                        r = 0.1,
                                        scale = text_scale*1,
                                        ref_table = {'text'},
                                        ref_value = 1,
                                        colour = G.C.WHITE,
                                    },
                                },
                                create_text_input({
                                    prompt_text = "A",
                                    extended_corpus = true,
                                    max_length = 1,
                                    text_scale = 0.4,
                                    w = 1,
                                    h = 1,
                                    ref_table = {'A'},
                                    ref_value = 1,
                                }),
                            }
                        },
#

does anyone know why the text box wont appear?

#

apparently you cant have 2 in a row?

#

idk

#

but its fixed now

lofty igloo
#

In the meantime, have CSS text size:

shell tangle
#

Pretty sure {s:} is multiplicative, so {s:1.5} would be 1.5 * base size, and {s:0.8} would be 0.8 * base size.

lofty igloo
#

cool

#

Works for me

#

Next step: What formatting options are there? I have these from the game files:

    const formatMap: Record<string, string> = {
        MULT: '#fe5f55',
        CHIPS: '#009dff',
        MONEY: '#f3b958',
        XMULT: '#fe5f55',
        FILTER: '#ff9a00',
        BLUE: '#009dff',
        GREEN: '#4BC292',
        PURPLE: '#8867a5',
        RED: '#fe5f55',
        ORANGE: '#fda200',
        GOLD: '#eac058',
        YELLOW: '#ffff00',
        CLEAR: '#00000000',
        WHITE: '#ffffff',
        BLACK: '#374244',
        L_BLACK: '#4f6367',
        GREY: '#5f7377',
        CHANCE: '#4BC292',
        JOKER_GREY: '#bfc7d5',
        VOUCHER: '#cb724c',
        BOOSTER: '#646eb7',
        EDITION: '#ffffff',
        DARK_EDITION: '#000000',
        ETERNAL: '#c75985',
        PERISHABLE: '#4f5da1',
        RENTAL: '#b18f43',
        ATTENTION: '#ff9a00',
    }

but it doesn't include "attention" or "inactive", I have to look for inactive myself (I think attention was orange)

shell tangle
#

There's a custom function that loads the colors from that into text formatting stuff, give me a second to find which file it's in.

lofty igloo
#

Thank you

zealous glen
#

loc_colour

shell tangle
#

Yeah, in misc_functions.lua.

zealous glen
#

However

#

The game can accept a hex code directly

#

I'm not sure if loc_colour recognizes that

#

But I think that's a good option to have

#

Also keep in mind some colors are updated in real time; that's what makes DARK_EDITION change in Spectrals

lofty igloo
#

I see

languid mirage
#

idk where inactive is tho

zealous glen
#

Also the game uses these same colors elsewhere, but sometimes it darkens, lightens, or mixes them

#

It's somewhere else in the color dictionary

hushed cradle
#

can i block certain characters from a text input?

#

it seems i can enable extended smth or not

#

which is spaces and punction i think

#

nvm i can write a quick function to do it

zealous glen
#

Featuring Stheno

#

(also a bug with the Hook)

#

I should say the replay code I adapted from High Card mod

hushed cradle
#

any way i can call a function when a back button is pressed?

#
G.FUNCS.overlay_menu({
        definition = create_UIBox_generic_options({
            back_func = "options",
            contents = {tabs},
            back_colour = G.C.SECONDARY_SET.Spectral,
        })
    })
#

can i just chuck smth in here?

zealous glen
zealous glen
hushed cradle
#

thats genius

#

i never wouldve thought of that

#

thank you

wintry solar
#

You should also be able to hook the function it already calls

opaque tendon
#

is anyone currently developing a joker maker tool? like it spits code based on certain conditions?

#

i think it would be really cool to have , not all people can code but everyone loves custom jokers

zealous glen
#

Not that I know of

hushed cradle
#

think im gonna make my own save settings function then hook that to the options button

#

sounds like a good idea

languid mirage
#

tho I don't think it will generate code for calculate function

opaque tendon
#

ty

zealous glen
#

Solomon joins in the fun, but I'm not adding quips to him ATM

austere schooner
#

bro got the unique tooltip

zealous glen
#

Solomon David
Carry over unused Hands and lose all Discards

zealous glen
#

It's just his title

austere schooner
#

im referring to the black-on-white box

zealous glen
#

Also not a tooltip ;P

frosty dock
#

you just do whatever and call exit_overlay_menu after, then set that as the back func

hushed cradle
#

ah i see

#

cool

#
local options_ref = G.FUNC.options
G.FUNCS.options = function(e)
    Blueprint.FUNCS.saveSettings()
    options_ref(e)
end
#

ive got this in my code

#

is this good enough

#

or is it better the other way?

#

i guess this way its called whenever i enter options

#

so less ideal

#

i only want it when youre leaving options

#

or leaving the other settings

frosty dock
#

patching all of exit_overlay_menu directly seems like a bad idea

#

for just options, you can put a back_func on the corresponding UIBox

hushed cradle
#

sorry i meant the settings for my mod

#

not any settings tab

#

or others

#

so ill just chuck a new back_func on the back button for my mod settings then

frosty dock
#

just replace the settings back_func with some other function that calls G.FUNCS.settings when done

hushed cradle
#

yeah thats what i got going on atm

#

cool

frosty dock
#

is it not supposed to go back to the settings menu?

hushed cradle
#

nah the option menu

#

ive got a button on the options menu for the mod settings

#

its not a tab in the game settings

#

also if the screenshot you took was from my code having settings there was a mistake

#

i meant to have options but confused them

#

oh wait

#

does exit_overlay_menu just get rid of it

#

ah i see

#

mb

frosty dock
#

yeah

hushed cradle
#

idk why i thought it did smth different

#

yeah ill just call options from inside that then

#

thank you

frosty dock
#

yeah it should be options, not settings

#

mb

hushed cradle
#

all good

#

this is super useful cos now i can but a back func on the keybinds menu to check theyre valid before exiting that menu

languid mirage
#

btw, speaking of settings, is there a mod settings api planned
kinda annoying that every mod just puts their settings wherever

frosty dock
#

it is for sure planned

#

actually there's this

#

seems like it's complete? ig I should get to reviewing it for API design

edgy reef
#

It’s ready for review right now.

hushed cradle
#

ive been coding for the past hour straight

#

went to test it

#

all of it

#

and somehow it only had 3 errors

#

back to this problem

#

i cant put 2 text inputs in one place it seems

frosty dock
#

huh

hushed cradle
#

no clue why

#

apparently you can do G.UIT.I for a text input too

#

but i tried searching the source code

#

and its never used

#

so idek what args i need

#

or if it would work

frosty dock
#

never seen that, I don't think?

#

maybe it's an artifact

hushed cradle
#

maybe

#

but still

#

i cant get 2 textboxes in 😭

zealous glen
#

Notice anything different?

hushed cradle
#

lots of hands remaining damn

hallow forge
#

nope that's normal

zealous glen
#

Everything here is "normal", but it's something I don't think people would have seen in vanilla

hushed cradle
#

oh that if the money goes above a certain num it shows the num

zealous glen
#

Yes!

hushed cradle
#

i knew 😎

hallow forge
#

isn't that vanilla?

hushed cradle
#

yea

zealous glen
#

That's what I said

hushed cradle
#

only way ive seen it is when i did a funny cloud nine run

#

i think

zealous glen
#

also the final boss was Crimson Heart and the Joker that was debuffed last was the one that gave me the extra hands, so I lost all of them

hushed cradle
#

rip

hushed cradle
frosty dock
#

why would you have to specify your own directory name? users could change it arbitrarily

zealous glen
edgy reef
frosty dock
#

that's a timing issue

#

forcing mods to have a specific directory isn't a solution to that

#

and that's all it's doing

frosty dock
#

something isn't right with alerts

maiden phoenix
#

!

regal wolf
#

bahaha

frosty dock
#

also seems like it's wrongly alerting if the main collection would have alerts

mellow sable
#

Cryptid!

edgy reef
#

😭

#

I REALLY didn’t want to have to also rewrite or make a whole new version of alerts to show properly with additions.

#

Mostly because other mods might have custom objects that use it as well for their objects alerts.

#

I guess I’ll get to that and SURELY this can make it turn off properly

frosty dock
#

turning them off is good enough for me

edgy reef
#

Nice

#

I’ll see what I can do with the discover bugs

#

They should not exist now in the Additions tab (hopefully).

frosty dock
stiff locust
#

okay i wanna
make a mod that adds a joker
where do I start

hushed cradle
#

probably reading through the steamodded wiki

#

it has a bunch of useful stuff about making a lot of different things

#

jokers

#

consumables

#

consumable types

#

use the numbered pages for 1.0

stiff locust
hushed cradle
#

i can send a link to it 1 sec

#

are you using steamodded?

stiff locust
#

yes

#

i am

hushed cradle
#

cool

#

then pages 1-8 should be useful

#

also looking through the game code yourself can be good to understand how different things work

#

you can make a copy of the balatro.exe and unzip it to do that

stiff locust
#

i've done that before but i could not make sense of a lot of things

#

is there a recommended program to edit lua in

hushed cradle
#

no clue

#

i just use vs code

hushed cradle
#

takes a lot of trial and error for my stuff to work

stiff locust
#

okayy

#

is there an example mod i can find somewhere

hushed cradle
#

i think theres some on the steamodded github page

#

if not then in the modding thread thing under this channel theres a bunch of mods you can try out

#

cant promise it works still

#

but it might be helpful

#

its very basic

languid mirage
hushed cradle
#

its beautiful

#

there appears to be an issue when trying to use text boxes, at least i have it, i cant have 2 displayed at the same, also if i have 2 on seperate tabs, if one is set to all caps only, the only one gets set to all caps as well

#

is there a way i can actually seperate them?

shell tangle
# frosty dock https://github.com/GauntletGames-2086/Steamodded/pull/2 gonna put my review chan...

Wanting to mess around with this, was looking around for what kind of config format it wanted - if it wants it to return a table or just be a list of variables or whatever - I noticed that loader.lua registers it as mod.config, and the UI in core.lua tries to call mod.settings - Might be completely mistaken, since, I still haven't had luck after changing it myself, but, mentioning it just in case it was missed.

frosty dock
#

mod.settings is meant to be the UI definition function for the mod settings tab

#

maybe settings_tab and credits_tab for the UI functions?

shell tangle
#

Maybe. I see where I was mistaken, still haven't found where the new mod config area actually is yet though, so let me look a little more.

edgy reef
#

Also: loc text for the tab is “Config” yet the name of UI module is “settings”

#

Probably should’ve fixed that to be more consistent.

wintry solar
#

that's my fault (:

frosty dock
#

gotcha, config_tab then?

edgy reef
#

Yup

#

Although, that implies you’re returning the tab, when the only thing the function does is return the UIBox for the tab.

frosty dock
#

actually it's just meant to return the tab_definition_function

#

but that's too long

wintry solar
#

config_tab_function?

frosty dock
#

no other mod functions have function in their name

frosty dock
#

the function for additional tabs is extra_mod_ui_tabs rn, also not very pretty

#

any better suggestions?

maiden phoenix
#

the_other_tabs_in_the_ui_that_contains_settings_of_your_mod

frosty dock
#

just extra_tabs maybe?

edgy reef
#

That should work.

wintry solar
#

how many tabs is the limit?

frosty dock
#

good question

#

lemme test

edgy reef
#

I do remember hearing about it crashing if it meets a limit iirc.

wintry solar
#

Yeah I feel like it was either 6 or 7

frosty dock
#

7 seems to still work

#

I'll try 8

#

8 is surprisingly still fine

lofty igloo
#

9 then?

wintry solar
#

I'm sure someone had the settings menu crashing

frosty dock
#

works but it's going off the screen

#

it might be specific to the settings menu? idk

wintry solar
#

thinking about that first tab, would it be better to be called Info and have the mod name above the authors?

frosty dock
#

I like the fact it's always visible within that menu

#

though it's not great with long names, admittedly

#

btw I did also add config saving, I hope this doesn't mess with existing config systems too much

#

it just triggers when you exit the mods menu

mellow sable
frosty dock
#

well, it works in that it doesn't crash

#

but you can't operate it because it goes off the screen

mellow sable
#

Yeah because I remember I had issues with the main settings menu and the modpack until I put everything in one tab

frosty dock
#

maybe it's related to something not shared by the mods menu

tepid crow
#

heya guys, what's the best way to add objects to the current run savefile?

wintry solar
tepid crow
mellow sable
lofty igloo
#

Wait, G.GAME persists across restarts too?

#

Well that's a totally intended positive side effect that I totally knew about

wintry solar
#

@frosty dock what does the primary colour of a consumable type affect? I can't figure out how it's used

mellow sable
#

You would need to inject into like settings.jkr somehow to persist across restarts across an entire profile or game

tepid crow
shell tangle
languid quiver
#

hmmmmmmm

#

im very tempted to be the change i want to see in the world and write a steamodded wrapper to heavily aid the autismo mind of mine and potentially many others

#

might become redundant though

#

i just really like easier scoring's idea

tepid crow
zealous glen
bleak nexus
#

Hey all! new to modding but have been a web dev for years. I want to start collecting detailed data from my runs. Every hand played, every discard, etc... What would be the best approach to read that data from balatro when it executes?

long gust
#

probably record it in a video

mellow sable
#

hook all the functions that play and discard and stuff

bleak nexus
#

I like that idea of having a hook on those functions. Is there a lua version of aspect programming or joinpoints of that kind?

#

Saving myself time here. If I used https://github.com/balamod/balamodmod to try and replace function calls with function calls that capture the arguments ans save them to a local .json that would be a solid approach. Don't want to start down the wrong alley if someone sees something obviously wrong.

raven forge
#

Steamodded is the de facto standard for mods right now, I wouldn't use Balamod

mellow sable
#

you can basically redefine a function to call its old version and then do something you want

raven forge
#

with hooking functions, there's no standard; the way it's done is just to redefine it in terms of its old value

#

you can try saving to json if you'd like; serialization to a lua file which can be loaded directly may be easier

#

it all depends on what you want to do with it, of course

bleak nexus
#

Thanks for the help guys! Thanks I like the json. I am a front end developer mostly and the game is just itching to have charts and interactive tables of balatro runs

raven forge
#

ah, if those are charts/tables outside the game, json yeah

bleak nexus
raven forge
#

just going through that is a good idea, yeah

#

you can take a look at "The World Ends With Jimbo"

#

yeah that's just the first mod I have open in my editor

rough furnace
#

oh I just looked at the code

#

it's in <mod dir>/config.lua

#

honestly, as a lovely first mod, this is kinda annoying

#

as I can't get my mod dir as a lovely mod

#

but also I suspect that some other issues may pop up

#

like mod devs distributing their mod with a config, overwritng the user's config every time they update

#

it might be a good idea to make a config folder in the main save directory and put mod config's there

lament fjord
#

Is the "string.buffer" module available or not?

zealous glen
#

Originally I wanted to make it have a different condition or drawback, but I couldn’t find one I liked

#

What do you think?

narrow pollen
#

i think it would be balanced if you could code it to where the joker stole the bonus hands at the end of the round, so then you don't get the interest on them

#

this would make it especially terrible for green joker

weak depot
#

looking into how to mod the game, in part to get better at lua and in part because i really like challenges and designing them could be fun, i think :>

frosty dock
frosty dock
frosty dock
edgy reef
#

Could the file be created by Steamodded with default info provided by the mod dev if it doesn't exist in the mod directory?

frosty dock
#

rn it's created by steamodded when config is saved and it's non-empty

#

I think having a separate config directory is a good idea, optionally a config file local to the mod dir could be loaded as a default

zealous glen
weak depot
#

is https://github.com/Steamopollys/Steamodded/wiki/Create-a-Deck still relevant? it's supposedly for 0.98 and i'm on the 1.00 beta thingy, i'm wondering if it's like a drastic enough rewrite to just not even bother with the page or not. sorry if i say something... kinda dumb, i'm new to this!

GitHub

A Balatro ModLoader. Contribute to Steamopollys/Steamodded development by creating an account on GitHub.

crisp coral
#

don't bother with the unnumbered pages

narrow pollen
zealous glen
narrow pollen
#

well, it completely screws over green joker and makes other decks solely reliant on interest for money

#

pairs well with economy jokers, obviously

#

so yeah, it's the kind of thing where you go "okay my build is locked in, i'm taking this to squirrel up hands for double digit antes"

zealous glen
#

My original idea was to require specific Poker Hands or ranks to be played. Maybe a suit. But that only becomes easier with more Hands

narrow pollen
#

personally, i did something like that with, uh... lemme grab it

zealous glen
#

Recently I thought it could make you fight an extra boss before the boss

#

Since that costs extra hands

#

And that matches the Showdown Boss that’s related to this Joker

grand violet
#

Hey modders, I am so back
Feel free to ping me to pin stuff in your modding threads
or if you want me to look at something
if you do so while telling an extremely unfunny joke and/or break the rules you are entitled to win a sticker*

~ egg
-# *: Perishable is a sticker that causes you to gain that trait. Perishable Discord accounts will be sold after 5 seconds.

lofty igloo
#

So I just noticed this

#

Hearts and Diamonds have the same colour?

#

In globals.lua

frosty dock
lofty igloo
#

They're in loc_colour though

frosty dock
#

yeah, but not these exact values

lofty igloo
#

Huh

frosty dock
#

they always get overwritten by the values from either SO_1 or SO_2 depending on the high contrast setting

#

low-contrast hearts and diamonds colors are still almost the same though

lofty igloo
#

Ah

#

I see

#

So I have these so far:

    const formatMap: Record<string, string> = {
        RED: '#fe5f55',
        MULT: '#fe5f55',
        BLUE: '#009dff',
        CHIPS: '#009dff',
        GREEN: '#4BC292',
        MONEY: '#f3b958',
        GOLD: '#eac058',
        ATTENTION: '#ff9a00',
        PURPLE: '#8867a5',
        WHITE: '#ffffff',
        INACTIVE: '#88888899',
        SPADES: '#403995',
        HEARTS: '#f03464',
        CLUBS: '#235955',
        DIAMONDS: '#f06b3f',
        TAROT: '#a782d1',
        PLANET: '#13afce',
        SPECTRAL: '#4584fa',
        EDITION: '#ffffff',
        DARK_EDITION: '#000000',
        LEGENDARY: '#b26cbb',
        ENHANCED: '#8389DDFF',
    }
#

I'll add a colourblind setting at some later point

frosty dock
#

EDITION and DARK_EDITION are actually gradients

lofty igloo
#

Wait how does that work? They're listed as {1,1,1,1} and {0,0,0,1} respectively

frosty dock
#

they get changed in Game:update()

zealous glen
#

I did point that out to you earlier :P

lofty igloo
#

Sorry, I've slept since then

frosty dock
#

anything strange here?

weak depot
#

does this loc_txt look right?

frosty dock
#

that is somehow valid syntax, but no

#

the text lines need to be inside a table

#

wrap these 4 lines in {} and you should be good

weak depot
#

:< okie thank youuu

#

sorry if you see a lot of me, i joke famously that i'm a "0.10x developer" but i try too hard for my own good LOL

shell timber
#

0.1x is still better than 0x

frosty dock
#

nws lol

#

i have no excuse, I literally set my nick to smods tech support

weak depot
#

so this?

frosty dock
#

yeah

#

though actually these variables look out of place

weak depot
#

i'm looking at the example LabyrinthDeck mod for it

frosty dock
#

I think what you actually want is this

text = {
  "{C:red}Common Jokers{} are debuffed",
  "Start game with",
  "{C:gold,T:v_liquidation}Liquidation{} and",
  "{C:green,T:v_money_tree}Money Tree{} Vouchers",
} 
#

oh I see, you aren't aware how these work

weak depot
#

ah

frosty dock
#

#n# for any integer n refers to a variable passed from loc_vars in nth position

#

+#1# gets self.config.discards, which is 5, to replace the #1#

weak depot
#

does T show a preview of the voucher when hovered over, i imagine?

frosty dock
weak depot
#

ooh i see now

#

thank you :>

frosty dock
#

np

crisp coral
#

so the issue is that when someone was working on this, they hardcoded it to 6 rows

frosty dock
#

yeah there's a way to fix it, it's adding pages

crisp coral
#

eh, pages are probably not needed until we have like 500 of them anyway

frosty dock
#

I took care of it in the laziest way possible, is all

#

tbf it already looks pretty bad with 70 blinds

crisp coral
#

readable

#

ish

frosty dock
#

sort of

limpid flint
frosty dock
#

improved config loader is up, it now grabs defaults from <mod dir>/config.lua and uses Mods/config/<mod id>.lua as the main config file

#

additions tab colors are also fixed

lofty igloo
# frosty dock

So self.TIMERS.REAL is the amount of time since the game started or?

#

Since it's updated with delta time each frame

frosty dock
#

G.TIMERS.REAL since you're usually not in a function of Game usually

#

but yeah

weak depot
#

i'm like 70% sure the "G.jokers.cards:set_debuff" thing is how i'd need to debuff a given joker, but how would i do that whenever you're playing a specific deck? (from blind.lua, about line 595)

#

in this case, this one

#

that i'm working on-

zealous glen
#

The game has a function that’s called to apply deck effects. You could inject it (or create a hook) at some specific moment with a custom context

#

Although I don’t know how appropriately the effect works as a deck effect

zealous glen
#

As in, most Jokers you see in the shop will be completely useless, so you’re just rerolling until you hit anything

weak depot
#

i'm trying to design a deck which is based off snowballing with money

#

i wasn't entirely sure what other thematic debuff it could've had

#

any suggestions are welcome :>

zealous glen
#

Something that spends or makes it harder to generate money is what immediately comes to mind, but that might be too linear

weak depot
#

the entire thought is around the idea that you'd be hoarding all the wealth, a la billionaires

zealous glen
#

You’re not really hoarding just rerolling a bunch

weak depot
#

yeah fair enough

zealous glen
#

And the lack of choice seems a bit uninteresting

weak depot
#

:(

#

okay

zealous glen
#

Maybe if the Jokers came with the sticker that debuffs them after 5 rounds

weak depot
#

thank you :>

zealous glen
weak depot
#

that's the current plan

languid mirage
lofty igloo
#

Preview variables are also in now

austere schooner
#

right so, if you want to make a booster pack, is there just an SMODS.BoosterPack(whatever) for that

#

or .Pack or w/e

crisp coral
#

yeah it's SMODS.Booster

brisk pond
lofty igloo
#

Also finally managed to turn the code preview into m6x11plus

#

perfection

obtuse scarab
#

If Bala, then only Tro! 🔥

zealous glen
#

Multiple choice window when

brisk pond
#

does someone know which variable in function generate_card_ui(_c, full_UI_table, specific_vars, card_type, badges, hide_desc, main_start, main_end) is the card?

edgy reef
#

None of those. It's added in by Steamodded.

#

Position would be after main_end

languid mirage
austere schooner
tepid crow
#

not everything is in the docs

rough furnace
#

although in that case, I probably will want an api to write and read the config myself

unkempt thicket
#

how do you check if a card is a playing card?

austere schooner
#

so how are you meant to know how to use the function, steal code from a different mod that's already done it??

frosty dock
rough furnace
#

(this doesn't work on the ace on the title screen, but will probably not affect you)

frosty dock
tepid crow
rough furnace
#

Oh I don't need this but I was thinking, per profile mod config

rough furnace
#

Okay

#

Chances are I'll probably want that

frosty dock
rough furnace
#

I mean that won't work with lovely mods but also I sometimes test with different profiles and keep mods

#

And some mods you just want on all profiles

frosty dock
#

lua_reload is broken and the next best thing we have is a hard reload

rough furnace
#

I mean we just need to bribe meth to fix lovelt on the reload thing and then we can reload

frosty dock
#

yeah but that's still technically restarting the game

rough furnace
#

Yes but it isn't that bad and fairly east

frosty dock
#

well I sure don't have a better solution that actually works

#

I just think that it doesn't compare well enough to restarting with a different mod dir that it's worth caring about concerning different setups rn

rough furnace
#

fair enough

#

oh also I'm not sure, but if we save config in .jkr file steam might cloud save it

#

ok I found the thing

#

looks like any .jkr file at in the top level or one folder deep will be saved

frosty dock
#

well rn it's saved 2 folders deep

rough furnace
#

just slap it in Config/<modId>.jkr

frosty dock
#

I'm not sure how I feel about going outside the mods dir

rough furnace
#

I did look at like the 2 games I mod and they put stuff in not the mod's folder

frosty dock
#

well the save dir always exists so it's fine ig

rough furnace
#

I would perfer that only mods go in mods and not mods go in not mods

frosty dock
#

well mod config is clearly mods

rough furnace
#

yeah but config is clealy config

#

to be fair 90% of users aren't goujng to touch it

frosty dock
#

alright I'll make that change just to support cloud save

rough furnace
#

You could pull a celeste and just fill the saves folder

#

oh also minecraft mods stick mod config in the config folder

frosty dock
#

never thought I'd be using SMODS colon lmao

rough furnace
#

maybe a current_mod:save_mod_config would make more sense?

frosty dock
#

it's meant to be used like SMODS.save_mod_config(mod)

#

it's just that for steamodded config, the mod object is SMODS

#

ig i can allow per-mod bypass functions though

rough furnace
#

oh

#

that makes sense

frosty dock
lament fjord
#

Okay, I isolated my investigation to just one lovely patch file of my own writing, for some reason require("string.buffer") does not work at all

#

f...rick

weak depot
#

trying to add a deck back sprite, any help?

frosty dock
frosty dock
#

yeah

#

you can remove prefix_config though, you only need that for overriding vanilla sprites

weak depot
#

thank you :>

#

i hope that sprite looks okay-

brisk quartz
#

or would that be too strong?

lament fjord
#

Frustratingly, by all rights require("string.buffer") should be Right There (balatro runs on Love2d 11.5, and uses luajit, so it should be available)

#

I've tried to find a luajit compile option that would disable string.buffer, without success, so I'm stumped

wintry solar
wooden nexus
lofty igloo
wooden nexus
#

Nice

wooden nexus
lofty igloo
#

Yeah

wooden nexus
#

Nice

tepid crow
#

yo guys does balatro have a memory leak in the new run/continue run menu?

#

I notice the fps noticeable decreasing just by opening/closing the menu multiple times

lament fjord
#

Memory leaks are characterized by unbounded amount of memory use

austere schooner
#

okay so i got a booster mostly working, but it just calls the booster pack ERROR during the pack itself - where do I actually set that

lament fjord
#

That just sounds like the game doing a lot in a short time

#

GC takes time you know

edgy reef
#

Which is the key to the localized booster pack group text.

#

It would look something like this if you use a localization file.

tepid crow
edgy reef
#

Can also be set with SMODS.process_loc_text under G.localization.misc.dictionary.

lament fjord
#

The question is if it goes down when you wait

#

If it does, then that's just GC catching up to the allocations

tepid crow
#

...

#

pretty sure GC aint supposed to take more than a couple seconds

#

but sure, I'll check

austere schooner
#

bleh whatever the packs are functional at least

tepid crow
lament fjord
#

I see

tepid crow
#
2024-07-21 13:17:07 :: #G.STAGE_OBJECTS, #G.MOVEABLES =   2317,  78245
2024-07-21 13:17:08 :: #G.STAGE_OBJECTS, #G.MOVEABLES =   3310, 113137
...
2024-07-21 13:17:22 :: #G.STAGE_OBJECTS, #G.MOVEABLES =  18655, 637339
2024-07-21 13:17:23 :: #G.STAGE_OBJECTS, #G.MOVEABLES =  19678, 672292

hmmmm 🤔

#

pretty sure those aren't supposed to be growing infinitely
whatever, not my problem

austere schooner
#

okay new problem, my booster packs don't actually natraully show up in the shop (ok i have found 1 common pack in like 30+ boosters), how fix
have i misunderstood how weight works and it should be a lot higher than 1

tepid crow
edgy reef
#

There are a bunch of packs that use 1 so it's not always going to appear if it's set to that.

tepid crow
#

in the normal game they range from 4-0.07

austere schooner
#

what's the normal buffoon pack set at, 2 or 1

tepid crow
austere schooner
#

aha

#

there is nothing here with weight 4 i have been lied to

tepid crow
#

haha yeah, I summed the variations together

#

since they're the same thing, just a different image

unkempt thicket
#

been reviving a little project, still can't figure out denominators exactly but I'm getting there.

#

I should be able to do most of them without denominators, and 4 of them are in-game working as intended

brisk pond
#

is there a moment in the game where card.ability == nil?

crisp coral
#

no

brisk pond
#

great

brisk pond
#

the value in the deck viewer is always 1 more than it should be

crisp coral
languid mirage
limpid flint
#

And then modding-dev turn into modding-chat

languid mirage
#

finally figured out how to fix money scaling

#

I love vanilla number formatting 😭

hallow forge
#

lawsuits in balatro

languid mirage
crisp coral
#

floating point moment

wintry solar
hallow forge
#

too late

languid mirage
#

kinda sad that lua doesnt have built in math.round

maiden phoenix
frosty dock
tepid crow
languid mirage
#

I see

tepid crow
#

But don't quote me on that 😅

zealous glen
opal spade
#

the negative shader doesnt work properly until at least one card is made negative, idk why

opal spade
#

if you try to draw a sprite using the negative shader, it wont display correctly until at least one negative card is created

wintry solar
#

Can you show me your code and a screenshot of how it displays?

opal spade
#

and this is after

wintry solar
#

Try calling the dissolve shader first

opal spade
#

even with dissolve shader it seems to do the same thing

wintry solar
#

How does it look with other shaders instead of negative?

opal spade
#

dissolve, polychrome

#

this broken negative behavior can be recreated by cycling through editions of playing cards in deck view (with them rendering incorrectly until an actual negative card enters the game)

wintry solar
#

does it work if you send this as the third argument?

self.ARGS.send_to_shader = self.ARGS.send_to_shader or {}
self.ARGS.send_to_shader[1] = math.min(self.VT.r*3, 1) + G.TIMERS.REAL/(28) + (self.juice and self.juice.r*20 or 0) + self.tilt_var.amt
self.ARGS.send_to_shader[2] = G.TIMERS.REAL```
languid mirage
opal spade
#

yes, but it's specifically about negative shader

languid mirage
#

but it's kinda weird

#

that negative doesnt work

brisk pond
opal spade
languid mirage
opal spade
#

i already have a workaround in mind, but yeah - negative behaves strangely

languid mirage
#

that's how shaders are usually drawn

#

well, for you without _shine

brisk pond
#

is there a part of the card table that tells in which cardarea the card is?

opal spade
languid mirage
languid mirage
#

ah, right

brisk pond
wintry solar
brisk pond
#

now my mod works, but I'd like to add a config menu in the Mods category so that you can tweak some parts of the mod

#

Like, I click my mod in the mod menu and a Config button appears

wintry solar
#

Do you understand the ui of the game?

brisk pond
#

no

#

it would be a nightmare for me

wintry solar
#

Then find someone to do it for you

brisk pond
#

lol

frosty dock
#

settings ui isn't that terrible tbh

#

seen way worse

shell tangle
#

I've been looking at it myself, but would appreciate it if someone put some notes together on what things are often used, like the different options to align, and where in the world I'd find G.UIT to figure out what the different letters after that mean. Would probably be useful for several people, in the same way going through how all the contexts when calculate called was absolutely amazing.

wintry solar
shell tangle
#

Would be very much appreciated, your calculation guide is the first thing in my modding bookmarks.

sonic mortar
#

i really need some help, i've been trying to fix this for the past few hours and i simply just can't.

this joker is supposed to give mult per scored club
the operation Emult (exponential mult) is obviously not vanilla, but even vanilla operations don't work

all checks are passing, the return value is just physically doing absolutely nothing, no matter what

i've tried running the mod on its own with only its dependencies and still nothing. i've tried calling this without any if statements and still nothing. i'm stumped.

wintry solar
#

Can you show the full function?

wintry solar
unkempt thicket
#

how do you find out whenever odds is triggered?

sonic mortar
frosty dock
#

so I'd say you don't

shell tangle
sonic mortar
#

that crashes.

wintry solar
#

I mean the definition as well

sonic mortar
#

this worked completely fine before, and now it just doesn't

shell tangle
# sonic mortar that crashes.
    if context.individual and context.cardarea == G.play then
      if context.other_card:is_suit('Spades') then
          return {
            chips = card.ability.extra.chips,
            card = context.other_card
          }
        end
    end
    ```
This works fine in my mod, but it is different from `chip_mod`, don't know if your Emult will have something similar.
sonic mortar
#

there is, it should be e_mult, let me try something then

wintry solar
#

Have you got a link to talisman handy I can take a look at?

sonic mortar
spiral cypress
#

I'm looking at the custom joker mod template that comes with steamodded and I've stared at this for ages and still just can't parse it

#

there's no comments explaining it and the github documentation doesn't help either MintDerp

wintry solar
sonic mortar
#

i will in a moment, just doing another test

spiral cypress
#

I've tried looking at how other more recent mods have done their code but to me at least they all look formatted differently

sonic mortar
shell tangle
sonic mortar
#

card = card does the same thing, the only thing it changes is that leshy does the juice-up instead of the playing card

shell tangle
#

Very odd. Tested mine just to make sure, but it doesn't do anything weird. What happens if you change e_mult to just mult?

sonic mortar
#

i don't know, maybe i've fucked something up with talisman but either way holy shit this is getting a little crazy to debug slugsweat

maiden phoenix
#

Also yea I feel like this example's tool old?

sonic mortar
#

yeah... i think i've done something wrong with talisman

#

i've changed it to just mult and now the text is appearing on the playing card

#

well, thanks very much

shell tangle
# spiral cypress I'm looking at the custom joker mod template that comes with steamodded and I've...

Few things to take a special note of, one is config, usually has something like config = {extra = {mult = 5}}. The extra is just because it sometimes doesn't load properly otherwise, I think.

loc_vars often gives things to your description - info_queue is the stuff on the side, like when a card is negative, but is somewhat finicky, better off looking in other places for a better example. Usually, you want to return something like {vars = {card.ability.extra.mult}}, and then, in your description, when you have #1#, it'll change to the 5 from config.

Other than that, calculate does all the work. Usually, it checks for contexts, to see what step of scoring the game is at. That SMODS.end_calculate_context(context) is basically just if context.joker_main then and does the stuff after. It has a return that tells the joker what to do, in this case, mult_mod grabs the mult from config, and has the joker apply it, and the colour and message give a small pop-up underneath the joker when it gets activated.

frosty dock
#

oh shit I should have spotted that, thing_mod doesn't work on individual

sonic mortar
#

well, either way we've found the cause now

shell tangle
sonic mortar
#

i'll get to work on fixing everything, thanks very much, especially to @shell tangle

spiral cypress
#

like if I'm working on a blank project what does any of this even mean or refer to

maiden phoenix
#

Those are old docs hold on

spiral cypress
#

yeah no worries
I don't wanna come off as rude I'm more annoyed at myself for not just getting it lol

maiden phoenix
#

I mean everyone starts somewhere

shell tangle
spiral cypress
#

oh sorry thanks for pointing that out idk why I didn't see it first time

#

ok yeah I assumed for basic functions like just a flat mult + it was handled in config

shell tangle
#

Yeah. You can look around card.lua in the source code to find how vanilla does it, but rather than each individual joker having calculate, it calculates all at once, so every card that activates on context.joker_main will be under a single if context.joker_main, rather than every single vanilla joker having it in their code.

#

Whatever vanilla returns, like chips_mod or mult_mod will usually work in the calculate function as well.

wintry solar
#

Note that joker main isn’t in the source, it’s added by smods

#

The joker main stuff is just at the end of the tower after all the context checks

spiral cypress
#

okay thank you both that's clearing some stuff up
so it seems loc_vars just isn't really relevant at least not for me right now

shell tangle
#

The joker will function without it, yeah, but it's how you put variables into your description to let people know how it works.

wintry solar
#

It’s better to use loc_vars for any values in your description, makes it easier to make changes

spiral cypress
#

still confused about

        if SMODS.end_calculate_context(context) then
            return {
                mult_mod = card.ability.mult,
                colour = G.C.RED,
                message = "AHAHAHAH"
            }
        end
    end,```
the first three lines I just assume are y'know, "when turn ends do this"
4th line is mult, tho idk why it's both here and in config
and 5th and 6th with the message and color I've got no clue, it's sending a text string during scoring?
maiden phoenix
#

Colour is the background color of the message that'll show up when it's the end of turn

wintry solar
#

Basically the calculate just sends some values to a different function that actually calculates your score

shell tangle
#

The 4th line is telling the joker. your mult_mod is equal to card.ability.mult. The config itself sets card.ability.mult to a value, I think it's 4 in the example joker. And, yeah, the message is just replacing the +4 mult that'd appear.

wintry solar
#

So you need to give it all the relevant information;
1 - what you are changing
2 - a message to display
3 - a colour for the background of your message

spiral cypress
#

ohhhhhhhhhhhhhhhhhhh

#

I assumed this was an automated string that was just factored into the core game's scoring UI

#

not a customizable string unique to the card

wintry solar
#

Some things don’t need a message and colour

shell tangle
#

It usually is, but can be overridden.

wintry solar
#

They automatically work out a message

shell tangle
#

Maybe I should make a few vanilla jokers into a modded format, give them comments and such, but I don't know if that'd be fine to have on the github because it might be considered sharing source code.

spiral cypress
#

see, I would've figured that out had I seen the card in-game but obviously the game was crashing with my unfinished mod in there
and even if I did disable it I haven't enabled debug yet

wintry solar
#

Making a vanilla joker into the api wouldn’t be source code

languid mirage
#

^

spiral cypress
#

honestly I think it just needs a few dev comments
since no other card has personalised scoring strings to my knowledge having AHAHA threw me off super hard

wintry solar
#

Honestly, a lot of the docs are great at telling you what you can do but not what it does or how to use it properly

languid mirage
#

Literally 99.9% of lovely patches are source code

wintry solar
#

You need to understand the games source code really to know how to use things

spiral cypress
#

tbf I'm sure if I did a bunch of lua basic lessons or whatever it'd be easier but I have a habit of just picking a random moddable game and tryna get something on screen asap

wooden nexus
#

I still need to do effects but hey, it's a start

maiden phoenix
#

What it do? 👀

wooden nexus
#

It's the start of archived tarots

maiden phoenix
#

oooh

languid mirage
#

redoing archived for 1.0.0?

wooden nexus
#

Yeah, slowly but surely

shell tangle
#

Alright, going to try converting some vanilla mods to SMODS with comments, and maybe show off some minor modifications that can be done with mods. I want to show off several examples of different things that happen, so how does this list of example jokers look so far?

Joker - Used to explain the basics
Runner - Shows how to scale things
Golden Joker - Shows how to add money at end of round
Merry Andy - Shows add_to_deck, remove_from_deck, and changing discards.
Sock and Buskin - Shows how to retrigger cards
Perkeo - Creating cards, and end of shop context, as well as soul_pos
Walkie Talkie - Shows off testing for individual cards
Gros Michel - Pool flag, maybe modified with a version that gives you a modified custom banana upon brealing, to show create_card with a modded prefix.
Cavendish - Pool flag, simple X mult.
languid mirage
wooden nexus
wintry solar
shell tangle
#

Good call. I'll do Walkie Talkie to test for multiple values.

mellow sable
#

i mean you are going to have to change some things like sprites, names, and a few effects

lusty epoch
#

Minimum ante too
I tweaked some of those a bit

solemn coral
#

Balancing question: Can I get some opinions about this idea as a deck?

hallow forge
#

OP

solemn coral
#

The idea is that it serves an an emergency button, where if you think you're going to lose you can sell a joker and get an extra burst. However, in the three games I played, two of them I won without using this ability once, and one I dumped all three non-Eternals and still lost during that round

hallow forge
#

Riff raff abuse

solemn coral
#

Didn't consider Riff Raff, yeah

rough furnace
#

Also campfire players go brrrr

#

Maybe minus a joker slot or 2 would help balencr

lusty epoch
#

Like once per round

rough furnace
#

Imagine this deck when infinite invisible chains were possiblr

fallen tendon
#

Are the hand and discard permenant?

solemn coral
#

No, it's just for the current round

tepid crow
#

oohhh

#

that seems fine then, maybe even underpowered?

solemn coral
#

Yeah, I don't know.

#

I think I'll keep the effect as-is, maybe add a limit of max 3 uses per round. Even if I'm not the biggest fan of it, it looks like there's ways to make it work, so hopefully someone manages to have fun with this deck

gilded narwhal
#

No riffraff abuse

#

This would actually be a pretty cool challenge

#

Like "start at 1 hand and 1 discard, selling a joker during a round gains +1 hand and +1 discard"

#

Also question about lovely

brisk quartz
#

though i guess you could sell an econ/util joker 🤔

#

i'd keep as is tbh

gilded narwhal
# gilded narwhal Also question about lovely

If I place something after a target that appears multiple times, like for example

if ante <= 8 then return amounts[ante] end
appears 3 times and if I place something after it does it place it all 3 times?

hushed cradle
#

anyone got any idea why the game doesnt like having 2 text inputs at once?

frosty dock
#

it appears to just be coded that way because it was more convenient

#

a text input UI element has config.id set to 'text_input' and it seems like there can't be two UI elements with the same ID

#

changing that ID probably breaks something, but it's worth trying

hushed cradle
#

hmm

#

ill see what i can do then

#

its good to know the root of the problem at least

#

thanks

gilded narwhal
#

Good

frosty dock
#
local t = create_text_input(...)
t.nodes[1].config.id = 'text_input_2'

this would likely be where I'd start

hushed cradle
#

thanks

hushed cradle
#

i might be able to my own id right

#

and just set it to that

gilded narwhal
#

Hey so is there anything beyond just me being bad at programming that stops the ante base from being changed mid-run

frosty dock
gilded narwhal
#

Maybe

#

Lemme see if that fixes it

#

Nope

#

Also here's where I'm using it

hushed cradle
#

are you sure its dependent on id?

#

ah

#

ik why

#

its because another node deeper in has an id too

#

i think

#

nope nvm