#💻・modding-dev

1 messages · Page 67 of 1

drowsy tulip
#

ye

tepid crow
#

yeah pretty sure it doesn't exist

drowsy tulip
#

wait

#

i think i get it

zealous glen
#

@wintry solar how's the texture mod going

wintry solar
#

Haven’t done much work on it recently, it currently words for just jokers with the priority system we were discussing. I’ve been figuring out what I want the selection UI to look like, that’s my next step before extending it across other objects

tepid sky
#

texture mod?

zealous glen
wintry solar
#

Yeah that’s what I’m doing just workshopping some different layouts

solid salmon
#

wait does apply_to_run exist

wintry solar
#

yes

tepid crow
#

It exists for decks yes

solid salmon
#

look at this abomination that i've made (only half of it works)

zealous glen
#

wrong syntax

#

Actually, despite the confusing way of writing, I think the syntax might be correct

#

Even if it doesn't seem to make sense

solid salmon
#

i just want more cards

#

also i checked the back lua

#

function Back:apply_to_run()

wintry solar
#

no this is horrendously written

maiden phoenix
#

Holy shit..

solid salmon
#

I have never made a back before

zealous glen
#

I was just commenting on the syntax because I thought the number of ends didn't match, but on second look I think they are correct in number

#

but the semantics…

solid salmon
#

Imma look over some more code

regal wolf
#

please for the love of god

#

also, too many ends

tepid crow
#

one of those ends is to close apply_to_run

#

like Victin said, syntax seems correct, even if the code doesn't

regal wolf
#

oh god

#

i didnt even notice that

#

please get a formatter 😭

tepid crow
#

^ yeah please get one

solid salmon
#

what do you recommend

regal wolf
#

and just paste this file into the root of project directory

solid salmon
#

the what

regal wolf
#

the base

#

yk like

#

<mod_directory>/<mod_files>

#

for example:

#

that way the formatter will run on save.

tepid crow
#

tab size of 2???

regal wolf
tepid crow
#

yes yes

#

tabs into 2 spaces??

regal wolf
#

bc it gets overwritten

tepid crow
#

I mean, consistently 2 spaces is better than inconsistent at least

edgy reef
#

I think that's controlled by VSCode yea

regal wolf
#

spaces >> tabs. space size 2, google formatting is best.

edgy reef
#

I go between 2-4 spaces per tabs depending on if it's filled with Thunk UI nonsense or not.

regal wolf
solid salmon
#

...

regal wolf
#

it's just more compact than 4

tepid crow
#

sure

#

I've just always been used to 4

regal wolf
#

yeah i mean fair

#

i used to use 4 as well

tepid crow
#

Thunk is fancy, sometimes he uses 4 and sometimes he uses 2

regal wolf
#

as long as it's space , doesnt really matter

solid salmon
#

..why exactly do i need a formattor?

tepid crow
regal wolf
#

makes it easier to get help from people.

tepid crow
#

makes a LOT easier for other people to read your code

regal wolf
#

makes it easier to understand code.

solid salmon
#

ok

#

but im am confused

#

as in how to set it up

regal wolf
#

with what

solid salmon
#

like i downloaded it

regal wolf
#

download this extension

#

restart ur vsc

solid salmon
#

ok

regal wolf
regal wolf
#

unless u want to manually run format it every time

solid salmon
regal wolf
#

for example

#

the mod directory/ur mod name/

#

where ur code is basically

solid salmon
#

oh

#

so other deck/jokers/tarots/enhancements/packs/vouchers

regal wolf
#

i have no idea what ur code looks like

#

so i dont know

solid salmon
#

So

#

Othermod the file

plain wyvern
#

print debugging is for noobs. we crash the game on purpose in here

edgy reef
#

error():

plain wyvern
mellow sable
mellow sable
#

Some of the code is formatted SO BADLY

edgy reef
#

The Misc.lua file is a mess

#

I'll likely not use for my project because I already ingrained good formatting practices.

#

and none of the mods are collabs so nobody has a reason to look under the hood.

#

🤫

mellow sable
#

Ankh is formatted even worse

#

But that works to its benefit

edgy reef
#

The create_UIBox_options hook that literally has no tabs or spacing whatsoever:

plain wyvern
#

my editor auto-formats tabs and stuff

#

though my indenting is all tabs which may be debatable

solid salmon
#

also

#

how do i make a deck not crash

#

in galdur

regal wolf
solid salmon
wintry solar
#

give it a proper localization

solid salmon
#

what the hell

#

i can't read that

#

good news

#

it now comprends the fact that it's supposed to boost packs

#

bad news

#

it crashes

hardy viper
solid salmon
#

huh

hardy viper
# solid salmon huh

A newline (frequently called line ending, end of line (EOL), next line (NEL) or line break) is a control character or sequence of control characters in character encoding specifications such as ASCII, EBCDIC, Unicode, etc. This character, or a sequence of characters, is used to signify the end of a line of text and the start of a new one.

solid salmon
#

i forgot to put a comma

regal wolf
regal wolf
# solid salmon huh

Bro maybe u need to read up about like computers 😭 u didn’t know what the root directory was before 😭

hardy viper
# regal wolf I’m dead

pasting wikipedia articles with no explanation is my favorite flavor of passive aggressiveness

crisp elbow
#

Common ai goku l

placid frigate
#

yeah i don't know what I did but it works now i guese

tepid crow
#

so now I can always do sendDebugMessage("var = " .. tprint(var)) regardless of the type 😌

hardy viper
#

doesnt steamodded have something for that

tepid crow
#

does it??

hardy viper
#

swear i heard someone say it does

wintry solar
#

inspect_depth or something iirc

#

it should be in utils.lua

tepid crow
#

if type(table) ~= 'table' then
return "Not a table"
hmmm, not exactly what I need lmao

hardy viper
#

why would you run inspect_depth on something thats not a table though

tepid crow
#

sometimes I just need it to print

#

I could also use tostring but then I can't read table output

hardy viper
#

even then, you can just do like

tprint = function(thing)
  if type(thing) == "table" then
    print(inspect_depth(thing, 10))
  else
    print(type(thing)..", "tostring(thing))
end
#

i think jenlib has something similar that doesnt require a depth input and just doesnt repeat recurring tables

tepid crow
#

... Yes thats basically what my tprint is?

hardy viper
#

i thought you didnt know about steamoddeds inspectdepth...?

tepid crow
#

Oh. No, I didnt

#

it's basically just inspect_depth but with custom depth

#

here it is, if you care

local function tprint(tbl, max_indent, _indent)
    if type(tbl) ~= "table" then return tostring(tbl) end
    if not _indent then _indent = 0 end
    if not max_indent then max_indent = 32 end
    local toprint = string.rep(" ", _indent) .. "{\r\n"
    _indent = _indent + 2
    for k, v in pairs(tbl) do
        toprint = toprint .. string.rep(" ", _indent)
        if (type(k) == "number") then
            toprint = toprint .. "[" .. k .. "] = "
        elseif (type(k) == "string") then
            toprint = toprint .. k .. "= "
        end
        if (type(v) == "string") then
            if k == "content" then
                toprint = toprint .. "...,\r\n"
            else
                toprint = toprint .. "\"" .. v .. "\",\r\n"
            end
        elseif (type(v) == "table") then
            if _indent > max_indent then
                toprint = toprint .. tostring(v) .. ",\r\n"
            else
                toprint = toprint .. tostring(v) .. tprint(v, max_indent, _indent + 1) .. ",\r\n"
            end
        else
            toprint = toprint .. tostring(v) .. ",\r\n"
        end
    end
    toprint = toprint .. string.rep(" ", _indent - 2) .. "}"
    return toprint
end
#

also removes the "content" key for some reason

#

I think that just reprinted my entire mod's code again

regal wolf
rustic flint
#

i added a joker!!!

#

now its time to figure out how to do uh

#

literally everything else 😭

rustic flint
#

how does one test a joker they've made

#

without like going into a game and trying to find it

rough furnace
#

DebugPlus

#

Can spawn jokers from the collection by pressing 3 and has a bunch of other stuff for testing stuff

rustic flint
#

ah ty!!!!!

mellow sable
#

probably the most cursed bug I've encountered so far modding this game

rustic flint
#

😦

sleek badge
#

Just make a 1.2 card

rustic flint
#

all cards in between ace and 2

mellow sable
#

is there an easy way to reset the size of the sprites of a joker before doing more things with it, so you start with a clean slate?

#

because reapplying the size changes messes things up

languid mirage
#

or what do you need exactly

mellow sable
#

I’m replacing the sprite of a joker completely, an arbitrary number of times

#

But it runs into the same bug that you see when spawning a resizing joker in debug mode

tepid sky
tepid sky
#

is there a way to look if the player finished a blind?

#

i cannot seem to be able to find it :(

maiden phoenix
#

For jokers?

tepid sky
#

nope no joker

maiden phoenix
#

Maybe check around the payout function

tepid sky
#

good idea

solid salmon
tepid crow
tepid sky
primal robin
#

UI desync

regal wolf
# tepid crow here it is, if you care ```lua local function tprint(tbl, max_indent, _indent) ...
local function tprint(tbl, max_indent, _indent)
    if type(tbl) ~= "table" then return tostring(tbl) end
    
    _indent = _indent or 0
    max_indent = max_indent or 32
    local indent_str = string.rep(" ", _indent)
    local toprint = indent_str .. "{\r\n"
    
    _indent = _indent + 2
    for k, v in pairs(tbl) do
        local key_str = (type(k) == "number") and "[" .. k .. "] = " or k .. "= "
        local value_str
        
        if type(v) == "string" then
            value_str = (k == "content") and "..., " or "\"" .. v .. "\", "
        elseif type(v) == "table" then
            value_str = (_indent > max_indent) and tostring(v) .. ", " or tprint(v, max_indent, _indent + 1) .. ", "
        else
            value_str = tostring(v) .. ", "
        end
        
        toprint = toprint .. string.rep(" ", _indent) .. key_str .. value_str .. "\r\n"
    end
    
    return toprint .. indent_str .. "}"
end

tepid crow
# regal wolf ```lua local function tprint(tbl, max_indent, _indent) if type(tbl) ~= "tabl...

There's some good stuff in here.

  • I like the key_str and value_str, this is probably easier to parse mentally
  • I see you've gone for a lot of ternaries. The shorter ones are really nice (love the _indent = _indent or 0 stuff!), but some longer ones are becoming really hard to read imo
  • I like local indent_str = string.rep(" ", _indent), it's just unfortunate that you have to use string.rep(" ", _indent) later anyway, so I don't really see the point of it?

I've combined some elements and cleaned some parts up a bit. This is what I've ended up with:

local function tprint(tbl, max_indent, _indent)
    if type(tbl) ~= "table" then return tostring(tbl) end

    max_indent = max_indent or 32
    _indent = _indent or 0
    local toprint = string.rep(" ", _indent) .. "{\n"

    _indent = _indent + 2
    for k, v in pairs(tbl) do
        local key_str, value_str

        if type(k) == "number" then
            key_str = "[" .. k .. "]"
        else
            key_str = tostring(k)
        end

        if type(v) == "string" then
            if k == "content" then
                value_str = "..."
            else
                value_str = '"' .. v .. '"'
            end
        elseif type(v) == "table" and _indent <= max_indent then
            value_str = tostring(v) .. tprint(v, max_indent, _indent)
        else
            value_str = tostring(v)
        end

        toprint = toprint .. string.rep(" ", _indent) .. key_str .. " = " .. value_str .. ",\n"
    end

    return toprint .. string.rep(" ", _indent - 2) .. "}"
end
regal wolf
#

I experimented with some other stuff, but ended up feeling like it didn’t make it more readable

#

There wasn’t as much to change as I thought there would be tbh

#

I thought there’d be a nice way to remove the if type == table etc, but it didn’t really end up being that nice

tepid sky
#

how would i be able to check if a boss was defeated?

agile rain
#

Hey! I've been trying to make a localization mod with the italian community feedback based on the Better FR Localization mod, but that isn't compatible with Steamodded 1.0.0 Alpha anymore and I don't get how to load the custom it.lua through steamodded Think1

frosty dock
tepid sky
#

now i can make pirrrate language

#

or other memey languages out of minecraft lol

agile rain
abstract venture
#

yall how do i make my own ability, like what cryptid does with its rigged sticker?

#

not sure how or where to set one up

hardy viper
#

look at what cryptid does with its rigged sticker and copy it

#

generally the solution to everything is to copy other peoples hard work take inspiration from those before you

abstract venture
#

thats what ive been trying 😔

#

isnt working for what im tryna do

mellow sable
#

sticker api is good for this, tbh
and Rigged is a good reference

abstract venture
#

im using stickers, just cant seem to get the sticker on a card using a consumable

#

rigged has been a good ref tho 🙏

hardy viper
#

i checked github there doesnt seem to be anything there in any of the related sections

abstract venture
#

yea

#

im just going off of cryptid lol

mellow sable
#

but docs are lagging behind a bit

abstract venture
#

ohh

#

is it ok to have my own atlas for the stickers? or should i just call the spritesheets sticker(s).png

#

nvm urs is called something else so imma guess not to use the same name

hallow forge
#

how would one check if a mod is disabled?

#

with code

rustic flint
#

can someone tell me what's going on with this cause i've been trying to figure it out, the description just says +nil, i feel like i set the var wrong but i don't know how

surreal marsh
rustic flint
#

so how do i set it before calculation

#

oh wait

#

i got it

#

my bad

tepid sky
shell timber
#

okay, i haven't used steamodded at all since 0.9.8

#

how on earth does 1.0.0 actually work

muted pier
#

lua objects

shell timber
#

well i gathered that

maiden phoenix
#

Doing a little trolling

muted pier
#

alright time to figure out why my lua mod wont even be registered by steamodded

crisp elbow
#

Do you have the header

muted pier
#

apparently im missing author from the header?

crisp elbow
#

Sounds about right

muted pier
#

figured it out...

#

"S"

crisp elbow
#

S?

maiden phoenix
#

Yea, it's "MOD_AUTHOR" not "AUTHORS"

crisp elbow
#

m author

shell timber
#

is there a way to apply a specific edition to a joker using debugplus?

tepid sky
#

q

shell timber
#

brilliant.

tepid sky
#

i still don't know who paul is

plain wyvern
#

shoutouts to Paul

limpid wing
#

Who is paul?

limpid flint
#

Paul

shell timber
#

also; a nerf to coupon catalogue(?)

#

well not really a nerf

#

it was just a really broken common

maiden phoenix
#

More Fluff update let's go

limpid flint
#

Pogging

shell timber
#

there probably won't be any new content

#

apart from new colours for cryptid and familiar(?)

#

and maybe ortalab

#

finally useful

#

(i should make that say slots if if gives more than 1)

languid mirage
#

Slot(s)

#

unless you want to hardcode plural localization

tepid crow
shell timber
#

i was going to do that as well yeah

tepid crow
#

💙

hardy viper
shell timber
#

oh god how on earth is hammerspace colour cards gonna work

languid mirage
#

tbf you can probably add separate loc strings for plural and singular
then in loc_txt use localize(key), while choosing key based on if it's plural/singular

shell timber
limpid flint
#

there are no decks in morefluff right

shell timber
#

there are four

limpid flint
#

then maybe card sleeves?

shell timber
#

yeah im gonna do that

#

oh boy, what fun

#

probably quite strong with some of the cryptid / jens stuff actually

opal spade
frosty dock
#

ayo even more fluff

tepid crow
sonic mortar
#

i wish there was a mod that loosened the movement on cards, make everything jiggly just for the funny

#

based on the artifact you get when the game's FPS is horribly low

maiden phoenix
tepid sky
#

nah thats crazy

drowsy tulip
#

trying to load a .toml patch and this error shows up even if the payload is completely empty what do

#

this is the entire file

tepid sky
#

just out of curiosity what are u trying to do? :P

drowsy tulip
#

trying to make a boss blind that triggers an effect during the final scoring step and this was the best way that i found

tepid sky
#

ooh funny

#

i don;t even think you'd need a patch for that?

#

do you?

drowsy tulip
#

if you find a better way please let me know

tepid sky
#

just use if args.context == 'final_scoring_step' then (add code you want to happen)?

drowsy tulip
#

yeah but it still needs to be in a function i think

tepid sky
drowsy tulip
#

and there isnt a function that can do that for boss blinds

#

unless calculate works?

tepid sky
#

i mean it balances the chips and mult? thats something a function does right?

#

and you can use "args.context == 'final_scoring_step' your self

#

maybe try to use it to print a number

drowsy tulip
#

yeah but that's a part of backs.lua and im not sure if its gonna work

#

i will experiment later

tepid sky
#

i'll try smth rq

#

hmm

#

yea it didn't like that

#

you do need a function ;-;

crisp coral
#

does it have to be at the end of scoring step or can it be at the start of next hand

crisp coral
#

reading comprehension failure

limpid flint
#

I mean I understand it, but I didn't read it

hardy viper
#

is custom ui hard to do at all? i mean, it's definitely a little complicated to figure out how to work the code to actually create it, but im more talking about the ease of being able to actually make stuff once you already know how to do it

tepid sky
#

like settings?

tepid sky
#

and after that we need cardsleeves'sleeves cardsleeves!

tepid sky
drowsy tulip
shell timber
#

oh right, finally an antisynergy with double scale

hardy viper
#

every food joker ever:

shell timber
#

well yeah

hardy viper
#

oh do you mean just that mod

languid mirage
#

might just be me

shell timber
#

yeah true

drowsy tulip
#

maybe change the text to "decreases by _"?

shell timber
#

yeah i've changed it

abstract venture
#

a badge isnt appearing when i add a sticker to a playing card

#

but it appears if i add it to the info.queue of a consumable

#

how do badges appear on playing cards?

solid salmon
abstract venture
solid salmon
#

I love autism creature

abstract venture
#

wait its known as that?

#

😭

#

i just know it as tbh creature

solid salmon
#

its both

#

(i searched it up)

abstract venture
#

true

solid salmon
#

so what mod are you developing

abstract venture
#

just tryna figure out how to get a badge on the cards

solid salmon
#

interesting

#

im trying to update my mod

abstract venture
#

whats urs

#

:3c

solid salmon
#

its in my name

abstract venture
#

oh good point

solid salmon
#

im trying to make a joker summon a specific joker

#

but

#

its not going well

abstract venture
#

interesting

#

damn

#

cant use create_card() in the calculation?

solid salmon
#

its more like an ipairs thing

abstract venture
#

ah

solid salmon
#

and yes i did try Mig Bac

maiden phoenix
#

If you want to call one of your modded joker it usually goes as j_<mod_prefix>_<joker_key>

abstract venture
#

^

#

that might be the problem

#

i havent messed with events so idrk if theres a problem in there

maiden phoenix
#

Also you should prob rename that local var in your event since card already exists

abstract venture
#

true

solid salmon
#

so j_othe_mig_bac

abstract venture
#

ya

solid salmon
#

what in the heck

abstract venture
#

¯_(ツ)_/¯

solid salmon
abstract venture
#

damn

maiden phoenix
rough furnace
#

you also seem to have 2 instances of DebugPlus loaded at once

solid salmon
#

i forgot coonies collection has that

#

nothing changed

maiden phoenix
#

Also this feels so wrong..

solid salmon
#

the name, the chance what?

rough furnace
#

I asssume 1/1

solid salmon
#

1/1 doesn't work?

rough furnace
#

1/1 is just 1

#

so it feels wrong

solid salmon
#

its for testing purposes

#

how do i fix ipair errors again

#

(i rarely see these)

hardy viper
#

what

crisp coral
#

elaborate

wintry solar
#

I have a partial write up of it somewhere in here if you can be bothered to find it

glass scaffold
#

where's the documentation for modding jokers?

maiden phoenix
abstract venture
#

how do badges work on stickers?

#

i cant seem to get a badge on playing cards when i make their ability a sticker

#

like cryptid's rigged sticker

glass scaffold
#

How do I check if a card is a certain value?

tepid crow
glass scaffold
#

Now I just need to figure out how to double the mult.

glass scaffold
agile rain
glass scaffold
#

Yeah?

agile rain
#

I started having failed to collect file data for Atlas since I did aswell so that might be a bug

glass scaffold
#

Fun

agile rain
#
    SMODS.Atlas({
    key = "modicon",
    path = "icon.png",
    px = 32,
    py = 32
    })

      local function apply_sprites()
        --sendDebugMessage("Sprites Maca")
        SMODS.Atlas { key = "Booster", path = { ['it'] = 'boosters.png', }, px = 71, py = 95, prefix_config = { key = false } }
        SMODS.Atlas { key = "Tarot", path = { ['it'] = 'Tarots.png', }, px = 71, py = 95, prefix_config = { key = false } }
        SMODS.Atlas { key = "Voucher", path = { ['it'] = 'Vouchers.png', }, px = 71, py = 95, prefix_config = { key = false } }
        SMODS.Atlas { key = "icons", path = { ['it'] = 'icons.png', }, px = 66, py = 66, prefix_config = { key = false } }
        SMODS.Atlas { key = "Joker", path = { ['it'] = 'Jokers.png', }, px = 71, py = 95, prefix_config = { key = false } }
        SMODS.Atlas { key = "blind_chips", path = { ['it'] = "BlindChips.png", }, px = 34, py = 34, prefix_config = { key = false }, atlas_table = 'animation_atlas', frames = 21 }
        SMODS.Atlas { key = "shop_sign", path = { ['it'] = "ShopSignAnimation.png", }, px = 113, py = 57, prefix_config = { key = false }, atlas_table = 'animation_atlas', frames = 4 }
    end
    
    apply_sprites()
    sendDebugMessage("Maca_BIT: Balatro Ma Meglio - LOAD")

I'm using this code to change the textures for the italian locale which has been working fine, but it crashes with a concatenate local file_path (table) error whenever I try to change language. I guess it has to do with the SMODS.Atlas tables but idk what's wrong, any clues?

glass bloom
#

I want to start making mods for the game, where should I start?

glass scaffold
#

It has the basics for stuff. You can also rummage through the base game's code and maybe take stuff from there, but be warned, it's not easy.

glass bloom
#

Ok thanks I’m starting development on an ai using enforcement based learning and I thought Balatro would be a cool thing to test it on

tepid sky
#

ngl that indeed is cool

agile rain
#

Having this crash when changing language

muted kite
#

Looks like an NFS error to me

agile rain
#
----------------------------------------------
------------MOD CODE -------------------------

    G.F_NO_ACHIEVEMENTS = false

    local MOD_ID = "Better_IT"
    --local lang_path = SMODS.Mods[MOD_ID].path.."it.lua"

    SMODS.Atlas({
    key = "modicon",
    path = "icon.png",
    px = 32,
    py = 32
    })

    local function apply_sprites()
        sendDebugMessage("Sprites Maca Load Debug")
        
        SMODS.Atlas({ key = "Booster", path = { ['it'] = 'boosters.png', }, px = 71, py = 95, prefix_config = { key = false } })
        SMODS.Atlas({ key = "Tarot", path = { ['it'] = 'Tarots.png', }, px = 71, py = 95, prefix_config = { key = false } })
        SMODS.Atlas({ key = "Voucher", path = { ['it'] = 'Vouchers.png', }, px = 71, py = 95, prefix_config = { key = false } })
        SMODS.Atlas({ key = "icons", path = { ['it'] = 'icons.png', }, px = 66, py = 66, prefix_config = { key = false } })
        SMODS.Atlas({ key = "Joker", path = { ['it'] = 'Jokers.png', }, px = 71, py = 95, prefix_config = { key = false } })
        SMODS.Atlas({ key = "blind_chips", path = { ['it'] = "BlindChips.png", }, px = 34, py = 34, prefix_config = { key = false }, atlas_table = 'animation_atli', frames = 21 })
        SMODS.Atlas({ key = "shop_sign", path = { ['it'] = "ShopSignAnimation.png", }, px = 113, py = 57, prefix_config = { key = false }, atlas_table = 'animation_atli', frames = 4 })

    end
    

    apply_sprites()
    sendDebugMessage("Maca_BIT: Balatro Ma Meglio - CARICATA")
    
------------MOD CODE END----------------------
----------------------------------------------
frosty dock
#

whoops I really thought I'd tested that

#

steamodded bug

solid salmon
#

how do i fix an ipair error

frosty dock
#

dude we have no clue what you mean

#

can you like at least say what the actual error is

#

chances are the issue is that you have no idea what you're doing 💀

agile rain
frosty dock
#

yeah

agile rain
#

Looking forward to future updates then, thanks for letting me know 👌🏻

hardy viper
crisp elbow
#

Common AI Gen Goku L

hardy viper
#

brother is biding his time

abstract venture
#

and im repeatedly asking how get a badge on a playing card when setting its ability to a sticker with a consumable 🙏 (like cryptid's rigged sticker)

frosty dock
#

that should be happening automatically unless you somehow copied no_badge from the vanilla objects

abstract venture
#

that's what im sayin

#

im just using the sticker objects so it should make a badge

#

I can make a badge on the consumable using the sticker's data so

#

¯\_(ツ)_/¯

shell timber
#

reposting this here, jankman buff

maiden phoenix
#

Is the .31 a ref to something?

shell timber
#

it's not a round number, jank

maiden phoenix
#

nice

shell timber
#

in fact it's like 1.3172 or something

#

but it gets rounded

hearty mesa
#

can someone inform me how card_eval_status_text() works?

hardy viper
#

nope i have no clue but i could tell you if i spent 10 minutes looking at the code and so could you

hearty mesa
#

damn

#

ok thanks (?)

abstract venture
#

brutal 😭

hardy viper
# hearty mesa can someone inform me how `card_eval_status_text()` works?

ok time to be actually helpful
this is how i figure stuff like this out
i use VSC with an extension for lua (google lua for vsc) (sumneko)
what i do is i right click on that function and click "find all implementations"
then a sidebar pops up like this image that ive attached
i can click on these and itll show me everywhere where that function is written
generally you want to look in two places

  1. (this only applies to stuff found in the vanilla source code) the lovely dump of the source, this will show what the original function looks like after lovely patches (.toml files, replaces stuff in the code pre-compilation), this will be in Mods/lovely/dump/ (idk if these only generate when you crash). this shows you what the code looks like after these patches are applied. so what i see here is that this is the code that applies those "Again!" or "+4 mult" popups you see when a joker is scored

  2. all the mod patches that arent applied through .toml files, which you can see here. for example, I can look at nopeus' patch here and see that it looks and sees if in your settings for Nopeus youve specified that for example you dont want to see the Again! popup when a card is retriggered, and if you have then it wont do anything.

rough furnace
#

if you have your code in vscode you can also use the search tab on the sidebar to seardch though all the files

#

might also be useful to see how its used

hardy viper
#

^

tepid crow
hardy viper
#

i personally just do the same right click thing and hit "find all references" when i want to do that though

rough furnace
hardy viper
#

and whats the error

drowsy tulip
#

is there an easy way to get the position of a card in the played hand

tepid eagle
solid salmon
drowsy tulip
abstract venture
#

G.played_hand[i] I believe, I may be wrong

hardy viper
abstract venture
#

I being wherever u want

solid salmon
drowsy tulip
#

that gets the card but i need the index from an element

solid salmon
#

let me pull up the error screen

drowsy tulip
#

i don't think there's a way from what I've looked up

abstract venture
#

unfortunately

solid salmon
glass scaffold
#

Code & error. Is there anything I can do on my side to fix this?

maiden phoenix
glass scaffold
#

Same error.

#

Anything else I can try?

maiden phoenix
#

What's your version of lovely?

glass scaffold
#

beta7

maiden phoenix
#

Try reverting to beta6

glass scaffold
#

beta6 has the same issue

#

What is wrong with LOVELY to where it's crashing like this?

tepid crow
#

had someone else with that same error

#

lovely-beta7 also wasn't the cause

#

unfortunately, the solution there was to rip the entire atlas out of the mod, which isn't really a good one...

maiden phoenix
#

Whats the name of your file in assets/1x

glass scaffold
#

Oh my god.

#

I forgot the 1x and 2x.

maiden phoenix
#

Make sur the file's name is 1:1 with your atlas key

glass scaffold
#

WHAT

glass scaffold
#

Now how do I check to see if a card is an Ace

maiden phoenix
#

Lil tutorial: when you ask yourself questions like "how can I do x", your first thought should be "Are there any vanilla jokers that does that". For your example you could check "Superposition" or "Scholar"

glass scaffold
#

For anyone else wondering, it's context.other_card:get_id() == 14 according to the main game.

maiden phoenix
#

Careful of what needs to be put behind :get_id() == 14 depending of the context

gentle fiber
#

hey, I was looking to skin a few cards, is there an easily usable template for that out there? im not really familiar with modding games

glass scaffold
#

Now how tf do I make it double the mult every time it's triggered?

maiden phoenix
#

What's the joker effect you're trying to achieve?

glass scaffold
#

Every Ace doubles the mult.

maiden phoenix
#

The Mult as in the mult in the left?

glass scaffold
#

Yeah

maiden phoenix
#

There's a global var called "mult"

tepid crow
#

again, you should probably look at some similar jokers

#

triboulet or photograph maybe

maiden phoenix
#

They don't achieve what they want

#

Wait

tepid crow
#

oh did I misunderstand 🤔

maiden phoenix
#

I'm dumb nvm

#

It's just "x2 Mult" effect yea

tepid crow
#

I assumed it was "if Ace is scored, x2 mult"

glass scaffold
#

Yeah, whenever an ace is scored, double the mult on the left

maiden phoenix
#

Just say "x2 Mult" lol

#

I said "mult on the left" cuz I had a brainfart and didn't realise sooner somehow

glass scaffold
#

oh

#

right, i ripped code from Triboulet

#

And not working.

tepid eagle
#

have you defined self.ability.extra for this joker

glass scaffold
maiden phoenix
#

Also you should replace "self" with "card"

#

for x_mult

glass scaffold
#

alright, but how would I make it double the mult?

maiden phoenix
#

Just set up your extra value as 2

glass scaffold
#

which I did at line 34?

drowsy tulip
#

balatro font in vscode is both blessed and cursed somehow

#

you gotta set it up like this

#

i think?

maiden phoenix
#

Not if it just refers extra

#

extra can be an integer

drowsy tulip
#

Damn...

maiden phoenix
drowsy tulip
#

ye

glass scaffold
#

So... it's doing its job.

#

But it's doing x6, not x2

maiden phoenix
#

Oh right there are multiple context.individual

#

You'll have to be more specific in your context check

tepid eagle
#

try adding "and not context.repetition" after context.individual

#

apologies for not using the code block format for i am on mobile

maiden phoenix
#

Also check for context.cardarea == G.play

tepid eagle
#

yeah

glass scaffold
tepid eagle
#

hooray!

glass scaffold
#

Now to fix Blueprint not copying it...

#

Wait, nevermind, it's working already

wintry solar
glass scaffold
#

Anyone have a guide on how to color the text?

drowsy tulip
#

{C:color}your text here{}

#

you can find all the descriptions with colors in en-us.lua

glass scaffold
drowsy tulip
#

localizations

glass scaffold
#

Well, I took {X:mult,C:white} X#1# {} Mult, but now my joker shows Xnil

tepid crow
#

you gotta define a loc_vars

glass scaffold
#

so if I just wanna have the x2 show, what would the loc_vars look like?

drowsy tulip
#

return = { vars = { card.ability.extra} }

#

i think

tepid crow
#

did you look at my link and not understand or are you just asking

tepid crow
#

go look at the link

agile rain
#

I just won a game and this crash happened, after restarting the game and winning in the very same way it didn't replicate

spiral orbit
#

yeah i remember getting that often too

crisp elbow
brisk rose
#

"My" mod DeFused https://ptb.discord.com/channels/1116389027176787968/1271500476457812120 Has an issue that the original Fusion Jokers also has where Collectable Chaos Card doesn't give its rerolls properly. I've not been able to fgure it out, and would appreciate any help. As far as I know, besides a newer issue that I think will be pretty easy to fix, it's the only functionality-impacting bug I've come across that's left

gray apex
#

Is there any good documentation on creating custom enhancements? I'm wanting to try and replicate the effect of negative edition for playing cards with a custom enhancement, but I haven't found anything particularly helpful yet.

opal spade
brisk rose
opal spade
#

oh

brisk rose
#

Yeah, it's just a straight modifcation of the Joker Fusion codebase

nocturne garnet
#

does anyone know how to change base mult with a joker?

#

before cards are scored btw

maiden phoenix
#

wdym by "change base mult"

nocturne garnet
#

change mult before cards are scored

maiden phoenix
#

You could use some specific contexts or use the SMODS.eval_this function

#

context.before I think could work

nocturne garnet
#

god damn you talisman

zealous garden
#

hey people, I'm not very good at code but I am curious
been running into a bunch of issues, does anyone know if there's a joker that triggers on hand drawn like that or something. I'm trying to make mine give you additional draws but its been hard. tried playing with changing hand size but if there's a way to just make it draw additional cards on hand draw that'd be good

paper star
#

it'd probably be easiest to take two variables from two different things
take something that has an effect when played (ex. +mult when "x" card is played) and something that makes you draw cards (probably cryptid)

#

or if it works, idk if it will

#

DNA

rough furnace
#

what do you mean on draws?

#

like burgaler effect?

paper star
#

oh I misread

#

disregard what I said

zealous garden
#

mhm I got the scoring part down, it just looks for a wild card on scored hand and gives you your extra draws, its a hazzle to make it work with having to move the hand size around though

zealous garden
rough furnace
#

what are you trying to do?

zealous garden
#

"if scored hand contains a wild card, draw 4 additional cards next draw"

rough furnace
#

oh

#

just a sec

paper star
#

not exactly the same but you could make it similar to dna but just draw 4 negative cards from your deck

tepid crow
#

problem is that DNA "draws" before normal hand draw

zealous garden
#

mhm, that's the issue I encountered , if you make it draw before your proper draw you will get no additional cards. I managed to make it work by changing hand size but if that's the case I still need to check after you draw your hand to lower your hand size(plus at end of bind)

hardy viper
rough furnace
#

looks like the game doesn't emit an event for any new hand

rough furnace
#

but if you wanted to you could do a lovely patch in game.lua for Game:update_draw_to_hand

zealous garden
zealous garden
hardy viper
rough furnace
zealous garden
#

just to check, if you guys know, is there a way to fetch how many cards in hand and the player's current handsize? cuz if so there's a very simple way to do this

hardy viper
#

check CardArea file

#

that's the skeleton your hand uses

#

should be some sort of reference to a maximum in there

#

and how many cards in hand is just #G.hand.cards

zealous garden
#

aha, I got it! many thanks all you people

rough furnace
#

Yeah I was thinking you could chsnfe the card area size but it would be hard to undo reliably

zealous garden
#

I figured out a solution, if the joker triggers just make it check cards in hand, plus your current hand size (which was way simpler than I thought) and just make it draw the delta *plus the extra cards I need and boom!

#

you guys mentioned cryptid had a card that let you draw on extra right? (if its fine to peek into their code)

hardy viper
#

effarcire i think it was called

#

makes all cards draw to hand

hardy viper
#

all the other ones that affect draws just change hand size iirc

zealous garden
#

alright, many many thanks, it worked like a charm

hushed cradle
#

anyone know if Card:release is used at all?

#

ive hooked a print thing to it and it is not printing anything

rough furnace
#

not sure

#

it just calls the areas release

#

seems related to moving cards

hushed cradle
#

thats what i thought

#

card area doesnt seem to have a release thing tho

rough furnace
#

it might inherit it from something else

hushed cradle
#

ah yeah true

#

ill check moveable

rough furnace
#

based on a quick grep Node and UIElement have it

hushed cradle
#

does nothing get patched to node?

#

damn]

#

i havent got the source code on my laptop im gonna have to grab that quickly

#

if you were gonna have a check for when a joker is moved tho what would you do??

#

i had something in the update thing for my joker but thats causing issues

rough furnace
#

Does moving count when a new joker is added to the area?

hushed cradle
#

i guess yeah

rough furnace
#

Idk how does blueprint/brainstorm update their descriptions?

hushed cradle
#

ah good idea

#

thank you

#

oh thats probably just for when its hovered over right

rough furnace
#

I mean are you able to just check anywhere you need that info when you check it

#

Or do you need to react to it?

hushed cradle
#

sorry i didnt really explain what im doing

#

tryna debuff the joker to the left of my joker

rough furnace
#

There is maybe some kind of event in the card are you could hook

#

Otherwise you might be able to just get away with an event that check every frame

hushed cradle
#

apparrently checking every frame is causing the game to freeze up

#

so ill keep looking for other things to hook to

rough furnace
#

Are you using an event?

hushed cradle
#

no

#

i still dont really get events lol

rough furnace
#

Try spawning an event. Return false to have the event rerub next frame

#

I'm on my phone so I can't pull an example

hushed cradle
#

no worries

#

thanks for your help

#

if im getting the event to rerun each frame should i just create it when the joker is bought

#

i take it its not a good idea to create a new event each frame

tepid crow
#

kind of a weird "event" if it's triggering every second

rough furnace
tepid crow
#

ah sorry, was thinking about evaluation trigger events

rough furnace
#

probably something like thislua G.E_MANAGER:add_event( Event({ trigger = "immediate", func = function() if false then -- do check for if your joker no longer exists -- Probably remove all debufs return true end -- figure out which joker(s) to debuff and rmeove/add debuffs here return false end, }), "other" )

#

not sure which event queue would be best for it

#

side note I think the event queue is my favourite system in balatro

#

its such a well made and useful system

#

and makes things like the joker events so simple to follow

#

the base queue would probbaly make the most sense

#

maybe make it non-blockable

tepid crow
#

balatro's event queue is pretty cool yeah

#

mostly for timing stuff though

rough furnace
#

yeah

#

and the ability to rerun events

#

which makes it stupid simple to wait for something

#

also I was able to hack it to run my event every x seconds

tepid crow
#

oh that's pretty neat

spiral orbit
#

you know is it possible to make it so whenever a joker/card triggers, it does a flip instead of just shaking normally?

rough furnace
#

yeah it should be possible

spiral orbit
#

that would be funny to try one day

regal wolf
spiral orbit
#

i might try that when i get home that sounds like a fun mod to do as my first

glass bloom
#

what program do you use to open balatros source code?

rough furnace
#

7zip can extract it

spiral orbit
#

yeah you can just open it with winrar too

glass bloom
#

I extracted it but It wont open

hardy viper
hardy viper
#

is there an easy way to update the text on a card

rough furnace
#

wdym?

hardy viper
#

like if you had a joker and wanted to change the text it displayed

rough furnace
#

like in the tooltip?

hardy viper
#

yeah

#

although i believe ive figured it out

rough furnace
#

iirc you just use localization variables and set the text there

hardy viper
#

yup nice

orchid thunder
frigid latch
#

howd you open that menu

brisk rose
tepid sky
crisp coral
nocturne garnet
primal robin
#

Game just silent-crash. How can I get logs for debug?

rough furnace
#

in your Mods folder there should be lovely > logs and from there you can find the most recent dated one

primal robin
#

No info in it, like game just close itself for no reason

rough furnace
#

thats odd

tepid crow
#

happens sometimes

#

what's your modlist?

primal robin
#

Nvm, fixed

#

Game don't like when you try to save function

rough furnace
#

that should still crash normally

#

any chance you have a way to replicate that

#

wonder if the crash handler is doing something wrong

shell timber
#

card buffer advanced rework

#

basically just a weird blueprint / brainstorm?

tepid crow
#

neat

shell timber
#

the card should be upside down to make an A

#

literally unplayable

#

oh right i should ask

#

are temporary playing cards a thing in steamodded? or do you still have to do it manually

#

hell yeah

shell timber
#

yeah it's fine the old way still works

hardy viper
rough furnace
#

Though iirc there are crashes that it can't catch, like if something in c land crashes

hardy viper
#

uhm yeah lol i did not mean the inbuilt error handler

nocturne garnet
#

now where have i seen this before

tepid sky
west lion
#

Hello! Just joined the discord to look into working on and contributing shaders. I have fairly good knowledge of GLSL, but never worked with Love2D or anything to do with modded Balatro. I've found the links to the Love2D Beginner's Guide to Shaders and Steamodded example mod shaders. What I'm wondering is what, if any, dev environment people use to work on shaders? Like a standalone Love2D project that just quickly loads some example cards for you to preview the shaders, or a mod for the full game that does something similar. Or if there's any other tips people have to make editing shaders easier.

crisp elbow
#

@west lion sorry for ping

#

because it's a 2 step process from coding the actual GLSL proper to then porting it to LOVE2D

west lion
crisp elbow
#

and you can easily I think test it with a custom edition, see if it looks good, if it crashes, so on and so forth

west lion
#

is there mod/shader access to the background? for when opening modded booster packs or special events

crisp elbow
#

I believe certain mods have done custom colors before (cryptid) but not too sure on the shader side of things

languid mirage
#

I'm just using GIPS for shaders preview

crisp elbow
#

yeah that's kinda what I suggested as well

#

GIPS to test your glsl code pre port

west lion
#

I assume that in order for changes to the baground shader to be made, you'd either have to entirely replace it, or modify the original, which would mean effectively redistributing source code

crisp elbow
#

and then a mod in game because as long as you register it correctly it pops up on the collection

languid mirage
#

as it has a bunch of configurable parameters, such as colors and amount of swirl

west lion
#

it would be fun to entirely replace it though, just expose the same uniforms that the original does but do different things with them

languid mirage
#

that is possible too

frosty dock
#

that would also be possible so long as it's compatible with what the base game sends to it (or you also modify the parameters)

nocturne garnet
#

i think i know how

nocturne garnet
#
G.SPLASH_BACK:define_draw_steps({{
        shader = 'splash',
        send = {
            {name = 'time', ref_table = G.TIMERS, ref_value = 'REAL_SHADER'},
            {name = 'vort_speed', val = 1},
            {name = 'colour_1', ref_table = G.C, ref_value = 'BLUE'},
            {name = 'colour_2', ref_table = G.C, ref_value = 'DARK_EDITION'},
        }}})```
for the main menu im p sure
frosty dock
#

that's the splash shader, not the background one

languid mirage
#

it is the main menu background

#

shader

west lion
#

yeah, it looks like Love2D calls GLSL uniforms externs

nocturne garnet
# nocturne garnet ```lua G.SPLASH_BACK:define_draw_steps({{ shader = 'splash', sen...
G.SPLASH_BACK:define_draw_steps({{
        shader = 'background',
        send = {
            {name = 'time', ref_table = G.TIMERS, ref_value = 'REAL_SHADER'},
            {name = 'spin_time', ref_table = G.TIMERS, ref_value = 'BACKGROUND'},
            {name = 'colour_1', ref_table = G.C.BACKGROUND, ref_value = 'C'},
            {name = 'colour_2', ref_table = G.C.BACKGROUND, ref_value = 'L'},
            {name = 'colour_3', ref_table = G.C.BACKGROUND, ref_value = 'D'},
            {name = 'contrast', ref_table = G.C.BACKGROUND, ref_value = 'contrast'},
            {name = 'spin_amount', ref_table = G.ARGS.spin, ref_value = 'amount'}
        }}})```
languid mirage
rough furnace
west lion
#

yay!

hardy viper
#

isn't there a debugplus button to reload atlases? does that not reload shaders

languid mirage
#

tbh havent tested, I thought shaders compile on startup only

hardy viper
#

i would think so too but it's worth a try

dim nimbus
#

Having a weird issue where the game is crashing on retrigger due to inability to call juice up

#

the issue is that my joker shouldn't be juicing anything up? do i need something for the card to do when it retriggers or something?

hardy viper
#

sounds nopeusy

#

oh wait

#

juice up is a different function

dim nimbus
#

yeah

#

its one that causes the cards to jiggle

#

wait i figured it out

#

swing and a miss i guess

rough furnace
#

I just do the same thing as toggling the pixel scaling option

umbral orchid
#

Hello guys, I am new to modding, is there a place where I can lookup all the G Variables

For example, I want for a joker to give #1# mult
And #1# will increase by #2# every played hand

But also I want to #1# and #2# reset on round end

frosty dock
#

#1# and #2# are just placeholders for your variables that you specify in a loc_vars function

#

having a look at the game's source code is great for figuring these things out

umbral orchid
#

I mean, maybe there is G.Round ended or something

frosty dock
#

you can just extract the executable with 7-zip and there's all the code

umbral orchid
#

Oh, cool

#

But Vanilla Jokers are not written in SMOD style probably

frosty dock
frosty dock
#

there's an example mod that re-implements some vanilla jokers in steamodded, but there's plenty of other modded jokers to use as examples

umbral orchid
umbral orchid
frosty dock
#

it's a lot to digest so feel free to ask questions about anything you might come across here

umbral orchid
#

Thanks, I will try to learn what I can myself

frosty dock
#

also note that steamodded heavily modifies a lot of the game to a point where the modded version barely resembles the original function at all

umbral orchid
#

Yeah, already noticed

#

This is so difficult to read

spiral orbit
#

is this the base code or the steammoded code

umbral orchid
#

Game.lua

umbral orchid
spiral orbit
#

the devs are strong for dealing with this

frosty dock
#

for the ones that aren't fully overwritten, vanilla code is often patched in some way, you can also view the results of these patches in <Mods folder>/lovely/dump under the same file name that corresponds to the file in the game itself

#

even with steamodded alone this has most of the files you need, so I usually end up just using this since my work is often involved directly with it. You'll get a decent idea of how the game works without, but there's cases of implementations that just can't be kept around while incorporating mod support (like suits and ranks). In that case there's not much of a need to be familiar with the vanilla version

frosty dock
#

watch out for Card:calculate_joker

frosty dock
#

I'm the top contributor of recent steamodded

umbral orchid
#

Oh

#

Sorry

frosty dock
#

not like it's specifically my project or anything, we have like 30 contributors

umbral orchid
frosty dock
#

I advise against it as a point of reference

umbral orchid
#

Oh

#

Thanks

#

Also another question

#

Today I tried to merge Golden Joker with Runner, but it did not work no matter where did I put the code

#

Code of the added dollars

#

All of this

frosty dock
#

would you happen to have added the calculate function from runner, that's where all its functionality happens

#

you would also have to merge their config tables

#

to use card.ability.extra.money, you must first have a corresponding preset config value

umbral orchid
umbral orchid
#

And vars =

frosty dock
#

mind showing your code for that?

umbral orchid
#

I did it on my laptop, recreating code right now

orchid thunder
#

whats the fuction i can call to add chips or mult

frosty dock
#

SMODS.eval_this?

orchid thunder
#

i was thinking more like in joker calcuation

#

i have this

#

it works

#

but it does the text then adds the mult and chips at the same time

umbral orchid
#

How to add that delay,

Like with walkie-talkie

frosty dock
#

if context.cardarea == G.jokers and not context.before and not context.after cameo

#

me when i don't use context.joker_main

orchid thunder
#

ok will i could change that

#

and just did btu sill

frosty dock
#

walkie-talkie and scholar are special in that they use an 'individual' context that works differently from the rest

frosty dock
#

to have this effect during the main joker phase, you need a manual status text

spiral orbit
orchid thunder
#

its like i want what runner does except for multiple values

frosty dock
#

best to use SMODS.eval_this for that

orchid thunder
#

ok il try that

frosty dock
primal robin
#

So suit-based jokers like gems works different from waktie-talkie and scholar?

frosty dock
#

they work the same

orchid thunder
#

how do i use it

umbral orchid
#

@frosty dock I think I did it like this (It did not work)

primal robin
#

Sometimes I'm glad I don't do jokers, only blinds Trolge

umbral orchid
frosty dock
# orchid thunder how do i use it

something like this

SMODS.eval_this(card, {
  mult_mod = card.ability.extra.mult,
  message = localize({ type = 'variable',  key = 'a_mult', vars = {card.ability.extra.mult} })
})
orchid thunder
#

can i use it more than once?

#

so like chips and mult

frosty dock
#

you can put multiple of mult_mod, chip_mod, Xmult_mod in the effects for applying at the same time, or call multiple times with different effects to run in sequence

#

adjust the message accordingly of course, as you would for return values

orchid thunder
#

ok what about custom stuff added luke powmutl from talisman

frosty dock
#

it will work for the status text but doesn't automagically apply the effect iirc

orchid thunder
#

thanks it works so far

umbral orchid
#

Do I place

   calc_dollar_bonus = function(self, card)
     local bonus = card.ability.extra.money
     if bonus > 0 then return bonus end
   end

Out of Calculate of Runner?

orchid thunder
#

why is this not destroying a random conumable but yet the first one

frosty dock
umbral orchid
#

Thanks

frosty dock
umbral orchid
#

@frosty dock Is there a way to hide color tags?

frosty dock
#

they don't on that screen, I think you can configure the color with steamodded's DollarRow API? haven't looked at it in a while

umbral orchid
#

"DollarRow API"?

frosty dock
#

whatever

orchid thunder
#

tahnsk that worked

frosty dock
#

even that doesn't support multicolor text I don't think, so patching would be required to make that work

umbral orchid
#

Wow

#

So no blue "Chip" right now if I want Joker to give money

frosty dock
#

I suggest to just disregard the color on cashout for now and revisit later

umbral orchid
#

Yeah

#

Thanks for the help

orchid thunder
#

is it a_Xmult or a_xmult

umbral orchid
#

Can I quickly restart the game somehow? Like reloading Atlas with DebugPlus

orchid thunder
#

welp i need to gain people to help with the art in my mod so time to post my mod as a mod

molten ice
#

Hello! This is a little strange use case, but I'm currently working on a some kind of texture mod that can also affect other modded stuff without messing with their assets directly (so all my assets remained inside my own mod repo), so I was wondering

  1. Is there a way to check if certain mod is loaded AND active? (0.9.8 seems to have their own way with SMODS.Init.<MOD_ID>, but I don't think I can find the equivalent in 1.0.0)
  2. Is it possible to take ownership of modded suits and jokers? I've tried this to Bunco's Fleurons and Halberd suits and it only gives me duplicated key errors and skipped. For joker one, the one I took the ownership off to change the atlas seems to be missing from the collection entirely.
  3. Is there a way to partially change loc_vars without duplicating the whole elements? For example, I would like to only change the name of the vanilla joker but kept the rest of the description in-tact. Currently I had to duplicate the description to my own files too (and recreate other tooltip pop ups), but I was wondering if there's any other option.

I have made sure to give the priority to my mod to ensure it's the last thing loaded

hardy viper
#

the conditions for that seem to be

  1. not duplicate id or key or anything
  2. not disabled via the ingame UI
molten ice
#

Ah, thank you very much. That works!

loud citrus
#

is there an example of taking ownership of a joker?

orchid thunder
nocturne garnet
rough furnace
#

you should update debug plus I removed the long dt messages (for real this time)

nocturne garnet
#

i update my mods once every blue moon

#

next time will be when reverie is finished for 1.0.0

#

i be cooked

#

is it too overpowered

brisk rose
#

I noticed a very interesting behavior with the error logs. Sometimes it errors out and prints a partial error log, but if you hold ctrl+c it slowly finishes printing it to the screen

gaunt thistle
#

if anyone is getting the UTF-8 crash while using lovely beta7 PLEASE have them use this binary instead and screenshot the error message. #1225831216939536394 message

lament flame
#

to anyone who makes mods here, how do you make the sprites yourself? what program do you use and do you make the sprites IN the atlas?

lament flame
#

oh i see

#

im considering purchasing it

crisp elbow
#

If you wanna be cheap like me you can compile it from source code

lament flame
#

how do you do that?

crisp elbow
#

There should be instructions on the aseprite github page

#

Personally on Arch Linux you can compile it directly from terminal no problems

lament flame
#

hm i dont see anything

opal spade
junior parrot
frosty dock
loud citrus
#

how to i make my own descriptions and change the extra value of the jokers i took ownership? i learned how to implement my effects :)

maiden phoenix
#

For the extra value you can modify the config, for the desc maybe you can override the existing one by replacing its value?

stiff locust
#

what does [ expected near local mean (also what do square brackets do in lua)

languid mirage
#

table indexing

#

probably some patch failed

#

and there's an open bracket that isnt closed

languid mirage
stiff locust
#

and they're for the mod authors section in the header

#

i'm pretty sure i closed every other bracket

#

yeah i closed all of them

stiff locust
# languid mirage table indexing

i wish i knew what any of these words meant 😭
i was hoping i could just learn by doing but i havent even been able to boot up the game yet

languid mirage
#

installing LSP for lua helps with eliminating these syntax errors

#

if you have VSCode you can install extension

#

I use this one

stiff locust
#

okay

#

how do I install an extension

languid mirage
shell timber
#

oh they have an LSP? neat

languid mirage
#

😭

frosty dock
#

i could never imagine not using one 💀

stiff locust
#

oh cool

shell timber
#

i have the one for rust i didn't know there was one for lua

stiff locust
#

how do i look at it

languid mirage
#

most programming languages have them, I feel like

stiff locust
#

when/where does the extension scream at me

shell timber
#

oh no now every file has 9+ errors

frosty dock
languid mirage
#

it will highlight syntax errors with red underline

stiff locust
#

nothing is changing i installed the extension

languid mirage
#

maybe you need to relaunch VSCode

frosty dock
#

^

stiff locust
#

i will do that

frosty dock
stiff locust
#

there is no red underline

languid mirage
#

hm

#

can you show full error?

stiff locust
#

i can send the crash log

languid mirage
#

yeah that's what I meant

stiff locust
#

okay

#

fair warning i have zero fucking clue what i'm doing and probably made a very stupid mistake

languid mirage
#

alright can you screenshot Tsunami.lua around line 13

#

or just send code

#

doesn't matter too much

stiff locust
languid mirage
#

no

#

around means lines above

#

and below

stiff locust
#

ohhhh

languid mirage
#

not just 1 line 😭

stiff locust
shell timber
#

are you using 0.9.8?

stiff locust
#

no

shell timber
#

then you don't need the init function

stiff locust
#

oh

#

okay

languid mirage
#

still not sure why syntax error happens though

#

is there no other code above this function?

stiff locust
#

it's all red and yellow now

languid mirage
#

remove closing end

#

after this function

stiff locust
#

i did

stiff locust
#

other than the steamodded header

languid mirage
#

then ¯_(ツ)_/¯

#

you have to screenshot everything or send full file

stiff locust
#

it's all red

#

this is literally it

#

i'm just trying to make a joker that makes splash when the round ends

i just realised it's supposed to be when blind is selected

shell timber
#

you missed a closing } for loc

stiff locust
#

oh

shell timber
#

the rest of the code looks questionable but should work(?)

languid mirage
#

this has to be a function

#

not a table

shell timber
#

oh, right

languid mirage
#

instead of { ... } you need to use function () ... end

stiff locust
#

what

#

what would that look like

languid mirage
languid mirage
shell timber
#

also, it should be calculate

stiff locust
#

calculate?

shell timber
#

and the function should have arguments (self, card, context)

#

all joker ability stuff is done in the calculate function

stiff locust
#

where does calculate go

shell timber
#

replace the word "ability" with "calculate"

stiff locust
#

okay

#

what does the white underline mean

shell timber
#

i don't know

stiff locust
#

i made it disappear

#

so i think i did something right

shell timber
#

i agree with stupxd, you should try learning lua before you start modding

stiff locust
#

i should do that but i'm gonna see how long i can get away with learning as i go