#💻・modding-dev

1 messages · Page 119 of 1

zealous glen
#

You can just look at the vanilla dictionary

karmic kelp
#

I'm trying to figure out what combination of the vanilla dictionary, "is my mod's ID auto-prepended", and "what did I even make the ID" is the right one

zealous glen
#

There's an example in the wiki

#

It should be just lua return { … }

karmic kelp
#

that only offers a skeleton though, doesn't tell me what I need where... currently on this attempt

zealous glen
#

Ah wait

#

so that is a new object

karmic kelp
#

haha, so apparently it's just exactly the group_key, good to know

#

I think all that's left is to make sure the soul card actually shows up now... time to open a bunch of boosters ig

#

any thoughts as to why this may not be spawning? I'm only observing regular Atomic cards despite the 100% to get this

dreamy thunder
#

anyone?

dreamy thunder
#

'kay

faint yacht
sharp gate
#

How do I set up the steammoded api in vscode?

cedar pendant
#

would anyone be willing to help me learn to make my first modded joker

wheat kayak
#

how do I add mods to the game?

zealous glen
#

by whichever effect saved you

#

or maybe a generic one

solid surge
#

hello again
im tryna make a custom consumable, yet when i try to unlock it in game, it refers to the atlas as a nil value (image 1: shop error, image 2: unlock error with debugplus)
i thought i did the code right, so what gives?

faint yacht
zealous glen
#

Not sure why disabling this Blind persists through the same play session

sonic cedar
#

doin a lil something

tidal steppe
frosty dock
#

oh well I see what's causing this, though it wasn't my change

#

there was a change a while back that made defaults weak, meaning they don't replace any existing entries

wintry swallow
#

does steamodded provide any way for a mod to detect if another mod is loaded

frosty dock
#

yes

wintry swallow
#

i want to add a debug mode to my mod that is only active if another mod (that enables it) is loaded

#

this is so i don't forget to turn it off when sending it to people for testing

edgy reef
frosty dock
edgy reef
#

Speaking of which I don't think we need that anymore tbh.

frosty dock
frosty dock
zealous glen
#

Or is that a bug?

frosty dock
#

renaming your default.lua to en-us.lua should work for now, but it's not exactly intended behavior

faint yacht
wintry swallow
#

apparently SMODS.find_mod does not exist

frosty dock
wheat kayak
#

how do I add the cryptid mod?

wintry swallow
frosty dock
#

update steamodded, you're 2 weeks out of date

wintry swallow
#

things move that fast? wow

frosty dock
#

they do

edgy reef
#

This seemed like a better solution to what default.lua was for

wintry swallow
#

is it just meant to be this

if next(SMODS.find_mod('nightshadedebug')) ~= nil then
    NSC_DEBUG_MODE = true
end
#

should this work or should i do something more

edgy reef
#

Especially now that adding more info to a mod manifest isn't gonna cause a clutter issue.

zealous glen
frosty dock
#

but yes

wintry swallow
#

i know

#

just, for readability's sake

frosty dock
#

imo that makes it less readable

#

it's easy to confuse with == nil at a glance

wintry swallow
#

without the ~= nil there i think it to be a bool when it is in fact a table

zealous glen
#

embrace high level languages

#

if 1 then

frosty dock
#

so it will never be a bool

faint yacht
#

me being used to !=:

zealous glen
#

I don't think that's what they were saying

wintry swallow
#

yes. i am saying i made the nil comparison explicit because otherwise i might think the data type it returns is a bool

frosty dock
#

ah fair enough

frosty dock
wintry swallow
#

huh, that works lol

frosty dock
#

[1] != '1' // false

zealous glen
wintry swallow
zealous glen
#

also why not 6 Hands and 9 Discards

wintry swallow
#

lmao

zealous glen
#

@stiff locust by the way Aure said it was a bug

stiff locust
#

yes hello

edgy reef
faint yacht
stiff locust
#

nnoted

edgy reef
#

You get default.lua behavior without having to copy + maintain a duplicate loc file.

zealous glen
frosty dock
#

we should also add a manifest field for where the default config file should be, I forgot about thaz

zealous glen
#

"This localization came from this mod which has that default language."

faint yacht
#

Actually, can one Lovely "patch" contain both before and after payload?

wheat kayak
#

Oops! The game crashed:
main.lua:2083: bad argument #1 to 'load' (function expected, got nil)

Additional Context:
Balatro Version: 1.0.1m-FULL
Modded Version: 1.0.0~ALPHA-1303a-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.6.0

Stack Traceback

(3) global C function 'load'
(4) main chunk of file 'main.lua' at line 2083
(5) global C function 'require'
(6) LÖVE function at file 'boot.lua:323' (best guess)
Local variables:
c = table: 0x0dabe680 {identity:false, version:11.5, accelerometerjoystick:true, modules:table: 0x0dac4710 (more...)}
openedconsole = boolean: false
confok = boolean: true
conferr = nil
(7) global C function 'xpcall'
(8) LÖVE function at file 'boot.lua:362' (best guess)
Local variables:
result = boolean: true
(9) global C function 'xpcall'
(10) LÖVE function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])
inerror = boolean: true
deferErrhand = Lua function '(LÖVE Function)' (defined at line 348 of chunk [love "boot.lua"])
earlyinit = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])

Help?

faint yacht
#

2 it is.

frosty dock
#

I guess you can have an "at" patch do that

#

but that's not really needed and just increases conflict risk

tidal steppe
#

its a joker, not a deck:

SMODS.Joker {
    key = 'oneMansTrash',
    loc_txt = {
        name = 'One Man\'s Trash',
        text = {
            "At the end of each round",
            "{C:money}$1{} per remaining {C:red}discard"
        }
    },
    rarity = 2,
    atlas = 'ModdedVanilla',
    pos = {x=2,y=0},
    cost=3,
    add_to_deck = function(self, card, from_debuff)
        print('added to deck')
        print(G.GAME.current_round.discards_left)
        print(G.GAME.money_per_discard)
    end,
    remove_from_deck = function(self, card, from_debuff)
        print('removed from deck')
    end
}

sorry for late reply. went to bed lol

faint yacht
#

Whilst also keeping the Mr. Bones fallback intact.

wheat kayak
wheat kayak
wintry swallow
#

is this a cool idea to indicate which scaling we're applying

dreamy thunder
#

bro i finally got the randomness working

wintry swallow
#

there's also an equivalent

dreamy thunder
#

it took me longer than it should've

wheat kayak
#

@faint yachtIs that🤔 supposed to mean something?

wintry swallow
#

not a good look to openly talk about pirating the game in the official server

wheat kayak
#

he asked about version, I answered.

faint yacht
#

Latest SMods might not work with older Balatro versions. 🤷

wheat kayak
#

Just had to rename the mod folders from xxxx-main to xxxx

frosty dock
#

that matters for Talisman and Talisman only

wheat kayak
faint yacht
#

Well, as long as ya got it working.

frosty dock
#

yeah that was probably from talisman

wheat kayak
#

has to be one of the others

frosty dock
#

Trance maybe

dreamy thunder
#

before i had bought the original game i was using it cracked and some mods which added suits would crash my game

#

idk if thats the case w you though

faint yacht
#

Actually, as you're here, @frosty dock, any plans for the custom "Saved by" text being possible without other mods needing to patch it in?

frosty dock
#

yes

long sun
#

had no idea this channel existed, hi!

#

sorry i was bugging modding-chat 😭

#

i'll link there though

faint yacht
#

beginning_end?

long sun
#

no clue, it was part of Cryptid and i'm presuming it means wait for the use animation to finish

#

also what does card_eval_status_text actually mean?

dreamy thunder
#

where does rarities go in localization?

#

found it

zealous glen
#

I think you can make the word have a tooltip

#

Decks do that at least

wintry swallow
#

there, that should be way clearer on which modifier is applying which stake's scaling level

wintry swallow
#

first challenge using the new mods!

long sun
#

weird bug causing sold Tarots to not trigger, but sold Jokers to trigger — what's wrong here?

#

also it's still displaying nil as its mult value

#

ah. i found the fix for the second issue

#

oooh i think i know what the bug in the first is

#

does it consider the selling tarot to still be there when checking for what tarots are there?

#

i'll add a patch

#

okay i have no idea how to patch this, context.consumeable is nil when selling a Tarot so i can't check if the animation is running or not

#

:P

tidal steppe
#

hand idea: Blush
a flush with only face cards

royal carbon
#

I'm trying to figure out how to fix my code and I've got nothing, two issues atm:

  1. joker.key is returning nil for some reason
  2. Even when I bypass can_use getting rid of the highlighted joker doesn't get rid of it, and places an uninteractible version of the new joker in a static place in my joker tray no matter what method I use
#

Well I figued #2 out at least, it was the Q(function thing I copied

royal carbon
#

That was it, thank you so much

random sleet
tidal steppe
#

oh nice

random sleet
#

everything you can combine blaze with without using pareidola

#

(so no blaze straights)

tidal steppe
#

How do you add the extra button on end screen? i have the idea to add a limitless option along side endless on win screen. its basically endless but removed limits such as joker slots

#

or i might just make it a setting to alter endless

dreamy thunder
#

finally done with this thing

#

didnt think it would take this much time 🙏

random sleet
#

whats a document

long sun
#

what'dya think? :D

dreamy thunder
random sleet
dreamy thunder
#

i think its a joker

#

it says joker on top

long sun
#

it's a joker ^^

dreamy thunder
long sun
#

aaaaa thanks!! :D

#

ability reads:

On purchase, creates a random Negative Spectral card
self destructs```
#

(common)

dreamy thunder
#

oh thats neat

long sun
#

thanks ^^

#

actually wait maybe this should be uncommon

#

shrug

#

well i'll work on that ^^

random sleet
#

i dont get why it evokes tarot design then but ok

long sun
#

i mean why not :D

random sleet
long sun
#

well it says joker

cerulean rose
#

bump

dreamy thunder
long sun
#

ya

random sleet
#

(man you can really tell which ones of these i made)
my joker tarot card is a tarot so maybe im just used to that /shrug

long sun
#

fair!

#

oooooh these look awesome!!

#

i like how you've used the minor arcana

random sleet
#

the minor arcana Pages there are used as suit conversion tarot for the minor arcana suits

#

see here

long sun
#

ooooooooooooh!! how do they work?

random sleet
#

see here

long sun
#

oooooh :D

#

das cool!!

dreamy thunder
#

i hate nerfing stuff

solid surge
#

how would i make a joker that'd score +mult/+chips or Xmult/Xchips for scoring specific cards

tidal steppe
#
SMODS.Joker {
    key = 'evening',
    loc_txt = {
        name = 'Evening',
        text = {
            "Each played {C:attention}Even card{}",
            "gives {C:chips}+#1#{} Chips and",
            "{C:mult}+#2#{} Mult when scored"
        }
    },
    config = { extra = { chips = 4, mult = 2 } },
    rarity = 1,
    atlas = 'ModdedVanilla',
    pos = { x = 1, y = 1 },
    cost = 4,
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.chips, card.ability.extra.mult } }
    end,
    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play then
            if context.other_card:get_id()%2 == 0 then
                return {
                    chips = card.ability.extra.chips,
                    mult = card.ability.extra.mult,
                    card = context.other_card
                }
            end
        end
    end
}

one of mine as an example

solid surge
#

thanks for the assistance

twilit tinsel
#

tried coding a joker and my head hurts

#

woe is me

merry raven
#

Don't forget; you're here forever

twilit tinsel
#

i wish i could just outsource the coding so i could do the funny art

lethal pumice
#

hoof, trying to get into mod dev for my partner and I to make one together, but ive only managed to make the joker appear in game (albeit with the debug mod 😅 ), but it's not yet able to trigger. is it proper ettiquette to drop the mod in a code block here for advice?

#

(that is, the code for a single joker's text and function 😅 )

cerulean rose
twilit tinsel
lethal pumice
#
    key = 'Jokers', --atlas key
    path = 'Jokers.png', --atlas' path in (yourMod)/assets/1x or (yourMod)/assets/2x
    px = 71, --width of one card
    py = 95 -- height of one card
}
SMODS.Joker{
    key = 'baby-pi', --joker key
    loc_txt = { -- local text
        name = 'Pi',
        text = {
          'Each played {C:attention}3{}, {C:attention}Ace{}, {C:attention}4{}, {C:attention}5{} or {C:attention}9{} gives',
          '{X:mult,C:white}X#1#{} Mult when scored'
        },
    },
    config = { extra = { Xmult = 1.5 } },
    rarity = 2, --rarity: 1 = Common, 2 = Uncommon, 3 = Rare, 4 = Legendary
    atlas = 'Jokers', --atlas' key
    pos = {x = 0, y = 0}, --position in atlas, starts at 0, scales by the atlas' card size (px and py): {x = 1, y = 0} would mean the sprite is 71 pixels to the right
    cost = 8, --cost
    loc_vars = function(self, info_queue, card)
        return {vars = {card.ability.extra.Xmult}} 
    end,
    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play then
            if context.other_card:get_id() == 3 or context.other_card:get_id() == 14 or context.other_card:get_id() == 4 or context.other_card:get_id() == 5 or context.other_card:get_id() == 9 then
                return {
                    Xmult = card.ability.extra.Xmult,
                    card = context.other_card
                }
            end
        end
    end
}```
I'm currently trying to make a joker that gives x1.5 mult whenever 3, A, 4, 5 or 9 scores, though this is the first joker i'm making so i'm still pretty unfamiliar with balatro lua keywords, any advice?
random sleet
#

you want to return x_mult not Xmult

cerulean rose
#

add message = localize({ type = "variable", key = "a_mult", vars = { card.ability.extra.Xmult } }), to your return

lethal pumice
lethal pumice
#

that worked too! is either preferable over the other?

cerulean rose
#

is changes nothing and doesn't fix the original issue

#

i thought specifying the message was necessary but i just tested and turns out i'm wrong

merry raven
#

My main.lua is chock full of code dedicated to Enhancements and has like 1k+ lines, their sounds and some overridden functions, but I heard that there's a way to isolate them in a separate lua file, are there any example mods that do this?

lethal pumice
#

alrighty, thank you anyways! this game is so much fun, and the modding scene is so lively and interesting! :D
glad to learn these things any way I can, i'm sure they'll all help me and my partner as we get more used to Lua and balatro modding as a whole!

merry raven
tepid crow
#

I think it's Xmult_mod?

hardy viper
#

i would imagine thats for scaling xmult?

#

ah nvm

tepid crow
#

no, just regular xmult afaik

cerulean rose
#

yes, the required key is different between the two

tepid crow
#

ugh of course

#

yeah it's x_mult like autumn said

cerulean rose
#

no it can't

hardy viper
#

bluh

#

make up your mind 😭

tepid crow
#

my debugging sessions be like

random sleet
#

i love people trying desperately to prove me wrong its funny

#

meanwhile im looking at a joker that does almost exactly that functionality in my code lmao

#

but its based on suit instead

cerulean rose
#

it can be omitted for scoring triggered but not main joker scoring triggered

merry raven
random sleet
#

¯_(ツ)_/¯

tepid crow
#

eh

#

I've made chips version of mult jokers on purpose before ¯_(ツ)_/¯

random sleet
#

my Emojiokers mod is not about creativity

cerulean rose
#

why is smods so jank

random sleet
#

smods isnt jank, balatro is

merry raven
#

My ideas go in a loop, I thought long and hard about coming up with a new idea, and then by the tail end of concepting, I realized I made a worse Glass Card

tepid crow
merry raven
#

Me when Enhancements do not have all the contexts like a Joker would

cerulean rose
#

real

merry raven
#

I've put a pin on making Enhancements for now
Making Jokers would be significantly easier right?

right?

random sleet
cerulean rose
cerulean rose
dry merlin
#

can someone help me please.
how do i go about replacing these textures

cerulean rose
dry merlin
#

is there a way to do it with just steammodded

open bone
#

Hey, sorry I'm being a bit clueless about this- I wanna have an effect happen according to a variable at the end of a round, from the end_of_round context. Kinda like this-

But, well, obviously it's not working, haha. How would I go on doing this?

#

The variable exists just fine since I can print it with eval in the debug console

normal crest
#

By not working do you mean the game crashes?

open bone
#

yaya

Sorry I should have specified, it crashes since I assume doing an if context like this is NOT the intended way, which makes sense

so I just wanna figure out what's the proper way to do stuff at the end of the round

#

without it being a joker

rough furnace
#

I was skimming the channek and want to say hell yeah

normal crest
rough furnace
zealous glen
wintry swallow
open bone
#

Oh yeah I imagine that's what I wanna do but I'm not sure what's the actual function to use 😭

I tried looking at stuff like golden joker but my Searching has bore no fruit dying

normal crest
#

Could you specify more what kind of effect you want?

wintry swallow
#

if you go through the effort of reading the source and making a mod with the ID that it's looking for, then you've earned my debug mode lmao

open bone
#

Give +5 dollars if you finish a blind with an Overkill (the flame-like effect)

In essence I just want a +5 added to your money at the end of a blind but without using a Joker (It's meant to be a voucher, so I'm using that variable which is turned to True with the purchase of the joker)

rough furnace
#

The config table is just what the file has

wintry swallow
#

ah

zealous glen
#

Question: is there a built-in way to check for a card's suit?

#

Not if it has a specific suit, but to ask its suit

#

I just don't remember if vanilla has one

rough furnace
#

Card:is_suit or smth

zealous glen
#

That's for a specific suit

#

I would prefer not to iterate over SMODS.Suits tinyfin

rough furnace
#

Well things get messy with wild cards

#

There's something on the objext to keep track

#

But I don't know what it is

zealous glen
#

There's a function just to ask if a card is wild

normal crest
#

it's probably something simple like card.suit

zealous glen
#

Agreed I just wanted to know if there was a method

rough furnace
#

Check what the method to set the suit does

zealous glen
rough furnace
#

Idk I use it in DebugPlus

zealous glen
#

thanks thunk

rough furnace
#

Oh it's part of the base

#

I know smods overrites this

zealous glen
#

I imagine

rough furnace
#

Anywyas things that's bad look at now you change ranks in vanilla

#

(there's no function for it you just have to look at strength)

zealous glen
#

ye

#

Thankfully I don't wanna change them

#

Just know them

rough furnace
#

DebugPlus's rank code is stupidly cursed

zealous glen
#

Be aware

#

👁️ 👄 👁️

normal crest
#

But you might not be able to accomplish what you want with a hook

#

Might need to use a lovely patch

#

But don't take my words for granted

rough furnace
#

No you shouldn't

#

Oh wait

#

I didn't see the reply

open bone
#

Clueless i will Look

merry raven
#

The thingamajiggy

wintry swallow
#

you were not joking

merry raven
#

I see you there Victin

zealous glen
merry raven
#

Tower of Babelse

zealous glen
rough furnace
#

3am

merry raven
#

Now where do I start with

  • Disabling hand types
  • Spawning Boss Blind-specific cards (Enhancements/Jokers/Editions etc etc)
normal crest
wintry swallow
rough furnace
#

(I unfortunately support vanilla in DebugPlus)

normal crest
#

my condolences

zealous glen
merry raven
#

Oh yeah the Needle

zealous glen
#

Not the Needle

merry raven
#

No wait

#

Mouth

wintry swallow
# wintry swallow don't worry i have had to do _extensive_ patching, i know the horrors

these

  • allow removing of the "Endless Mode" button from the win screen because in some contexts it makes no sense
  • implement purple and green stake scaling challenge modifiers
  • implement the ability to specify editions on consumables in challenges
  • implement the ability to specify for jokers to be rental in challenges
  • implement the "run starts at ante X" and "you win after ante X" modifiers
  • fix a very strange edge case i didn't catch the first time, which combined with the "no hand regen" modifier, allow for the player to have -1 hands (it just forces a game over instead)
  • implement the "discards do not regenerate" modifier, and the "hands do not regenerate" modifier
zealous glen
rough furnace
#

idk they might both work

zealous glen
#

That's what set_base uses

rough furnace
#

card.config.card.suit is what is_suit uses

open bone
#

Clueless whoops
getting an error trying to add dollars-

rough furnace
#

at least vanilla

tidal steppe
wintry swallow
#

i think having to add a warning like this

#

is probably a hallmark that a challenge is too much

twilit tinsel
#

ooo

rough furnace
wintry swallow
#

doing this challenge will not be required for mod 100%

#

it will be part of the "B-side" section, for things too strange or outlandishly difficult to land in main set

merry raven
wintry swallow
#

isn't that what stone joker does

#

oh no it's to hand not to deck

tidal steppe
# wintry swallow

maybe you regain some per ante? like after boss you regain 1 or X or all?

rough furnace
#

burgalar

wintry swallow
#

maybe for something in main set but this is staying this way

#

burglar is banned

tidal steppe
#

dayum

normal crest
tidal steppe
#

@twilit tinsel wanna show off some art?

open bone
#

i uh
never did a lovely patch before

hallow forge
# wintry swallow

i made a challenge similar to this, in that yhands and discards do not reset.

open bone
#

I don't know where to start 😭

normal crest
#

Simply create a lovely.toml file within your mod folder

twilit tinsel
rough furnace
#

you should be able to add money at the end of round

#

I think SMODS provides an api for this

twilit tinsel
#
  • those genshin aces
rough furnace
#

or you can just ease_dollars

open bone
#

oh ease_dollars add money?

rough furnace
#

yes

wintry swallow
#

the joker using the flag of nepal for the K is funny

#

i like it

rough furnace
#

you can also just set G.GAME.dollars

tidal steppe
open bone
#

i will see if it works,,

normal crest
open bone
#

oh I don't mind if it doesn't add it to end of round

twilit tinsel
normal crest
#

then you can just call ease_dollars in the hook you already made

open bone
#

Sorry for messing up something so basic lmao, I do Gamemaker, not Lua-

rough furnace
zealous glen
merry raven
modest glen
#

wanna make some custom card art, where do i start?

normal crest
#

they want a voucher that does it

open bone
#

Yeah I was making it as a voucher

#

that's why I was strugglin a bit

rough furnace
#

oh as a voucher

open bone
#

yeah otherwise i'd use calc dollar bonus fdshjk

wintry swallow
#

do the stone cards go away after the blind

zealous glen
wintry swallow
#

i think that might be better because otherwise you run into the risk of fucking up people's, e.g. erosion, builds

zealous glen
#

Get screwd

wintry swallow
#

no i mean fucking them up for the rest of the run

open bone
#

there we go the effect works

i'll add the actual details of only triggering on an Overkill later I'm just glad I got the basics to work lmao

twilit tinsel
merry raven
#

Hmmm maybe I can make my Boss Blind specific card an Enhancement
But how do you make them not show up in any Standard Pack?

open bone
#

Thank for the help,

rough furnace
normal crest
#

yeah boss blinds don't really mess up the rest of the run

wintry swallow
#

vanilla non-final boss blinds don't have the potential to just screw your build for the rest of the run

zealous glen
#

That's the goal

rough furnace
#

well I mean then have the potential to screw up the rest of the run by losing

normal crest
#

but they screw up the run during the blind

zealous glen
wintry swallow
#

idk. the balancing doesn't quite sit right with me

zealous glen
#

also the Rock exists to make the rest of your run worse. Or better

karmic kelp
#

The Ox's penalty is theoretically avoidable though

zealous glen
#

Avoid drawing Stones

wintry swallow
#

that's luck-based

karmic kelp
#

like if you finally got your High Card engine online, after a long run of Flushes

tidal steppe
zealous glen
modest glen
#

implement i guess? like the ones in game

modest glen
#

the customize cards

zealous glen
#

Made 2s, 5s, and 10s earn money

modest glen
rough furnace
#

like what do you want help with?

twilit tinsel
zealous glen
#

Oh I also made Brazilian Miku

rough furnace
#

if you want shitty art made in very little time, let me know

modest glen
wintry swallow
#

oh god i've just had a horrible idea for a challenge. "Escort Mission", you start with one Joker (+4 mult jimbo), goal is to reach ante 10, "Selling the Joker doubles the size of all future Blinds"

zealous glen
#

huehuehue

twilit tinsel
rough furnace
#

not sure why this example deosn't include example art

modest glen
#

nice thanks, i guess ill try to find a texture dump of the base cards or something

rough furnace
#

you can extrat the games files with 7zip and get the sprites

modest glen
#

i want to make it in the same style as the free dlc ones

#

oh nice

tidal steppe
#

@tall wharf you able to help here?

#

theyve been doing reskins like the dlc's

zealous glen
tall wharf
#

hello

#

i haven't looked into making custom jokers yet

tall wharf
#

ah

#

what do you want to make a skin of

#

just face cards or the whole deck

#

@modest glen

zealous glen
#

also if you want to make DeckSkins

modest glen
#

oh im just doing face cards

zealous glen
#

I made the template included in Steamodded

#

You can edit it for your own use

tall wharf
#

yeah

modest glen
#

right now im figuring out how to install steamodded though lol

tall wharf
#

uh

#

you install lovely

#

download steamodded and put that in %appdata%/Balatro/Mods

#

done

rough furnace
#

theres like a 42% I just broke all of smods

normal crest
#

would it be the first time?

zealous glen
rough furnace
rough furnace
wintry swallow
#

i can't find the fucking text parser

modest glen
#

ok so basically i just find the textures in the exe, draw over that, then implement it in the deck skin template right?

rough furnace
wintry swallow
#

i need to template #X# variables with like, the name of a joker

rough furnace
#

but it might be tied to the localization system

wintry swallow
#

it is

wintry swallow
#

in-game this appears as the joker ID

#

i.e. Selling j_joker doubles size of all future blinds

#

which is not what i want

#

it should be Selling Joker doubles size of all future blinds

rough furnace
#

that would be whatveer your loc_vars provides

wintry swallow
#

oh

#

it's in

#

loc_parse_string

wintry swallow
wintry swallow
#

it needs to be

#

it's the ID

rough furnace
#

lov_vars is whats replaced with the # placeholders

#

you should be able to set it to whatveer

wintry swallow
#

it's a custom rule in a challenge

#

does that matter

rough furnace
#

not familar with challenges

wintry swallow
#

hmm

normal crest
#

Are you trying to translate the joker key?

wintry swallow
#

i'm trying to get it to show up as the localised name of the joker

#

loc_var 1 is the ID of the joker

normal crest
#

Couldn't you just do G.localization.description.Joker.j_joker.name

wintry swallow
#

again it's a challenge custom rule defined in the localisation file

#

this is all i have to work with, lovely patches aside

#

this is the code that handles localising challenge rules

#

in the selection UI

#

i am going to inject some bullshit into this line

#

this is the only way to do what i want to do it seems

normal crest
#

Can I see the rules table in your challenge

wintry swallow
#
    rules = {
        custom = {
            {id = 'nsc_custom_win_ante', value = 10},
            {id = 'nsc_selling_card_doubles_future_blinds', value = 'j_joker'}
        }
    },
    jokers = {
        {id = 'j_joker'} -- the 'escort'
    },
#

dw though i've figured it out

normal crest
#

What'd you change to make it work?

tidal steppe
#
            for _, card in pairs(G.deck.cards) do
                if card:get_id() > 10 and card:get_id() < 14 then
                    face_count = face_count + 1
                end
            end

How do i access the full deck? this only counts the remaining deck. i tried G.full_deck.cards but thats nil

normal crest
#

G.playing_cards

wintry swallow
# normal crest What'd you change to make it work?
[manifest]
version = "1.0.0"
priority = 0

[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = '''game_rules[#game_rules+1] = {n=G.UIT.R, config={align = "cl"}, nodes= localize{type = 'text', key = 'ch_c_'..v.id, vars = {v.value}}}'''
position = "at"
payload = '''
local locvars = {v.value}
if v.id == 'nsc_selling_card_doubles_future_blinds' then
    locvars[1] = G.localization.descriptions.Joker[v.value].name
end

game_rules[#game_rules+1] = {n=G.UIT.R, config={align = "cl"}, nodes= localize{type = 'text', key = 'ch_c_'..v.id, vars = locvars}}
'''
match_indent = true
#

just a dead simple lovely patch

#

...which doesn't work hold on

normal crest
wintry swallow
#

no

#

because j_joker needs to be the ID

#

for logic

#

i'm not going to go do a reverse lookup through the localisation tables to figure out what card we're thinking about

#

this also still doesn't work but i am confident i'm on the right track

tidal steppe
merry raven
#

Is there a way to make it so that an Enhancement won't show up in Standard Packs?

normal crest
#

set weight to 0?

wintry swallow
#

yup ok

merry raven
#

Oh that's what weight does?

#

The wiki isn't exactly clear about it lmao

wintry swallow
#

there we go!

#

excellent

wintry swallow
tidal steppe
#
        if context.joker_main then
            local face_count = 0
            for _, card in pairs(G.playing_cards) do
                if card:get_id() > 10 and card:get_id() < 14 then
                    face_count = face_count + 1
                end
            end
            return {
                mult_mod = face_count/2,
                message = localize { type = 'variable', key = 'a_mult', vars = { face_count } }
            }
        end

am i dumb? why is face_count/2 not dividing by 2. face_count is 9, yet im getting mult_mod of 9 instead of 4.5???

merry raven
zealous glen
#

This might be too strong 🤔

merry raven
#

Yeah it's just a blind-specific card that appears in a blind, and disappears when the blind is defeated
It cannot be obtained anywhere else

zealous glen
#

Then that should work

merry raven
#

Righto

#

What about the disappearing part

wintry swallow
#

on that note

#

does the Card class know its ID?

#

i.e. j_joker j_mystic_summit etc etc

normal crest
#

card.config.center_key yeah

normal crest
tidal steppe
#

how can i check if card is debuffed?
card:is_debuffed?

merry raven
#

I use if card.debuff then

sonic cedar
#
SMODS.Atlas{
    key = 'Jokers',
    path = 'Moriah.png',
    px = 71,
    py = 95
}
SMODS.Joker{
    key = 'moriah',
    loc_txt = {
        name = 'Moriah',
        text = {
            '{C:chips}+#22#{} Chips and {C:red}+#2# Mult',
            'Gain {C:money}1${} at end of round'

        },
    },
    atlas = 'Jokers',
    rarity = 3,
    cost = 6,
    unlocked = true, 
    discovered = false,
    blueprint_compat = true,
    eternal_compat = true,
    perishable_compat = true,
    pos = {x = 0, y = 0},
    config = {
        extra = {
            chips = 22,
            mult = 2
        }
    },
    check_for_unlock = function(self, args)
        if args.type == 'isaac moriah is 5 years old' then
            unlock_card(self)
        end
        unlock_card(self)
    end,
    in_pool = function(self,wawa,wawa2)
        return true
    end,
    calc_dollar_bonus = function(self,card)
        return 1
    end,
}

can someone tell me why the chip-mult values show up as nil?

#

in game i mean

tidal steppe
#

another mod success!
thx for the help 🙂

SMODS.Joker {
    key = 'popBonus',
    loc_txt = {
        name = 'Populous',
        text = {
            "{C:mult}+1{} Mult per 2",
            "{C:attention}face{} cards in your full deck"
        }
    },
    rarity = 1,
    atlas = 'ModdedVanilla',
    pos = { x = 4, y = 0 },
    cost = 4,
    calculate = function(self, card, context)
        if context.joker_main then
            local face_count = 0
            for _, card in pairs(G.playing_cards) do
                if card:is_face() and not card.debuff then
                    face_count = face_count + 1
                end
            end
            face_count = math.floor(face_count / 2)
            return {
                mult_mod = face_count,
                message = localize { type = 'variable', key = 'a_mult', vars = { face_count } }
            }
        end
    end
}
merry raven
# zealous glen Depending on what you want to do, yes

Unfortunately defining weight = 0 doesn't work, the middle card is the Wish Card (the blind-specific card)

SMODS.Enhancement {
    key = "diving_bird",
    loc_txt = {
        name = "Diving Bird",
        text = {
            "{X:dark_edition,C:white}WISH CARD{}",
            "",
        }
    },
    atlas = 'Enhancements',
    no_rank = true,
    no_suit = true,
    always_scores = true,
    weight = 0,
    overrides_base_rank = true,
    replace_base_card = true,
    pos = {x=3, y=0}
}

Any insights?

wintry swallow
#

where do prints land?

#

in the lovely console?

#

yes they do

#

okay, next question

#

when does the game calculate the size of a blind

#

oh of COURSE

#

the game calculates it twice

#

yeah of course why wouldn't it. why wouldn't it

#

thanks thunk.

tidal steppe
wintry swallow
#

huh neat

tidal steppe
#

among other great features

normal crest
#

you can also eval lua code while it's running

wintry swallow
#

neat!!

merry raven
#
SMODS.Sound({
    vol = 0.6,
    pitch = 0.7,
    key = "music_corrupted_wish",
    path = "corrupted_wish.ogg",
    select_music_track = function()
        return (G.GAME and G.GAME.blind and (G.GAME.blind.config.blind.boss and G.GAME.blind.config.blind.boss.showdown)) and 2 or false
    end,
})

Is there a way to make it so that this song plays during a specific Finisher Boss Blind? The key of the boss blind is corrupted_wish

crimson fern
#

hey could someone help me with a cryptid crash

merry raven
# zealous glen see L Corp

What I've seen from L Corp (the Steamodded example anyways) is that they play separate music for regular boss blinds and finisher boss blinds
But I want it to be specific finisher boss blinds

zealous glen
#

I think they play specific music for specific blinds

sonic cedar
zealous glen
#

but anyways you can always check what's the current boss

merry raven
#

What's the syntax?

random sleet
#

not much whats the syntax with you?

merry raven
#

What

#

The source code says something like if self.name == 'Cerulean Bell' then

Then should mine be like G.GAME.blind.config.blind.boss.showdown.name == "fm_corrupted_wish"?

#

No it wasn't

crisp coral
merry raven
#

Ayyy thanks for helping out lemme try

random sleet
#

myst the blind whisperer

crisp coral
#

:3

merry raven
#

Like this?

return (G.GAME and G.GAME.blind and (G.GAME.blind.config.blind.boss and G.GAME.blind.config.blind.boss.showdown and G.GAME.blind.config.blind.key == "b_fm_corrupted_wish")) and 2 or false
#

Not sure and 2 or false is, I copied this entire segment from LobCorp's example on Steamodded

crisp coral
#

can be shortened it to

return (G.GAME and G.GAME.blind and G.GAME.blind.config.blind.key == "b_fm_corrupted_wish") and 2 or false
crimson fern
#

hey modders! trying to start the game but it crashes at steamodded, whats the issue? Heres the crash notes

crisp coral
#

2 or false means the music will be played with a priority of 2 (higher takes prio) if the conditional is met

crisp coral
normal crest
#

should be 2.0.2

crisp coral
#

orrr that

normal crest
#

probably a combination of both

crimson fern
#

ok thanks ill try both

merry raven
placid frigate
#

my 2 X mult values are switched (only the text thew acctually code works fine) how can i switch them

normal crest
#

The number between the # means which index of the list you return from loc_vars it takes

crisp coral
#

im fucking stupid

normal crest
#

So #1# would take the first value, #2# the 2nd

crisp coral
#

bl_fm_corrupted_wish

#

the obj prefix is bl not b

merry raven
#

Balatro and its naming conventions istg

crisp coral
#

b is for decks (backs)

placid frigate
merry raven
#

Enhancements is m
Bruh

normal crest
crisp coral
#

m

#

prolly called modifier initally

crimson fern
#

yo i changed the names of the files and replaced talisman and it still crashes

placid frigate
normal crest
crimson fern
normal crest
#

Just copy the cryptid folder inside to your Mods folder, delete the old one

crimson fern
#

got it

quaint latch
#

Hi! 2 noob questions :)

What context is used for when a hand is played and how would i go about drawing/adding a specific Standard Card to Hand but not to deck (2,3,4,K,Q,J, etc.)

wintry swallow
#

that conditional will never be true

merry raven
# crisp coral :3

Blind Whisperer I require your services

set_blind = function(self, reset, silent)
        for i = 1, 4 do
            local front = pseudorandom_element(G.P_CARDS, pseudoseed('bl_diving_bird'))
            G.playing_card = (G.playing_card and G.playing_card + 1) or 1
            local card = Card(G.play.T.x + G.play.T.w / 2, G.play.T.y, G.CARD_W, G.CARD_H, front, G.P_CENTERS.m_fm_diving_bird, {
                playing_card = G.playing_card
            })
            
            card:start_materialize({G.C.SECONDARY_SET.Enhanced})
            G.play:emplace(card)
            table.insert(G.playing_cards, card)
            
            G.deck.config.card_limit = G.deck.config.card_limit + 1
            draw_card(G.play, G.deck, 90, 'up', nil)
            
            playing_card_joker_effects({true})
        end
    end

After I shameless copy Victin's code for giving Blind-specific cards, when I select a card, I get this error:

msg = string: "blind.lua:576: bad argument #1 to 'next' (table expected, got nil)"

Line 576 points to here:

if self.debuff then
        self.triggered = false
        -- below is line 576 I figured that you'd get a better grasp of where it is used
        if self.debuff.hand and next(hand[self.debuff.hand]) then
            self.triggered = true
            return true
        end
merry raven
normal crest
quaint latch
crisp coral
#

rule of thumb, self in the game code refers to G.GAME.blind

crisp coral
#

so replace all instances of self with G.GAME.blind

wintry swallow
quaint latch
#

I think i could add an enchantment to it, check for it and then remove all cards from the deck that have the enchantment

crisp coral
quaint latch
#

sounds highly inefficient though

merry raven
wintry swallow
#

oh "in blind.lua"

crisp coral
#

oh

#

i dont have vsc up holon

quaint latch
#

(or just check the played hand and after round end xd)

normal crest
quaint latch
#

Ah that is much better, i dont have too much clue about the inner workings of balatro yet so i tend to overcomplicate things

crisp coral
#

what's your blind's config?

merry raven
#

Oh wait now I know what's wrong

quaint latch
#

Anyway thanks a lot srockw :D

merry raven
#
debuff = {
        hand = {
            ['Pair'] = false,
            ['Two Pair'] = false,
            ['Three of a Kind'] = false,
            ['Full House'] = false,
            ['Four of a Kind'] = false,
            ['Five of a Kind'] = false,
            ['Straight'] = false,
            ['Flush'] = false,
            ['Straight Flush'] = false,
            ['Royal Flush'] = false,
            ['Flush Five'] = false,
            ['Flush House'] = false
        }
    },
#

But I haphazardly defined it like this and promptly forgot about it

crisp coral
merry raven
#

That's why the error was pointing to the debuff part of blind.lua

#

Alright shit how am I going to do the hand type disabling thingy

crisp coral
#

kid named The Eye

merry raven
#
if self.name == 'The Eye' and not reset then
        self.hands = {
            ["Flush Five"] = false,
            ["Flush House"] = false,
            ["Five of a Kind"] = false,
            ["Straight Flush"] = false,
            ["Four of a Kind"] = false,
            ["Full House"] = false,
            ["Flush"] = false,
            ["Straight"] = false,
            ["Three of a Kind"] = false,
            ["Two Pair"] = false,
            ["Pair"] = false,
            ["High Card"] = false,
        }
    end

Zero idea where to go on from here

#

Patch into set_blind in blind.lua? maybe?

crisp coral
#

no need but i also cant help rn gotta get some lunch before studying

merry raven
#

Go get yer lunch

#

I need you to whisper to my blinds in the future

#

Oh shit if I do this I can just put the cards in the middle of my screen and have them hover there, I can even drag them around and they will stay there
Could make for some nice displays

set_blind = function(self, reset, silent)
        for i = 1, 4 do
            local front = pseudorandom_element(G.P_CARDS, pseudoseed('bl_diving_bird'))
            G.playing_card = (G.playing_card and G.playing_card + 1) or 1
            local card = Card(G.play.T.x + G.play.T.w / 2, G.play.T.y, G.CARD_W, G.CARD_H, front, G.P_CENTERS.m_fm_diving_bird, {
                playing_card = G.playing_card
            })
            
            card:start_materialize({G.C.SECONDARY_SET.Enhanced})
        end
    end
merry raven
wise idol
rare bobcat
#

How does one go about making a balatro mod and how does one go about learning the language needed to do it

#

I’m pretty sure it’s lua but I want to make sure

wise idol
#

correct

rough furnace
# wise idol getting this, what's wrong at line 14? this is just for a deck skin

Probably the Collabs aren't around at that point yet. You probably should be using the DeckSkin api https://github.com/Steamodded/smods/wiki/SMODS.DeckSkin https://github.com/Steamodded/smods/tree/main/example_mods/Mods/DeckSkinTemplate

GitHub

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

GitHub

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

rare bobcat
#

Are there any resources to learn lua and balatro modding?

#

My only coding experience was scratch from when I was in school but I was the best in the district

#

It’s been a while but I could still make a good game in scratch if I wanted to

wise idol
#

is the asset folder "assets" or "asset"

#

and the lua file should be "main" right?

rough furnace
#

The assets should be "assets".

wise idol
#

okay that's good

rough furnace
#

The mod author should be wrapped in []

wise idol
#

ok

rough furnace
#

Probably the header is invalid without it

wise idol
rough furnace
#

Make sure the file for the atlas is named correctly

rare bobcat
#

Is this the wrong channel to earn how to mod/learn where the resources to mod are?

wise idol
#

Is the atlas wrong? It's J/Q/K horizontally

rare bobcat
#

Should I just look up a tutorial

wise idol
#

Is having a 1x and 2x folder right? I can't find anything

rare bobcat
#

I looked up a tutorial and it looks good

#

I’d have to download all the things to make balatro mods work on my laptop because I mostly use my main computer for that stuff but it won’t take long

carmine burrow
#

i wanted to try making a consumable that lets you put playing cards in your consumable area (and then take them back out whenever) but there are some unforeseen interactions with perkeo ...

#

note that the consumable area says 3/2 cards

#

the "negative" edition on playing cards is actually labeled as "+1 hand size" but it doesn't seem to be doing that when they're in my consumable area. .. would be really funny if they did

#

technically speaking i could cheat my way out of this one because perkeo says it creates a copy of a random "consumable card in your possession"

#

so if i made it impossible for perkeo to duplicate playing cards it wouldn't be contradicting the text

#

or i could just scrap the idea

#

other interesting thing (completely expected) is that having the foil card in my consumables gives me the +50 chips every hand

wise idol
#

yeah I have no idea what to do

#

I only just got into this so I don't know my way around this

rare bobcat
#

If you fix the negatives being weird then the perkeo interactions could be cool

wise idol
#

Is there perhaps something to fix with the keys?

carmine burrow
#

i guess i could just put not card.ability.consumeable lol

#

unless that would somehow interfere with other mods

#

i guess there's no way to avoid interfering with other mods if i'm doing things w/ lovely

timid parrot
#

Theoretically if it’s neither a consumable nor a joker it’s a playing card

crimson fern
#

hey guys was here earlier just encountered another cryptid glitch

#

all my exotics are double overlaying the effects

#

as you can see

#

does anybody have a fix

#

?

rare bobcat
#

Oh maybe vouchers in the consumable slot

carmine burrow
#

also, i wanted to ask about the dir arguments to a lot of functions such as draw_card, the things that are either 'up' or 'down'. what do those do?

#

i'm sure there's somewhere i could look this up

hardy viper
rare bobcat
#

What mod(s) are those from

sturdy compass
#

This Joker is very unpleasant

wise idol
# wise idol

anyone know how to fix blank cards in the collab selector?

subtle merlin
#

How would someone:

Create a custom edition?
Create a Joker that edits cards (like Midas mask)?
Create a joker that increases mult or chips per number of cards with a specific edition in the full deck (like Stone Joker or Blue Joker)?

carmine burrow
#

kind of funny that you can sell the cards

subtle merlin
carmine burrow
#

it does by default

#

i didn't have to do anything really

subtle merlin
#

oh, nice

carmine burrow
#

i've heard it's a little janky though

tidal steppe
#

i was trying to give more, but frankensteining 2 of my jokers in discords text area just made spaghetti

#

How can i with deck advance/skip ante? start them at ante 2 for example
how do i grant booster packs?
how do i grant starting money?

normal crest
carmine burrow
#

somewhat interestingly the cards in my consumable area are counted towards the total in the deck. does that mean i'm doing something wrong or is that how it should work?

tidal steppe
#

interesting

carmine burrow
#

well i'm definitely doing something wrong because when perkeo duplicates cards they aren't added to the deck count

dusk shoal
#

maybe because theyre negative?

carmine burrow
#

and i don't think they'll be drawn again

#

aren't on the screen either

crisp coral
carmine burrow
#

this is after selling the 10 and then putting the negative copy back into my hand, then finishing the round. the deck says there are 52 cards out of 51

#

but then the negative ten of hearts doesn't show up here

wise idol
#

I should have assets/1x and assets/2x for collab skins right

carmine burrow
#

i did end up drawing the card to my hand later

#

strange!!

#

(also i had played it this ante but it wasn't debuffed by the pillar)

wintry solar
tidal steppe
#

can anyone help me with this deck?

    apply = function()
        -- ante = 2
        -- money = 25
        -- gain 1 jumbo buffoon pack
    end

i dont know what variables/functions to use

carmine burrow
#

would it be easiest to create a tag rather than manually create the jumbo buffoon pack? (i'd guess the answer is "no" but it's just a thought)

tidal steppe
#

im happy with tag, do you know how to do that?

#

either works

sick sparrow
#

does anyone having pot of greed card?

tidal steppe
#

i think i saw one the other day in here

carmine burrow
sick sparrow
carmine burrow
#

this is the code that hieroglyph et al use to set the ante, so maybe G.GAME.round_resets.blind_ante = 2 would work ... probably have to be careful though because everything might work differently when the run's just starting

subtle merlin
carmine burrow
#

and then this is the code that diet cola uses to create the double tag

#

fancy event & sounds stuff optional. .. maybe

tidal steppe
carmine burrow
tidal steppe
#

ok, got the ante increasing, although the blind scores dont update till you enter.
now to try the tag/pack

#

it did not like that

#
    apply = function()
        -- ante = 2
        ease_ante(1)
        G.GAME.round_resets.blind_ante = G.GAME.round_resets.blind_ante or 2
        -- gain 1 jumbo buffoon pack
        G.E_MANAGER:add_event(Event({
            func = function()
                add_tag(Tag("tag_buffon"))
                return true
            end
        }))
    end
hardy viper
#

what's a "buffon"

tidal steppe
#

missing brackets?

#

that too XD

#

Yippe!

#

only issue is wrong buffoon pack

modest glen
#
--- MOD_NAME: NAME OF MOD (required)
--- MOD_ID: UNIQUE MOD ID (required)
--- PREFIX: UNIQUE MOD PREFIX (required)
--- MOD_AUTHOR: [ARTIST, CODER, Victin] (required)
--- MOD_DESCRIPTION: WHAT IS THIS (required)
--- LOADER_VERSION_GEQ: 1.0.0
--- VERSION: 1.0.0
--- BADGE_COLOR: FFFFFF```
what exactly is MOD_ID and PREFIX?
this is the from the Deck Skin Template
carmine burrow
#

the prefix is a thing added to the id of every joker, consumable, challenge, etc. you put into the game through SMODS

#

e.g. if the prefix is jmibo and i make a joker w/ key example then the joker would be stored with the id j_jmibo_example

#

or if you set the prefix to gros and you made a joker w/ key michel it could potentially cause some huge problems .... probably not, i don't know much about steamodded

modest glen
#

wait i dont get it why would it

subtle merlin
carmine burrow
modest glen
#

oh its a joker already

#

ok so is the MOD_ID here just the key?

elder vapor
#

anyone know how to retain card bonuses after a card's center gets changed?

carmine burrow
#

i don't know what mod id is for specifically, but i'm guessing it's just a string that you want to be sure is different from that of any other mods

modest glen
#

ill just mash numbers then lmao

carmine burrow
#

i would say it's probably a good idea to have it some transformed version of the mod name in case the id is used in diagnostics (debug messages etc.)

modest glen
#

yeah that makes sense

random sleet
subtle merlin
# subtle merlin Pulling back from coding, working on ideas for now

I need to sleep, so if anyone is interested in and/or can help with implementing these:

Edition: “Shadow”: On play: If card scores, card is destroyed. Not naturally occurring.

Jokers:
Wisp: On play: Convert all scoring cards into Shadow cards (Rarity: 1)
Umbra: Gains x0.2 mult per Shadow card destroyed (Rarity: 2)
Ghost: Gains +1 mult per Shadow card in your full deck (Rarity: 1)
Penumbra: Gains +20 chips per Shadow card in hand (Rarity: 1)
Phantom: On Blind selected, create a random card with Shadow (Rarity: 1)

Tarots:
Page of Swords: Turn two cards into Shadow cards

Spectrals:
Twilight: Turn all cards in hand into Shadow cards

carmine burrow
#

the only case it would be useful is on foil/holo/polychrome cards since those have their effects apply when in consumable area (likely a holdover from when joker and consumable slots were merged?)

random sleet
#

that happens because consumables are calculate_joker'd
this is for Observatory :)

dry merlin
#

could someone please help me on how to replace the suit icons in the deck menu with steam modded

elder vapor
random sleet
#

yes so you'd want to implement a perma bonus-like thing

elder vapor
#

sigh

sick sparrow
#

how to modify starting deck with custom cards?

modest glen
#

ok i got it working thanks guys

crisp coral
#

cute as hell

modest glen
#

thanks 😄

tidal steppe
dry merlin
sick sparrow
#

how to add suit and rank?

modest glen
#

nexus or gamebanana?

#

or here?

dry merlin
#

Most mods I see are either on Nexus, GitHub, or here

tidal steppe
#

whats nexus?

dry merlin
#

Nexusmods

modest glen
#

ill just upload it here later then i dont wanna make accounts lmao

wintry solar
#

I wouldn’t recommend looking through nexus really

modest glen
#

yeah nexus is... very offbrand...

sick sparrow
#

how to add suit and rank?

dry merlin
random sleet
#

here's how i add mine

#

hope this helps ! :)

sick sparrow
random sleet
#

hey genius it's not helpful anyway

dry merlin
random sleet
#

just override the atlas i guess?

dry merlin
#

I've been trying but I can't get it to work

#

I'm very new to Lua and steammodded coding

tidal steppe
#

how do i access the number of blinds that have been skipped (tags taken)

wet sand
#

how do you make an "upgrade" pop and update a cards description

#

ive been trying to make something like hiker just to familiarize myself with the codebase and while it is actually adding the bonus chips its not updating visually anywhere

elder vapor
#

didn't take long to add perma versions of hand xmult, xmult, played dollars, and xchips

tidal steppe
#

how do i remove cards from starting deck, like abandoned. i want to make its opposite royal/noble which is only face cards

random sleet
#

you simply do it

dry merlin
tidal steppe
#

the examples only alter cards? not add or remove

merry raven
#

@crisp coral I need some tips on how to create more sophisticated blinds and possibilities

  • Any functions that can display text like how a Blind displays its description at the start, but I can play it anywhere (ex: certain conditions, low hand count, low cards in deck left, tiny flavour text, etc)?
  • Is there a way to display sprites directly on the screen (and also have it persist when exiting the game and coming back)? I concepted a Blind that displays weird symbols on the screen that you must play a specific hand or card to destroy.
  • Is there a way to block the player from completing the Blind even if they reached the goal until they meet certain criteria? (ex: destroying all symbols mentioned in the last point)
crisp coral
cerulean rose
sick sparrow
#

can you add custom rank/suitless card directly to P_CARDS?

crisp coral
#

Stone is an enhancement, not a separate playing card

sick sparrow
#

an true separate playing card

#

like custom four card

wet sand
merry raven
wintry solar
#

That sounds like what you’d do, yeah

sick sparrow
merry raven
#

Are there mods that use a global UIBox that I can reference?

wintry solar
#

You could look at how tags work

#

They’re just sprites on the screen with a hover effect

merry raven
#

Ooo good point

#

How much of a hassle is it to change their positions?

wintry solar
#

You’d just replicate the ui box however many times you need

merry raven
#

I see I see

#

Oh boy there's a lot more to do
Drawing the UIBox, doing the logic for spawning in sprites, and destruction/despawning logic

#

And making it persist between game reloads

sick sparrow
night pagoda
#

I have a couple of effects that debuff Jokers, but if I somehow un-debuff them and debuff them again, they will stack their effects (happens with troubadour, merry andy, etc.) - any idea how I could avoid that?

#

I use G.GAME.blind:debuff_card for debuffing

#

and mod.content.set_debuff(card) for determining the outcome

sick sparrow
#

might because of names and suits that are nonexistant

#

or maybe the number must be string

#

i think this game crashes because it can't find the translation string

#

and it was missing custom suit, thus it crashes

brisk rose
#

use smods.suit, first of all

#

and smods.rank if you need it

sick sparrow
brisk rose
sick sparrow
brisk rose
#

SMODS.Suit{ -- Ringtails
key = 'Ringtails',
card_key = 'RINGTAIL',
hidden = false,
lc_atlas = 'stupid_cards',
hc_atlas = 'stupid_cards_hc',

lc_ui_atlas = 'stupid_suits',
hc_ui_atlas = 'stupid_suits_hc',

pos = { x = 0, y = 0 },
ui_pos = { x = 0, y = 1 },

lc_colour = HEX('3b0082'),
hc_colour = HEX('3b0082'),

loc_txt = {
    ['en-us'] = {
        singular = 'Ringtail',
        plural = 'Ringtails',
    }},
in_pool = function(self, args) --Returns true if it's in the pool, false otherwise
        --Checks if it's initial deck spawning
        if args and args.initial_deck then
          return true
        end
        --Other cases for standard packs
        return true
end

}

In any case, here's what a full suit definition looks like

#

the in_pool is the hard part, and it'll be what you need to mess with for your special case

#

admittedly I don't know how it interacts with rank, but I'm pretty sure it's documented decently in that wiki page, just haven't needed to do it myself

dreamy thunder
#

how do i make localization work? it always says path not found

cerulean rose
#

whats your file structure

dreamy thunder
#

Main File
|-assets
|-localization
| |-en-us.lua
|-main.lua

#

i thought there was a problem with my code so i removed it entirely

cerulean rose
#

whats in your main.lua

dreamy thunder
#

wdym?

sick sparrow
#

how to add jokers in deck

cerulean rose
#

just do it

long sun
#

hihi! i'm back on the modding grind, and have two issues with two jokers to fix

#
  1. the Ghost Joker doesn't see Tarots that are being sold as not in your consumable slot, but i can't patch that by saying "subtract 1", because i can't know if the selling_card event is being called by another card, eg. Planet
sick sparrow
#

how to give specific card using create_card

long sun
#
  1. Identity doesn't show the message "Shattered!", even though the code i based it on, the Gros Michel, correctly says "Extinct!" and "Safe!" using the same method
dreamy thunder
long sun
#

though i can try to find an example of creating a specific kind

cerulean rose
#

use smods functions

dreamy thunder
cerulean rose
cerulean rose
dreamy thunder
long sun
#

ooh this is really helpful, thanks!!

#

keeping this open for future reference

cerulean rose
#

yeah fs smods docs have gotten way better lately

wet sand
#

ftr @ revo @ ghostsalt i can get messages to appear by doing

return {
    extra = {message = localize('k_upgrade_ex'), colour = G.C.MULT},
    colour = G.C.MULT,
    card = context.other_card
}
#

code copied straight from base game hiker with a few variables tweaked but it seems to work (although i imagine you probably want to change the message and card reference)

dreamy thunder
#

i'll try

long sun
#

ya i've tried that, but two things:

  1. i don't want to localise this yet
  2. the method i'm using works with Gros Michel and Cavendish
#

code-dump incoming ^^

wet sand
#

you dont have to localize

long sun
#
SMODS.Joker {
  key = 'identity',
  loc_txt = {
    name = 'Identity',
    text = {
      "Create a {C:spectral}Spectral{} card",
      "when {C:attention}Blind{} is selected",
      "{C:red,E:2}self destructs{}"
    }
  },
  rarity = 1,
  atlas = 'Phanta',
  pos = { x = 1, y = 0 },
  cost = 6,
  blueprint_compat = false,
  eternal_compat = false,
  calculate = function(self, card, context)
    if context.setting_blind and not context.repetition then
      G.E_MANAGER:add_event(Event({
        func = function()
          play_sound('glass' .. pseudorandom_element({'1', '2', '3', '4', '5', '6'}))
          play_sound('timpani')

          local newCard = create_card("Spectral", G.consumables, nil, nil, nil, nil)
          newCard:set_edition({
            negative = true,
          })
          newCard:add_to_deck()
          G.consumeables:emplace(newCard)

          card.T.r = -0.2
          card:juice_up(0.3, 0.4)
          card.states.drag.is = true
          card.children.center.pinch.x = true
          G.E_MANAGER:add_event(Event({
            trigger = 'after',
            delay = 0.3,
            blockable = false,
            func = function()
              G.jokers:remove_card(card)
              card:remove()
              card = nil
              return true;
            end
          }))
          return true
        end
      }))
      return {
        message = 'Shattered!'
      }
    end
  end
}```
wet sand
#

try doing extra = {message = 'Shattered!'} instead in the return?

#

if you look at my code the message is in an extra var

long sun
#

ooh true

#

will give that a go!

#

nope :<

wet sand
#

damn

#

you could just copy my code 1:1 and then change the message

tidal edge
#

anyone know if anything in game has ranbom ranks

#

im trynna make this

wet sand
#

& card location bc other_card probably crashes here

crisp coral
crisp coral
#

use card_eval_status_text function

long sun
#

ah ^^

sick sparrow
#

how to give specific card using create_card

wet sand
long sun
#

(it's funny that you're formatting that question like a google search :>)

crisp coral
#

the 7th parameter is forced_key, you can pass a card's key there

long sun
#

(ya :3)

#

(don't worry about it i was being silly)

crisp coral
#

oh yeah i forgot SMODS has a wrapper for create_card

#

oops

wet sand
#

how would i go about adding something to the description of playing cards (like the bonus chips of hiker)

long sun
wet sand
#

one of my jokers does something similar but with bonus mult and while mechanically the entire system works, i cant find a way to get it to actually display

long sun
#

just #1 to work on now

long sun
#

but that's from instinct

sick sparrow
dreamy thunder
sick sparrow
#

spamming nils until 7th parameter

crisp coral
frosty dock
wet sand
frosty dock
tidal edge
#

hey i think i fuck up on this, im trynna make a mail in rebate style walkie talkie

cerulean rose
#

@wet sand to do with your display issues, message goes in the main table, not an extra sub‐table

wet sand
#

i mean thats what it is in my code right now and it works /shrug

long sun
#

hmm, my variable isn't being set for some reason

#
SMODS.Joker {
  key = 'identity',
  loc_txt = {
    name = 'Identity',
    text = {
      "Create #1# {C:dark_edition}Negative{} {C:spectral}Spectral{}",
      "cards when {C:attention}Blind{} is selected",
      "{C:red,E:2}self destructs{}"
    }
  },
  config = { extra = { no_of_cards = 2 } },
  rarity = 1,
  atlas = 'Phanta',
  pos = { x = 1, y = 0 },
  cost = 8,
  loc_vars = function(self, info_queue, card)
    return { vars = { card.ability.extra.no_of_cards } }
  end,```even though i have this code that *should* set it
wet sand
wintry solar
#

card.ability.extra.no_of_cards

long sun
#

ah :P

#

thanks!!

#

ah phooey, same issue

tidal edge
#

i ont know whats goin worng

cerulean rose
#

you missing context checks

royal ridge
#

you're gonna want something like

if context.cardarea == G.play and context.individual then
#

also you're not returning anything, you're setting the global mult variable to 8

cerulean rose
royal ridge
long sun
#

ah oops my script doesn't say that, i edited it incorrectly

#

fixed

#

that's what my script currently says

cerulean rose
#

yeah looks good

tidal edge
royal ridge
#

yes

#

otherwise you're triggering every context and looking for an other_card

#

which may or may not exist

long sun
#

humhum, i don't quite get what's wrong with it

#

it looks like all the other Jokers with variables defined

tidal edge
#

or am i lobotomizing

long sun
#

hmm, maybe it's undefined when blind is selected?

royal ridge
long sun
#

i'm gonna change it to the end of the shop for now and see if that works

royal ridge
#

it looks stupid as hell but it's correct

long sun
#

it's what Perkeo does so i think it'd make more sense

tidal edge
royal ridge
#

as long as it's an entry in the return table you're good

tidal edge
long sun
#

ah that made a difference!

#

lesson learned: blind start abilities are weird

tidal edge
#

this is my stuff rn

long sun
#

oh. nevermind.

royal ridge
cerulean rose
#

self is the center here

royal ridge
#

yeah what they said

cerulean rose
#

*they

royal ridge
#

sorry

long sun
#

this is even weirder, the ability text works fine, but it still thinks it's nil

tidal edge
long sun
#

ah pfffft. nevermind, i'm a moron :)

#

there was another card.ability.extra. i was missing :>

tidal edge
#

OOOOH

#

i think i realise

wintry solar
#

self almost always refers to the prototype object in smods code, card refers to the actual card you are interacting with

tidal edge
#

now its angry at this

#

the shuffle_car

royal ridge
#

what does shuffle_card look like

long sun
#

perfecto, Identity works!! now to fix Ghost Joker

tidal edge
#

what o you mean what oes it LOOK like

#

it looks like text?

#

i screenshotte it right there

royal ridge
#

?

#

i have no idea what shuffle card actually is

#

this is just a reference to it

tidal edge
#

since this is called deck shuffle i made it shuffle_card

#

right

royal ridge
#

ye