#đŸ’»ăƒ»modding-dev

1 messages · Page 314 of 1

desert ore
#

yeah I used " % " and it's just completely incompatible with decimals I think

tall wharf
#

just round it down

#

tbh

ruby delta
#

Can anyone help me in turning Toml lovely patches into Smods
it's basically balance changes, the issue is that the game.toml and card.toml are not working with Steammods so I thought if there is way to create a steammodded mod that just changes the in game values

desert ore
#

really off edge case anyhow

tall wharf
#

god fucking damn it

#

😭

#

just added another one

hard needle
tall wharf
#

i swear to god

hard needle
#

wait but

#

oh if you play a five of a kind 💀

tall wharf
#

flush five is better in this case

hard needle
#

what poker hand has 5 words in it

wintry solar
hard needle
#

oh none

tall wharf
#

nah i can't animate fire for SHIT

unborn bay
#

not even 'The Entire Fucking Deck' has five words

tall wharf
wintry solar
#

Do you have a version without the shine?

tall wharf
#

i have shine as a layer

wintry solar
#

I think the fire looks okay but either way the shine swipe it gets too messy to properly track

tall wharf
#

fair

hard needle
#

buy me aseprite bro

#

💀 😭

tall wharf
#

😭

#

im going to the arcade fuck this

hard needle
tall wharf
#

i have most things as layers

desert ore
# tall wharf just round it down

got the edge case fixed, thanks for bringing that up! funny I had to also add absolute value since math.floor doesn't work with negatives for whatever reason

tall wharf
#

you know i always say my mod isn't blinds mod

unborn bay
#

now it definitely is

#

when is chess deck coming out btw

tall wharf
#

never

unborn bay
#

â˜č

tall wharf
#

I'm adding Partial Deck next

#

you start with uhm

#

104 cards

#

yeah

#

uhm

#

uhhhh

unborn bay
#

xxl deck:

tall wharf
#

here's the twist

#

you start with only half the card

#

104 halves

#

to be precise

hard needle
#
calculate = function(self, card, context) 
        if context.setting_blind then
            G.GAME.blind.chips = G.GAME.blind.chips * 0.9
        end
    end

doesn't seem to do anything?

maiden river
hard needle
reef belfry
#

yeah the requirement

maiden river
#
Buff({
    key = "small_head",
    atlas = "othercards",
    pos = {x = 1, y = 0},
    use = function(self, card, area, copier)
        G.GAME.blind.chips = math.floor(G.GAME.blind.chips * 0.5)
        G.GAME.blind.chip_text = number_format(G.GAME.blind.chips)

        local chips_UI = G.hand_text_area.blind_chips
        G.FUNCS.blind_chip_UI_scale(G.hand_text_area.blind_chips)
        G.HUD_blind:recalculate()
        chips_UI:juice_up()

        play_sound("chips2")
    end,
    can_use = function(self, card) return G.GAME.blind.chips > 0 end
})
maiden river
hard needle
reef belfry
#

G.GAME.blind.chip_text = number_format(G.GAME.blind.chips)

hushed field
#

'is a multiple of 5' works best, I'd say

icy oak
#

whats the function to shuffle a table

desert ore
#

still unsure about capitalization of money, or if money should be c:attention instead

#

or if I need the word total

maiden river
#

Usually I use the dollar symbol

desert ore
#

well there's precedent with ox and wraith so I'm unsure

maiden phoenix
#

Eh I think it's fine imo

desert ore
#

I think this is good but I know base game is really specific with how it words things

maiden river
#

True

#

There are still discrepancies tho

#

Like how square joker doesn't have the + in front of how many chips it gives

desert ore
#

oh lol didn't know that

#

yeah there's still some oddities here and there

unborn bay
#

some mods don't give the attention color to the word Joker

#

some don't capitalize the word Joker

desert ore
#

I mean, there's still general rule it follows closely

#

really does not like the word the

#

"at end of round"

zealous glen
#

I don’t like “at end of round” so I word it differently

#

Although that might be a quirk of English syntax making it sound more natural than “When round ends”

#

Which is what I use

maiden phoenix
#

at round ending balatrojoker

desert ore
#

A goal of mine is to try and blend in with vanilla pretty seemlessly, but like yeah wording is a little dumb sometimes

#

raised fist description straight up lying

zealous glen
zealous glen
#

Even though it was 1-to-1 the same effect in vanilla

desert ore
#

it doesn't add it to mult, the card itself gives the mult

#

with how its worded the joker should give the mult

zealous glen
blissful lance
#

Hello, I'm trying to make a enhanced card that changes sprites each hand played, is there a way to dynamically change the sprite position in the atlas and update the sprite in game ?

zealous glen
#

which no one understood

zealous glen
#

Or how Aura does animated sprites

desert ore
#

dusk says "final hand of round" no?

#

and acrobat

zealous glen
#

“final hand of round” is different from “final poker hand of round”

onyx sonnet
#

As opposed to playing a hand with 0 hands remaining

zealous glen
#

Where is it used in vanilla?

desert ore
#

well that effect isn't something in vanilla so yeah you have privelege to word it better

onyx sonnet
#

Oh no I was trying to explain the difference

onyx sonnet
#

Burnt joker uses it tho I think, although it's on first discarded poker hand

desert ore
#

oh blue seal?

zealous glen
#

It is used in vanilla

onyx sonnet
#

Probably blue seal

#

Yeah

zealous glen
#

But no one understood it

#

So we changed it to “winning poker hand”

onyx sonnet
#

Balatro players are very against the idea of reading

onyx sonnet
zealous glen
#

Also

#

Thunk chose a terrible confusing template for it

desert ore
#

wait so vanilla blue seal is different to modded blue seal? because wording is not final hand of round

desert ore
zealous glen
#

Ah maybe I missed a “played” in there

#

But the difference is between “final hand of round” and “final poker hand of round” I think

wintry solar
#

The word played provides an awful lot of clarity to that phrase

#

Missing it out makes it more ambiguous

desert ore
#

is there a chance the wording has been changed since when you were doing your mod

hushed field
zealous glen
desert ore
#

ah, well it happens

zealous glen
#

I’d need to review the code to see how we had written it in

#

Either way I think “winning poker hand” is clearer

hushed field
#

also, I'd argue that the structure in blue seal is made of the units [final played] [poker [hand]] [of round], in which poker isn't actually interacting with 'final played X of round', but just with hand

limber blaze
zealous glen
limber blaze
#

there are probably a few very niche instances where hand and poker hand need to be seperate but they are usually used interchangeably

zealous glen
#

I’m not sure they are

#

I think the usage is deliberate

#

Even if the difference doesn’t come up with only vanilla mechanics

onyx sonnet
#

Joker that gives+1 hand but it actually adds a new poker hand

limber blaze
#

its deliberate but its a stylistic choice it will basically never actually be different

zealous glen
#

The elusive Straight Pair

wintry solar
#

Hand generally refers to all the cards played whilst poker hand generally is just the scored cards

zealous glen
limber blaze
#

well good thing the final product is here already

hushed field
#

what do you see as the difference, Victin? Because to me the use of poker hand there is just to refer to a named handtype

#

But maybe that's not consistently how it's used

zealous glen
#

A played hand can be or contain a poker hand

desert ore
#

flower pot contains "poker hand"

limber blaze
#

a played hand always contains a poker hand not can, secret hands count as just new poker hands

zealous glen
#

The scoring hand is the highest tier poker hand contained in the played hand

#

Well, “a highest tier”

desert ore
#

I think the game is just inconsistent

limber blaze
#

poker hand is for the most part a subset of hand since all hands are poker hands its just that there are a few instances where you might need to refer to the hand outside of poker hand stuff

#

unscoring related stuff is a good example where it makes no sense in the context of poker hands

#

but is perfectly fine with hands

#

since hands are a balatro thing and poker hands are a poker thing and unscoring means nothing outside of balatro

zealous glen
#

I do agree the wording is inconsistent which is part of my issue with it

#

I do prioritize clarity over accuracy though

limber blaze
#

you should just stick with whatever makes it easiest for players to understand in the case of it being inconsistent

hushed field
#

the issue is also that 'hand' refers to so many things in balatro if you don't clarify

#

you play a hand, which costs you a hand, using cards held in hand, but the played hand and the held hand are not the same hand.

limber blaze
#

me when mods use the phrase in hand without clarifying

#

this could mean literally 2 opposite things

zealous glen
#

I think some amount of consistency is necessary for clarity

hushed field
#

i think extreme inconsistency is the best approach

zealous glen
#

There’s a trap many trading card games fall into

hushed field
#

if i was thunk's publisher, i'd have forced him to have each word of a joker randomly change language every once in a while

zealous glen
#

Where they word “force a player to discard” as “must discard”

limber blaze
#

you should just do what tboi does and make players consult the wiki by having item descriptions be not what the item actually does at all

zealous glen
#

But they don’t use “must” anywhere else

#

Well, maybe it’s less specific and they just emphasize the forcefulness of it

#

But it seems to imply other effects aren’t forceful

hushed field
#

i still have some jokers with straight up wrong descriptions that I'm gonna fix right now before I forget again ❀

zealous glen
#

So you can just tell your opponent “no”

hard needle
#

"X2 Mult if played hand and [cards held in] hand don't contain any face cards"

#

how do i improve the wording of that

limber blaze
#

i mean tbf the isaac system isnt that bad outside of the fact that items have secret interactions that are really hard to discover

zealous glen
#

I’m not saying I necessarily like it, but I do think it’s “good design”

limber blaze
#

but making you discover and learn everything without just being told is pretty alright for new players

#

its just that it starts to becoming annoying when youre not new anymore

desert ore
limber blaze
#

you dont really have anything to learn but if you forget a specific interaction its time to consult the wiki

zealous glen
limber blaze
#

thats why a lot of people use external item descriptions though

#

"if there are no face cards on screen" is obviously the best wording

zealous glen
hard needle
limber blaze
#

im joking btw

#

if that wasnt obvious

hard needle
#

thats not horrible wording

zealous glen
#

MTG just did it

#

LoR had it first

hushed field
hushed field
zealous glen
#

/half-balatrojoker

hushed field
#

I've not played the game in a language that wasn't English so I'm not up to date, haha

shell timber
#

i just lovely patched jokerdisplay

hard needle
#

also why is perkeo's wording kinda weird

desert ore
hard needle
#

like why does it use the word possession

desert ore
#

but you could also turn it off at any time for stalling

#

if you wanted

zealous glen
#

I haven’t seen a single official translation be well-regarded

hushed field
#

fan translation has a lot of issues too, but as someone that's currently working in translation, the entire field is kinda fucked

zealous glen
hard needle
#

just write the cards in sign language

hushed field
#

A good friend of mine recently worked on a game translation (he does not know which one) and he learned that there were 7 middle men companies between him and the developer, meaning all communication about intent was functionally impossible

zealous glen
#

There was a popular meme translation of Chainsaw Man in Brazil that had some people harassing the official Brazilian VA because the official translation didn’t follow the meme translation

hushed field
#

I don't know which game it was, but there's a famous example of a shooter using the word for seashells constantly in Spanish, because the translators were never briefed on the genre of the game, and their assigned text never conveyed that the game was a shooter

zealous glen
hushed field
#

Manga/anime translation is a whole 'nother nightmare of a field, haha. Periods of really bad translation have poisoned a lot of the audiences to basically see 'translators' as people poisoning the original intent, not realizing how complex translation of creative works is

zealous glen
hushed field
#

I don't know how translation was set up for balatro, but it wouldn't surprise me if the publisher reached out to a translation agency and the agency outsourced to a bunch of different people without setting up a consistency briefing, or language intent document. That's how most bad translations for game/media stuff happen

zealous glen
#

Personally I prefer sticking to the original when possible, but there are awesome jobs at localization to adapt a work to local culture

zealous glen
#

Whatever the surfing penguin movie was called

hushed field
#

translation is a very scummy industry that needs highly specialed skill but pays minimum wage if you're lucky, so translators often don't have space to permit themselves room to double check things.

hushed field
zealous glen
#

But that’s because it needs to be officially authenticated too

zealous glen
hushed field
hushed field
hard needle
#

how do i get the amount of money the player has

hushed field
zealous glen
# hushed field no clue, hahaha

The Brazilian localization is well-regarded. Recently I watched a video of a VA and translator talking about how they flew people from all over the world to a meeting on how to adapt the movie. The protagonist’s hometown was “Shiverpool” in English, and they brought it up as an example of a hard pun to localize

hushed field
zealous glen
#

They came up with a suggestion on the spot that the other translators in the room loved

#

So I heard it was used in multiple adaptations

hard needle
#

i was thinking that it was that

#

but i thought it wasn't since i thought it would be called money and not dollars

zealous glen
#

The suggestion was “Frio de Janeiro” (like Rio de Janeiro but replacing “rio” with “frio”, “cold”)

desert ore
#

What is money buffer even for?

hushed field
#

puns are nightmares in translation. I follow the current manga translator for One Piece, and it's super interesting to see him discuss the difficulties and liberties of translating a lot of those concepts. The translation notes on Hunter X Hunter are also fascinating, because Hisoka often has just untranslatable dialogue due to the character's word play that's tied to the art

zealous glen
hushed field
# desert ore What is money buffer even for?

money is added in events, but events happen after previous events. That means you need to set a buffer so you can see what happens before the animation is triggered and the money is actually set

zealous glen
#

Because Balatro doesn’t separate the data from the UI much

desert ore
#

Wait a minute so I guess I completely misunderstood what like joker buffers and Consumable buffers were

hushed field
#

On an entirely different note than translation: I'm trying to see how far I can push boss blind design. I'm wondering whether boss blinds being able to apply 'lasting' effects is an interesting design space, or whether those are gonna be mostly frustrating

zealous glen
#

Those do the same thing but to the number of those cards in their respective areas

hard needle
#

how do i use create_card()?

zealous glen
#

I think they are fun

zealous glen
#

Or rather

#

SMODS.add_card

hard needle
#

?

hushed field
#

yes! It'll probably be on the utility page

hard needle
#

uhhhhhh i dont think it exists

#

ok nevermin

#

d

#

it is on the utility page

hushed field
#

I'm fixing up the art for my Wicked Witch of the West boss blind, who changes cards into a negative enchantment for X turns, and I'm thinking whether I want there to be other persistent debuffs a boss blind can give you. Only thing I'm thinking is that no debuff should be given to you if you can't avoid it by playing right. So no 'for the rest of the run, planets are x2 as expensive', but yes to 'if you play a hand with less than 1 unscored card, increase the price of all future planets by $1', or something. Though i'm still playing around with the exact details.

#

Your mod adds negative enhancements, right, Victin?

zealous glen
tall wharf
#

i wish i was better at making UI lol

hushed field
#

I'm poking around in that design space, but I'm considering that maybe I should make negative enhancements somewhat of a separate layer. Because a temporary debuff that kills a good enhancement's not fun

zealous glen
#

Making it the same layer allows Enhancements to clear the downside Enhancement

hushed field
#

I can see an argument for keeping them as one entity, I think it's really dependant on what kind of debuffs or punishments you're going for

zealous glen
hard needle
#

uhhh i dont think i used create_card right

hushed field
#

I'm considering something that 'poisons' a card, meaning you lose 1% of your scored chips or something, when it scores, or when it remains in hand, which i think is better as a separate sticker-esque implementation

hushed field
wintry solar
tall wharf
zealous glen
hard needle
#

SMODS.add_card({'Spectral', G.consumeables}) or SMODS.add_card('Spectral', G.consumeables)?

wintry solar
#

Neither

hard needle
#

wha

native zinc
#

neither

wintry solar
#

It takes a table of keys with values

hard needle
#

so {set="Spectral", area=G.consumeables}?

zealous glen
#

You might not need the area

#

But something like that should woke

native zinc
#

yeah area not needed

hard needle
#

what's the point of create_card 😭

native zinc
#

i mean it's fine

tall wharf
#

create a card

#

but not necessarily wanting to place it somewhere

native zinc
#

yeah i think cryptid crash uses it

#

great stuff

hushed field
zealous glen
#

Like Wheel of Fortune

hushed field
#

that's true, just depends on how mean the effect is supposed to be, i guess đŸ€”

glad osprey
#

hypothetically what if i wanted to completely rework how the probability system works

#

how would i do that

hushed field
#

depends on what you wanna change

glad osprey
#

so like

#

instead of it just being a number

#

i want it to instead be a list of modifiers that lead to the current value

hushed field
#

Could you give an example?

glad osprey
#

so likw

hushed field
#

I think I get you, but I'm not sure

glad osprey
#

instead of just 2 it would be

#

card a would increase the prob by one, then oops would double that

onyx sonnet
#

so you want additive bonuses to the probablity variable to be calculated before the multiplicative ones like oops?

hushed field
#

That's already doable, no? But I see what you mean, wanting to have a system that doesn't make you check every source consistently, to properly reset

glad osprey
dapper sun
#

how do i make a value change immediately based off a config setting change?

hushed field
hushed field
dapper sun
#

i don't mean the config variable itself

#

i mean for example a joker's sprite atlas position

hushed field
dapper sun
#

ok

glad osprey
#

only issue i have with the current system is that things like oops wouldnt like what i want to do \

dapper sun
#

prob when it's set but idk how i'd do that

hushed field
dapper sun
#

to toggle some jokers between alternate sprites when a config setting is enabled/disabled

faint yacht
#

On such thought, you'd probably want to add a function for such in something that executes every frame.

dapper sun
#

ok

#

how would i do that?

zealous glen
#

I disagree

#

You should only need to run a function when setting the config

hushed field
#

Only issue will be that it won't change when you change the setting mid run

faint yacht
#

...could you toggles and such actually execute a function when interacted?
-# I know nil about UI.

#

There's a func for when a node is drawn.

hushed field
#

They could

dapper sun
#

idea

#

what if i have a variable that will set itself to the config variable whenever it doesn't match

#

so that i can have things happen when the variable changes

#

idk

#

i think i'll just put the stuff in the calculate function instead to save me some effort

placid star
#

what would be th G.P_Centers for double tag?

red flower
maiden wraith
#

yo how does one change the sprite of a card dynamically????

zealous glen
#

Try checking Bunco’s tape or Aura

maiden wraith
#

already did

#

didn't quite help

#

(imma be honest a friend asked like a few hours ago but we're still stuck on that)

dapper sun
#

set_sprites(self, card, front)

maiden wraith
#

so it is that

dapper sun
maiden wraith
#

thx for telling us for parametters to input

#

ur the best, we should have looked harder

#

thx

#

wait-

dapper sun
#

i've been trying to do a similar thing, but with a config setting. my struggle has been trying to figure out where to put it

gilded narwhal
#

i'm just gonna ss the thing I sent in steamodded chat because I don't wanna flood the chat with a bunch of messages and I don't feel like typing it again

wintry solar
#

I believe telescope code is in the booster definitions in game_object.lua

gilded narwhal
#

In smods?

#

OH I SEE IT

#

Because you've overriden it already, me modifying the original does nothing

#

So to change that would I just call that take_ownership again in my own mod?

#

THAT WORKED

#

THANK YOU

dapper sun
#

how do i make this properly place the 3 elements vertically?

return {n = G.UIT.ROOT, config = {align = "cm", padding = 0.1, r = .1, emboss = 0.05, no_fill = true}, nodes = {
    {n = G.UIT.C, config = { no_fill = true }, nodes = {
        {n = G.UIT.T, config = { text = "hi chat", colour = G.C.UI.TEXT_LIGHT, scale = .5 }},
        create_toggle({
            ref_table = elle_config,
            ref_value = "silly_mode",
            label = "what."
        }),
        {n = G.UIT.T, config = { text = "hi again chat", colour = G.C.UI.TEXT_LIGHT, scale = .25 }}
    }}
}}```
red flower
#

separately

dapper sun
#

a

#

ok

sturdy compass
#

Silly mode?

dapper sun
#

changes some sprites and stuff :p

sturdy compass
#

Ah

hard needle
#

how do i change the cost of an item in the shop?

#

like i wanna iterate over all items in the shop and modify its cost

hushed field
#

there is a set_cost function, which recalculates an item's cost

blissful lance
#

is there a function called once when the card is loaded in ?

gilded narwhal
#

bump

hushed field
# gilded narwhal bump

not in base game, i think, but you could definitely set this up. I know N has individual joker rarity working in his mod

midnight coyote
#

i just broke 100 hours on this wretched game 😭

dapper sun
#

i'm still at 56 hours

vast flame
#

I wanna add cryptid, can you instruct me, its my first time modding balatro

#

Yes i have a pc

sturdy compass
broken rivet
#

does table.unpack() not exist for balatro???

#

because this crashed saying it tried to call a nil value "unpack"

local startRunVanilla = Game.start_run
function Game:start_run(...)
    startRunVanilla(self, table.unpack(arg))

    if G.P_BLINDS.bl_af_final_sword then
        G.P_BLINDS.bl_af_final_sword.mult = 0
    end
end
#

yep doesn't exist

#

that is. very annoying

midnight coyote
#

I MADE A PYTHON SCRIPT TO AUTOMATICALLY EXPORT MY SPRITESHEETS AND POPULATE THEM IN THE CORRECT FOLDERS

gilded narwhal
#

trying to add weights to planet cards lmao

midnight coyote
#

how do i grab the current mult

#

when scoring

faint yacht
#

hand_chips and mult are globals.

midnight coyote
#

oh alr

#

didnt know

#

im making a joker that's exponential

sturdy compass
dapper sun
#

how do i center text in ui?

broken rivet
#

is it possible to add save data? i need to make sure a blind's mult value is stored in the player's save data else the blind's gimmick can be cheesed by restarting the game

this is the code for what i'm doing btw

---=== in overrides.lua ===---
-- Also resets Sapphire Sword mult
local resetBlindsVanilla = reset_blinds
function reset_blinds()
    print("reset blinds")

    if G.GAME.round_resets.blind_states.Boss == "Defeated" then
        if G.P_BLINDS.bl_af_final_sword then
            G.P_BLINDS.bl_af_final_sword.mult = 2
        end
    end

    resetBlindsVanilla()
end

-- Updates Sapphire Sword's mult
local blindPressPlay = Blind.press_play
function Blind:press_play(...)
    print("Updated hand")

    if G.P_BLINDS.bl_af_final_sword and ((not G.GAME.blind.boss) or G.GAME.blind.boss ~= {}) then
        G.P_BLINDS.bl_af_final_sword.mult = G.P_BLINDS.bl_af_final_sword.mult + 0.5
    end

    blindPressPlay(self, ...)
end

---=== final_sword.lua ===---
return {
    name = "af_final_sword",
    key = "final_sword",
    
    atlas = "chips_atlas",
    pos = {x = 0, y = 0},

    dollars = 8,
    boss = {
        min = 8,
        max = 10, -- does nothing
        showdown = true
    },
    boss_colour = HEX("CC7722"),
    discovered = true,

    mult = 2,

    defeat = function(self)
        self.mult = 2
    end,

    -- this is just stolen from cryptid
    disable = function(self, silent)
        G.GAME.blind.chips = get_blind_amount(G.GAME.round_resets.ante) * G.GAME.starting_params.ante_scaling * 2
        G.GAME.blind.chip_text = number_format(G.GAME.blind.chips)
    end
}
zealous glen
midnight coyote
wind steppe
#

why does this crash? it says there's an unexpected symbol on the last line

SMODS.Joker{ -- Orange Card implementation
    key = 'Orange Card',
    loc_txt = {
        name = 'Orange Card',
        text = {
            'This Joker gains {X:mult,C:white}+X#1#{} Mult',
            'when any {C:attention}Booster Pack{} is skipped.',
            '{C:red}Works once per shop{}',
            '{C:inactive}(Currently {}{X:mult,C:white}+X#2#{} {C:inactive}Mult and #3#){}'
        }
    },
    atlas = 'Jokers',
    pos = {x = 1, y = 0},
    config = { extra = {
        xmult_gain = 0.1,
        xmult = 1,
        is_active = true,
        active_msg = "Active"
    }
    },
    rarity = 1,
    blueprint_compat = true,
    loc_vars = function(self,info_queue,card)
        return {vars = {card.ability.extra.xmult_gain, card.ability.extra.xmult, card.ability.extra.active_msg}}
    end,
    calculate = function(self,card,context)
        if context.skipping_booster and not context.blueprint and card.ability.extra.is_active then -- Booster Pack is skipped, deactivate the Joker and increase the XMult
            card.ability.extra.is_active = false
            card.ability.extra.active_msg = "Inactive"
            card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.xmult_gain
            return {
                message = 'Upgrade!',
                colour = G.C.ATTENTION
            }
        elseif context.ending_shop then -- Reactivate the Joker
            if not card.ability.extra.is_active then
                card.ability.extra.is_active = true
                card.ability.extra.active_msg = "Active"
                return {
                    message = 'Reactivated!',
                    colour = G.C.ATTENTION
                }
        elseif context.joker_main then
            return {
                xmult = card.ability.extra.xmult
            }
        end
    end
midnight coyote
#

because the cli lets you set scale

#

for spritesheets

#

which the gui, conversely, does not let you do

broken rivet
#

seems like you forgot the joker closing bracket

midnight coyote
#

i don’t see a gray aura ever though

zealous glen
wind steppe
zealous glen
#

I think if the sprite doesn’t have a grey border it’s more apparent

wind steppe
#

end part looks like this:

#
        end
    end
}
zealous glen
#

It’s because Love uses color info of transparent pixels

#

But Aseprite automatically sets them to black I believe

#

Firch had a script to fix it

midnight coyote
#

hm

zealous glen
#

Python script

midnight coyote
#

i just made my script because i was getting tired of manually exporting and moving everything

#

so i’m just gonna make a script that triggers on git commit

broken rivet
midnight coyote
#

so that way every time i make and commit a change it moves it around

zealous glen
midnight coyote
#

or fork it in somehow

#

my script isn’t very repo agnostic though

#

it’s built to work with my file setup

#

and mine only

#

and i intend to keep it that way

maiden wraith
#

so my friend and i tried making "stone" cards

#

basically a variant

hard needle
#

how do you destroy a card 😅

maiden wraith
#

but when we made the cards have no suit and no rank, it didn't quite work...

#

the rank is still visible when using the tarot...

#

And when you hover it still has a rank etc

#

I'm wondering how do u properly make them have no rank and suit?

dapper sun
#

maybe look at vanilla code and see how stone cards work?

wintry solar
#

Add no_rank = true to your enhancement definition

#

And no_suit = true

maiden wraith
#

we did

#

but it didn't seem to do enough

wintry solar
#

And probably replace_base_card = true too

maiden wraith
#

Thank you so much

#

<3 <3 <3

#

we spend like 3 hours tryinh to find work arounds X)

wind steppe
broken rivet
#

ohhhhh wait

#

i missed where the end should go

#
if not card.ability.extra.is_active then
                card.ability.extra.is_active = true
                card.ability.extra.active_msg = "Active"
                return {
                    message = 'Reactivated!',
                    colour = G.C.ATTENTION
                }

this part was missing it, not the calculate function

#

my bad

wind steppe
#

ty that worked

runic pecan
#

Randomly dropping my latest creation in this channel:

hard needle
runic pecan
midnight coyote
#

would retriggering a random played card twice be balanced

#

or should i do thrice so theres incentive to use it over chad

broken rivet
runic pecan
midnight coyote
#

i wanna make something

hard needle
#

that isnt really that good

#

unless ur playing high card or something

broken rivet
#

so this works now

midnight coyote
#

retrigger 2 random cards twice?

blissful lance
#

Hi, is there a function that I can use whenever a card is displayed in the full deck ? Because I'm making a dynamically changing sprite and it doesn't update in in there

gilded narwhal
#

how do I do cross-mod compat stuff? like if x mod is active then do y

zealous glen
thick panther
tall wharf
#

chat how do i get the poker hand that's the one displayed

#

from context ofc

maiden wraith
#

always_scores doesn't seem to work, at all?

#

Is there something else to activate?

#

or are we just BAD at the game

wintry solar
#

Show the code

zealous glen
tall wharf
#

my pc was shut down by my 3ds falling on the power switch

maiden wraith
# wintry solar Show the code
SMODS.Enhancement
{
  name = "ice",
  key = "ice",
  config = {
    h_c_mult = 1.25,
    extra={
      mult = 1.25,
      maxRounds = 3,
      currentRounds = 0
    }
  },
  no_rank = true,
  no_suit = true,
  replace_base_card = true,
  always_score = true,
  pos = {x = 0, y = 0},
  loc_vars = function(self, info_queue, card)
    local card_ability = card and card.ability or self.config
    return {
        vars = { card_ability.extra.mult, card_ability.extra.maxRounds, card_ability.extra.currentRounds}
    }
  end,
  update = function(self, card, dt)
      local card_ability = card and card.ability or self.config
      card.children.center:set_sprite_pos({x = 0, y = card_ability.extra.currentRounds})
  end,
  calculate = function(self, card, context)

    local card_ability = card and card.ability or self.config
    if context.final_scoring_step then
      return {x_chips = 1.25}
    end
    if context.main_scoring and context.cardarea == G.play then
      return{chips = 50}
    end
    if context.destroy_card then
      juice_card(card)
      G.E_MANAGER:add_event(Event({
        trigger = 'after',
        delay = 0.5,
        func = function()
          card_ability.extra.currentRounds = card_ability.extra.currentRounds + 1
          card.children.center:set_sprite_pos({x = 0, y = card_ability.extra.currentRounds})
          if card_ability.extra.currentRounds == card_ability.extra.maxRounds then
            card:shatter()
          end
            return true end }))
      return
    end
  end,
  discovered = true,
  atlas = "enhancements"
}
#

sorry if the code doesn't look great

#

first time with my friend and I

wintry solar
#

always_scores

#

Missing an s

maiden wraith
#

oh my fucking god

#

i'm so sorry to have bothered you for THAT

#

thx

marble flint
maiden wraith
#

<3

tall wharf
midnight coyote
#

strike: Curse your hand, earn $50

zealous glen
#

scoring_hand maybe? scoring_name?

wintry solar
#

scoring name is correct

hard needle
tall wharf
#

ah

#

thank

#

i forgot that was a thing and i kept searching for poker hands

#

is the scoring name a key

pulsar flower
tall wharf
#

i'd assume it's a poker hand key

#

with prefix and allat

zealous glen
#

with spaces and all that

thick panther
#

How do I get the current score and blind's required score?

tall wharf
#

i mean

#

localization issue...

#

i guess i am making it the base mult

#

đŸ”„

broken rivet
#

well this broke every joker rather than triggering matador

-- Solely responsible for making Sapphire Sword trigger Matador.
local calcJokerVanilla = Card.calculate_joker
function Card:calculate_joker(...)
    -- get context arg
    local args = {...}
    local context = args[1]

    if context.cardarea == G.play
        and context.after 
        and self.ability.name == 'Matador'
        and G.GAME.round_resets.blind_choices.Boss.name == "Sapphire Sword"
    then 
        ease_dollars(self.ability.extra)
        G.GAME.dollar_buffer = (G.GAME.dollar_buffer or 0) + self.ability.extra
        G.E_MANAGER:add_event(Event({func = (function() G.GAME.dollar_buffer = 0; return true end)}))
        return {
            message = localize('$')..self.ability.extra,
            dollars = self.ability.extra,
            colour = G.C.MONEY
        }
    end

    calcJokerVanilla(self, ...)
end
#

no joker effect is triggered with very few exceptions

#

like burnt joker still triggers

gusty peak
#

you didnt return original function result

broken rivet
#

oh

#

oop

hard needle
#
if context.cardarea == G.play and context.individual and context.other_card:is_face() and SMODS.in_scoring(context.other_card, context.scoring_hand) then
            context.other_card:start_dissolve({G.C.ORANGE}, true)
        end

this doesn't individually destroy the cards, it destroys them all at once D: how do i fix this

gusty peak
#

put it into an Event

heavy hare
#

i'm getting this error: msg = string: "engine/node.lua:270: attempt to index field 'h_popup_config' (a boolean value)"

and it's coming from this

blind_sprite.config.h_popup_config = {
align = 'cl',
offset = { x = -0.1, y = 0 },
parent = blind_sprite
} -- blind sprite is an AnimatedSprite
#

what does this mean

hard needle
#

@gusty peak like this?

#
if context.cardarea == G.play and context.individual and context.other_card:is_face() and SMODS.in_scoring(context.other_card, context.scoring_hand) then
            G.E_MANAGER:add_event({
                trigger='after',
                delay=0.1,
                func = function()
                    context.other_card:start_dissolve({G.C.ORANGE}, true)
                    return true
                end,
                blocking=true
            })

        end
gusty peak
#

i think blocking should do it, try it

tall wharf
#

why is this not working

gusty peak
gusty peak
hard needle
gusty peak
heavy hare
hard needle
tall wharf
gusty peak
#

wha?

tall wharf
#

i think returning dollars is better solution for calculations

icy oak
#

are the stuff inside the brackets in the example just to fill space or do they mean something

#

this is from the wiki for contexts

tall wharf
icy oak
#

soo the G.jokers and G.play.cards?

gusty peak
#

does dollars do anything for blinds tho?

icy oak
#

or context dot the stuff on the left

gusty peak
#

api doesnt even say there calculate for blinds

red flower
#

it's new it's still not documented

wintry solar
hard needle
# gusty peak its `Event({}) not just {}
if context.cardarea == G.play and context.individual and context.other_card:is_face() and SMODS.in_scoring(context.other_card, context.scoring_hand) then
            print("I should be destroyed")
            m = context.other_card
            G.E_MANAGER:add_event(Event({
                trigger='after',
                delay=0.1,
                func = function()
                    m:start_dissolve({G.C.ORANGE}, true)
                    return true
                end,
                blocking=true
            }))

        end

it only destroys 1 card ruefjdhgfbg

icy oak
#

oh ic

gusty peak
#

if its not you should put local before it

hard needle
gusty peak
#

it will

#

its called a closure

hard needle
#

ok thank you it finally works ahrfbejfhnsb

bright axle
#

what are the keys to generate planet cards?

rugged pier
#

bump

gusty peak
#

what are quantum enhancements?

#

that doesnt sound vanilla

gusty peak
hushed field
# rugged pier bump

Quantum enhancements allow a joker to have the effect of 'three random cards held in hand count as gold cards', or 'steel cards also count as wild cards'. You do this by passing the desired enhancement's key during the specific context that's set up for it, iirc (I'm not sure on the details but I can check in a few minutes).

rugged pier
hushed field
#

Buuut, I'm not sure what the current state of 'm is. They're finicky because the vanilla Balatro implementation of enhancements basically makes it impossible to check for suit or rank during quantum enhancement checks. I haven't tried to set it up since last month, but it gave me a lot of very hard to trace bugs. I think Cryptid's got a branch set up for their own implementation because of similar reasons

#

But I'm not sure if that's a valid warning still

rugged pier
#

i just need any unenhanced card to give a random enhancement

#

so i dont need to check for suit or ranks

bright axle
# gusty peak c_<planet_card_name>

so if i want to creata planet hand basedd on played hand whould this work as a dict?
local hand_type_map = {
['High Card'] = 'c_pluto',
['Pair'] = 'c_mercury',
['Two Pair'] = 'c_uranus',
['Three of a Kind'] = 'c_venus',
['Straight'] = 'c_saturn',
['Flush'] = 'c_jupiter',
['Full House'] = 'c_earth',
['Four of a Kind'] = 'c_mars',
['Straight Flush'] = 'c_neptune',
['Flush House'] = 'c_ceres',
['Five of a Kind'] = 'c_planet_x'
}

shell timber
#

check how blue seal does it

gusty peak
thick panther
#

I need the chipsAdd and multAdd variables to be updated before the return statement. Currently, they are getting updated, but the return statuement is using the old values (before calculation). How do I fix that?

if context.joker_main and not context.blueprint then

            G.E_MANAGER:add_event(Event({
                func = function ()
               
                    -- Calculate chips
                    local remainingScore = G.GAME.blind.chips - G.GAME.chips

                    -- Ensure score is not negative
                    if remainingScore < 0 then remainingScore = 0 end

                    card.ability.extra.chipsAdd = card.ability.extra.chipsAdd + remainingScore * (card.ability.extra.chipPerc / 100)

                    -- Calculate mult
                    card.ability.extra.multAdd = card.ability.extra.multAdd + 
                    ((G.GAME.current_round.hands_played + G.GAME.current_round.discards_used) / card.ability.extra.multDiv)

                    return true
                end
            }))

            return {
                card = card,
                chips = card.ability.extra.chipsAdd,
                mult = card.ability.extra.multAdd
            }

        end
bright axle
hushed field
bright axle
crystal perch
#

it's in card.lua of balatro itself

hushed field
crystal perch
#

it sets _planet to the planet card corresponding to your most played hand then creates it with card = create_card("Planet", G.pack_cards, nil, nil, true, true, _planet, 'pl1')

#

if you want to get it directly you'd have to use emplace_card

rugged pier
#

for the purposes of a stone card im assuming?

gusty peak
#
local planet = nil
for k, v in pairs(G.P_CENTER_POOLS.Planet) do
  if v.config.hand_type == hand then
    planet = v.key
  end
end

_card = {set = "Planet", area = G.pack_cards, skip_materialize = true, soulable = true, key = _planet, key_append = "pl1"}

found this in SMODS code

hushed field
crystal perch
#

i have an issue of my own i need some help with, trying to make these enchanced cards have a chance to destroy themselves and as you can see from the video the code for the message "Extinguished!" does trigger but not the destroy function

tall wharf
gusty peak
#

when chance procked

primal robin
hushed field
crystal perch
hushed field
#

There is a destroy context specifically for destroying cards that'll make sure cards are properly destroyed. Using start_dissolve will create ghost entries in G.playing_cards

crystal perch
#

yeah i'm looking in the game code, specifically Sixth Sense, and it looks like it just calls context.destroying_card

maiden wraith
#

is there a way to detect if the player got $ other than checking every frame? crying

#

trying to make something that activates each time you get $$$

hushed field
maiden wraith
#

smart

#

had no idea you could hook stuff

blissful lance
dapper sun
#

how do i make my joker's probability in the description change based on if it's rigged, without making the mod require cryptid??

maiden wraith
#

life saver

hushed field
maiden wraith
#

we love u

hushed field
crystal perch
hushed field
crystal perch
hushed field
#

I think all you're doing wrong is not returning 'remove = true'

rugged pier
#

@hushed field have you used quantum enhancements in any of your jokers

hushed field
#

I'd also personally recommend swapping the order of the random check and the context check if statements

hushed field
crystal perch
crystal perch
#

for playing cards at least i have to see if that happens with jokers now

hushed field
crystal perch
#

yeah that's the thing

#

testing it now

#

ok the jokers just don't retrigger at all so gotta fix that

hushed field
crystal perch
#

stole it from steamodded and flipped some values around

#

ideally it'd actually look like the card was on fire but idk anything about shaders lol

midnight coyote
#

what are the blind sprite dimensions

hushed field
midnight coyote
hushed field
#

No clue! Sorry

crystal perch
#

here's all the blinds if you want

#

you should be able to get away with any resolution so long as it follows something like this atlas

#

(and has a 1x & 2x ofc)

hushed field
#

i wish i'd been smart and just opted for symbols for blinds like vanilla, damn

maiden wraith
# hushed field Hook ease_dollars

Our idea was that a voucher would add +$1 to EVERY source of income. So, could we technically "replace" the function ease_dollars with an exact copy but a constant +1 to the amount? I'm basically asking if that's a good idea or if we should pivot to another option.

hushed field
#

but basically, I'd just set up a hook that checks for the voucher, if it's present and the mod is positive, increase it by 1, then just call the base func

maiden wraith
#

Much better than ours X)

#

Thx a lot

hushed field
#

Only issue this will create is that I don't think the additional money will be accounted for in any buffers đŸ€”

midnight coyote
#

i made a script that automatically exports my .aseprite files

#

does anyone want it

#

to kind of modify to work with their thing

hushed field
blissful lance
hushed field
#

I still need to set aseprite up to deal with this alpha/colour issue

maiden wraith
midnight coyote
#

it scans for every .aseprite file and goes down the list

hushed field
# maiden wraith tutorials weren't very, tutorial-ly
Klei Entertainment Forums

In LUA, it is a very important concept to understand that everything is a variable and all variables may be edited in runtime. This includes functions. With modding other peoples' LUA files, like Klei's basegame code, you may find yourself wanting to run your code before or after the original fun...

maiden wraith
#

<3 <3

zealous glen
#

How do I make a context such that a calculate function can manipulate the context that is passed onwards?

midnight coyote
#

until it's exported each one in 1x and 2x

zealous glen
hushed field
midnight coyote
#

it has to be in a very certain way to work right

hushed field
zealous glen
midnight coyote
#

additionally, this script only works for unix based operating systems

zealous glen
#

Script that only works for universe-based universes

#

So if you're in another universe it doesn't work

hushed field
zealous glen
#

I think

midnight coyote
#

showdown blind idea: curses every card played

rugged pier
#

from what i have, no mods are using quantum enhancements 😔

rugged pier
midnight coyote
zealous glen
midnight coyote
#

was thinking that

zealous glen
#

since it's when th game ends

midnight coyote
#

on an 8 ante run

#

yeah

steady smelt
#

how do i change the center sprite of a base game enhancement? through mods not just replacing the sprite sheet
and i can't use a texture pack or anything, i have a function for it to dynamically change

midnight coyote
#

ill make it a regular boss blind

#

its a fucking evil boss blind

#

but itll be fun to work with

crystal perch
#

debuffs highest played hand

midnight coyote
#

what about a boss blind that debuffs enhanced cards

zealous glen
#

It's not f*cking evil

#

It's just normal

midnight coyote
#

i call it evil because i would dread it's existence

#

because it pretty much seals the fate of cards you play

#

and goes over any enhancements

crystal perch
#

it's only bad if you heavily rely on a few cards in particular

#

the worst part is they don't remove themselves from the deck when debuffed

midnight coyote
#

its supposed to make dead weight

zealous glen
#

when The Rock

midnight coyote
#

think imma call the blind 'The Eye'

#

ill make the ID like 'eye_astropulvis' so it doesnt intersect with any other 'The Eye's

#

because i feel like there would be multiple

steady smelt
#

the eye exists in base game

midnight coyote
#

oh

#

nvm then

#

fuck

steady smelt
#

it's no repeat hand types

midnight coyote
#

oh right

zealous glen
midnight coyote
#

what would work instead

midnight coyote
#

what if i called it 'The Seer'

zealous glen
midnight coyote
#

a seer is a person who is believed to see into the future

#

and cursed cards dont activate, until the future

#

it works

maiden wraith
#
hook = ease_dollars,
  ease_dollars = function(mod, instant)
    local card_ability = card and card.ability or self.config
    if(card_ability.extra.isRedeemed) then
      local out = ease_dollars(mod, instant)
      print("hook called")
      return out
    end
  end,
#

why is the hook not hooking crying

tall wharf
#

right this is also

midnight coyote
#

well i’m still doing it

hushed field
maiden wraith
#

thx you

#

we love u

tall wharf
#

i should make the blind say nope when it's trying to be debuffed

zinc forum
#

Ok so, anyone knows how the draw(self, card, layer) function of SMODS.Joker works? I have a very silly Joker idea that would need to be aligned to the bottom and not centered

#

(Or if anyone knows of a mod using it so I can look at the code)

midnight coyote
#

well cursed cards have some value to be kept because certain things can ‘purify’ them, giving them amazing new stats

gusty iron
#

is there anyway to dynamically change a joker's sprite?

midnight coyote
#

basically steel, mult, and bonus all at once

zinc forum
zinc forum
#

Wait hold up it might be for the soul x)

gusty iron
#

sob emoji

zinc forum
#

card.center:set_sprite_pos should be it

faint yacht
#

card.children.center:set_sprite_pos({x = <xpos>, y = <ypos>}) for changing the base appearance of the Joker.

tall wharf
maiden wraith
sturdy compass
#

hook location really shouldn't matter

faint yacht
gusty iron
tall wharf
#

/shrug

violet oasis
#

Does the order I patch things in matter? I noticed sometimes I can't patch in simple things like a colour change for a UI element like the reroll button or the play hand button and I can't figure out why.

#

The log doesn't mention the pattern not being found and if I remove it, the total patches done to the file decreases, so I know it's been patched correctly

#

Like for instance, this one:

#
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = '''local play_button = {n=G.UIT.C, config={id = 'play_button', align = "tm", minw = 2.5, padding = 0.3, r = 0.1, hover = true, colour = G.C.BLUE, button = "play_cards_from_highlighted", one_press = true, shadow = true, func = 'can_play'}, nodes={'''
position = "at"
payload = '''local play_button = {n=G.UIT.C, config={id = 'play_button', align = "tm", minw = 2.5, padding = 0.3, r = 0.1, hover = true, colour = G.C.RED, button = "play_cards_from_highlighted", one_press = true, shadow = true, func = 'can_play'}, nodes={'''
match_indent = true```
midnight coyote
#

whats the context for held in hand

faint yacht
#

Card held in held abilities?

#

if context.cardarea == G.hand and context.other_card

midnight coyote
#

yeah

#

alright, cool

#

im making something that can do things if it's held in hand and if it's played

gilded narwhal
#

uncommon or common?

#

Disables the boss blind and gives X10 Mult on finishers but is otherwise very weak

faint yacht
#

Disabling boss blinds is already done as Legendary by Chicot... the X10 Mult makes more sense for Boss Blinds.

gilded narwhal
#

I mean this is specifically for the ante 8 boss blind tho

midnight coyote
faint yacht
#

-# Bizarre.

midnight coyote
#

made it work

#

it needs to be

#

if context.main_scoring and context.cardarea == G.hand

tired marsh
#

does anybody know why i keep getting this crash?

#

using card.ability.extra.pinata just doesn't work for me, and neither does card.ability.extra

#

i'm confused what i'm doing wrong as i've cross referenced a lot of different code from ppl with similar issues

#

ik i shouldn't rlly assign card.ability.extra.pinata at 27 but if i don't the code at 36 says i'm trying to compare zero to a 'nil' value, despite the fact that pinata is set to 1

tired marsh
#

i did not

#

is it initialized once the joker is created?

tall wharf
#

are you using the same joker in the same run

tall wharf
tired marsh
#

alr, respawning the joker worked

#

tyvm, i felt like i was going insane lmao

zealous glen
#

I'd do Uncommon or Rare because I think this particular effect is boring enough it should be rarer, even if it's not that strong

tall wharf
midnight coyote
#

gains 0.1x mult for every cursed card in the deck

tall wharf
#

that looks cursed as hell

midnight coyote
#

i figured i would make a joker that could benefit from cursed cards

#

defo rare

tall wharf
#

can you purposefully get a cursed card

maiden phoenix
midnight coyote
midnight coyote
#

cursed cards are very rarely good things, but i figured it would be interesting to give it a shot

#

because, mult or not, they still disable themselves after a bit

#

lol i could make a voucher that curses a random card at the end of the round but it's level 2 version purifies every cursed card in your hand after you play a hand

#

or a random card at the end of the hand

#

what are the voucher dimensions

faint yacht
#

Same as most "cards", really - 71x95... but the actual voucher occupies 59x93.

midnight coyote
#

Divine Light

#

Brimstone

spring gyro
#

Hi

vast flame
#

I need some help here

spiral hawk
#

i don't know if this is already done tbh

midnight coyote
#

i wonder how hard it would be to mod in joker upgrades

#

like you can upgrade four fingers to three fingers

tall wharf
vast flame
#

Is anyone gonna help me here or what

spiral hawk
midnight coyote
#

if a condition is fulfilled

#

but have the different joker be inaccessible otherwise

maiden wraith
#

ez stuff but we can't seem to figure it out, how to set the mod icon?

faint yacht
#

SMODS.Atlas{key = "modicon", path = "modicon.png", px = 32, py = 32} should be enough.

maiden wraith
#

thanks

#

uh

#

and if it's not ;-;

#

wait

#

said nothing love u <3

maiden wraith
#

actually no

#

womp

#

doesn't work ;-;

faint yacht
#

What's the file name of the actual image you'd want to assign as the icon and is it at the root of assets/1x and assets/2x respectively?

maiden wraith
#

it is

#

and the file is called modicon.png

maiden wraith
faint yacht
#

Try different names for said file.

maiden wraith
#

we good chat

#

some obscure shit with visual code studio

spiral hawk
#

i don't know why i'm doing a joker based on cynthoni/sewerslvt's stuff

dapper sun
#

how do i check if a given joker's unlocked?

faint yacht
#

<card>.config.center.unlocked iirc.

dapper sun
#

ty

gusty iron
#

my planet cards are so fire đŸ”„

rugged pier
#

what is the variable to check for how many times a poker hand has been played

#

nvm got it

#

G.GAME.hands[context.scoring_name].played

golden elm
#

what does the odds value mean? is a higher odd harder to obtain?

faint yacht
#

Yes.

gusty iron
#

can someone tell me whats wrong with this code?

SMODS.Consumable{
    key = "c_quaoar",
    set = "Planet",
    loc_txt = "Quaoar",
    atlas = "Planets",
    pos = {x = 0, y = 0},
    cost = 3,
    pools = {
        ["Default"] = true,
        ["Planet"] = true
    },
    discovered = false,
    unlocked = true,
    config = {},
    use = function(self, card, area)
        -- Define behavior of the card here
    end,
    can_use = function(self, card)
        return true
    end,
    set_badges = function(self, card, badges)
        badges[#badges+1] = create_badge("Three Pair", G.C.BLUE, G.C.WHITE, 1.2)
    end
}

it says its trying to index "center"

bright axle
#

how do you test ur mods?

gusty iron
bright axle
#

i mean if you have a joker how do you force it to apear?

gusty peak
#

Theres DebugPlus mod

tall kestrel
#

You could make a custom deck or something no?

gusty peak
#

Thats overkill lmao

gusty iron
#

nevermind i fixed it

#

my loc_text was off

gusty peak
gusty iron
#

how would i make a planet card level up a hand?

faint yacht
#

function level_up_hand(card, hand, instant, amount)

gusty iron
#

do i put that inside of the use() function?

gusty iron
gusty peak
#

Wont play animation if true i think

gusty iron
#

oh

#

okay

faint yacht
#

ye.

gusty iron
#

my planet cards are so peak

gusty peak
#

Damn

gusty iron
#

so like

#

would the use function look like this

#
    use = function(self, card, area)
        level_up_hand(card, "Three Pair", false, 1)
    end,
#

or do i need to put the key

faint yacht
#

Ye.

midnight coyote
#

how would i potentially apply an enhancement to an entire hand

gusty iron
gusty peak
faint yacht
midnight coyote
#

i dont need a whole code block btw just some pointers could be helpfuk

#

i really only need to know how to grab the number of cards in hand

gusty peak
#
for i=1,#G.hand.cards do
  G.hand.cards[i]:...
end
gusty iron
midnight coyote
#

and then when a hand isnt in play will #G.hand.cards return 0 or nil

#

wait

#

dumb question

#

if its asking for the number of

#

itll return 0

faint yacht
# gusty iron

What's the exact line in your lovely/dump/functions/common_events.lua?

gusty iron
#

how do i access that

gusty peak
gusty iron
#

nvm

gusty iron
faint yacht
#

What's your mod prefix?

gusty iron
#

why?

faint yacht
#

You need to pass the key of the hand with the modprefix_ before it, as it is a modded one.

gusty peak
#

so "JSJ_threepair"

faint yacht
#

Ye.

midnight coyote
#

okay how do i add money

gusty peak
#

ease_dollars(amount)

gusty iron
#

okay peak

midnight coyote
#

alr

gusty iron
#

lets see if this workd

rugged pier
#
for k, v in ipairs(G.GAME.hands) do
                print(v)
            end
``` why is this not printing anything
faint yacht
#

pairs?

rugged pier
#

let me try

red flower
rugged pier
#

ah

gusty iron
#

small issue

rugged pier
#

(whats the difference)

red flower
#

ipairs is for an indexed table (array)

gusty peak
zealous glen
#

@red flower will you be adding Ravedactyl Elemental Hero Air Neos to Joyous Spring

rugged pier
gusty iron
#

also is Dwarf Planets a set or a pool

red flower
onyx sonnet
#

It's just a custom label, all the planet cards are part of the same set iirc

zealous glen
gusty iron
faint yacht
#

Do you want to replace the regular "Planet" text?

gusty peak
# gusty iron small issue
update_hand_text({ sound = "button", volume = 0.7, pitch = 0.8, delay = 0.3 }, {
  handname = localize("JCJ_threepair", "poker_hands"),
  chips = G.GAME.hands["JCJ_threepair"].chips,
  mult = G.GAME.hands["JCJ_threepair"].mult,
  level = G.GAME.hands["JCJ_threepair"].level,
})
level_up_hand(card, "JCJ_threepair", false, 1)
delay(0.1)
update_hand_text(
  { sound = "button", volume = 0.7, pitch = 1.1, delay = 0 },
  { mult = 0, chips = 0, handname = "", level = "" }
)
gusty iron
#

put that inside of the use function?

gusty peak
#

ye

gusty iron
#

also its JCJ

#

not JSJ

gusty peak
#

aight

faint yacht
#
set_badges = function(self, card, badges)
  badges[1] = create_badge(localize('k_your_string'), G.C.SECONDARY_SET.Planet, G.C.WHITE, 1.2 )
end
gusty peak
gusty iron
#

i should totally define it

#

dang

#

embed fail

#

there we go

gusty peak
#
function level_up_poker_hand(hand, amount)
  update_hand_text({ sound = "button", volume = 0.7, pitch = 0.8, delay = 0.3 }, {
    handname = localize(hand, "poker_hands"),
    chips = G.GAME.hands[hand].chips,
    mult = G.GAME.hands[hand].mult,
    level = G.GAME.hands[hand].level,
  })
  level_up_hand(card, hand, false, amount)
  delay(0.1)
  update_hand_text(
    { sound = "button", volume = 0.7, pitch = 1.1, delay = 0 },
    { mult = 0, chips = 0, handname = "", level = "" }
end
#

something like that

gusty peak
gusty iron
gusty peak
#

ye i just figured

faint yacht
#

Just keep in mind that other mods could influence the card selection limit, if Andrew Required is to go off by.

gusty iron
gusty peak
#

i was thinking about that, and maybe you should first check if another mod before you set the button function to "play_from_highlighted", like call the original functio first, and if not tehn do your check for andrew

#

so no compatibiity issues

gusty iron
#

so small issue

#

the text kinda

#

flickers?

red flower
#

I wouldn't worry about compatibility too much because smods is adding a way to change played hand size natively soon

tall kestrel
#

Jr what is the "Fuller house"?

gusty iron
tall kestrel
#

ok

gusty peak
gusty iron
gusty peak
#

is that handled

red flower
gusty iron
#

heres my entire use function:

use = function(self, card, area)
        level_up_hand(card, "JCJ_threepair", false, 1)
update_hand_text({ sound = "button", volume = 0.7, pitch = 0.8, delay = 0.3 }, {
            handname = "Three Pair",
            chips = G.GAME.hands["JCJ_threepair"].chips,
            mult = G.GAME.hands["JCJ_threepair"].mult,
            level = G.GAME.hands["JCJ_threepair"].level,
        })
        delay(0.1)
        update_hand_text(
            { sound = "button", volume = 0.7, pitch = 1.1, delay = 0 },
            { mult = 0, chips = 0, handname = "", level = "" }
        )
    end,
gusty peak
gusty peak
gusty iron
#

yeah i inda

#

figured

bright axle
gusty iron
#

also can i just get like

#

the description text of a planet

gusty peak
red flower
#

you should check for card.edition and card.edition.negative

#

edition could be nil

gusty peak
#

fair

runic pecan
#

Is it OK to use SMODS.has_enhancement(v, 'c_base') to check unenhanced card or do I need to do the whole v.config.center == G.P_CENTERS.c_base thing?

bright axle
#
-- Find consumable non-eternal and non-negative jokers (can consume legendaries)
for _, j in ipairs(G.jokers.cards) do
    if j ~= card and not j.ability.eternal and not ( j.edition and j.edition.negative ) then
        table.insert(valid_jokers, j)
    end
end

is this ok?

gusty peak
gusty iron
#

also making sure, the atlas pixel padding is 1 right

gilded narwhal
#

guys how would I use the config of another mod in my mod

#

Bc this doesn't work

gusty peak
gusty peak
gusty iron
faint yacht
gilded narwhal
#

I mean PB_UTIL seems to be a global

gusty iron
#

(lvl. X) Level up
[HAND]
+X Mult
+X Chips

faint yacht
#

SMODS.Mods["paperback"].config?

gusty iron
#

what would the base code be for that

gusty peak
#

thats what the update_hand_text does

red flower
gilded narwhal
#

oooohh its prolly that then

midnight coyote
#

can i have an enhancement do something if it's enhancement gets changed

gusty iron
midnight coyote
#

because i want cursed cards to refuse to be enhanced in any way other than being purified

#

if you try to enhance it in a different way it just debuffs itself

gusty peak
gusty iron
#

oh

#

what are the variables??

#

just loc_vars?

gusty peak
#

you define them in the config, and expose in loc_vars

#

actually

#

and #2, would be localize("JCJ_threepair", "poker_hands")

gusty iron
#

i dont have a localization table for it yet so

#

im just putting "Three Pair"

gusty peak
#

sure

dapper sun
#

how do i unlock a joker from another joker's actions?

faint yacht
# gusty peak those

Passing G.GAME.hands["JCJ_threepair"].level, G.GAME.hands["JCJ_threepair"].l_chips G.GAME.hands["JCJ_threepair"].l_mult through, though?

gusty iron
#

its saying GAME is nill

#

so like

#

what do i do :(

gusty peak
#

that doesnt make sense

#

show planet definition

gusty iron
#
SMODS.Consumable{
    key = "c_orcus",
    set = "Planet",
    loc_txt = {name = "Orcus", text = {"Yeah"}},
    atlas = "Planets",
    pos = {x = 0, y = 0},
    cost = 3,
    pools = {
        ["Default"] = true,
        ["Dwarf Planet"] = true
    },
    discovered = false,
    unlocked = true,
    config = {},
loc_vars = {
G.GAME.hands["JCJ_fullerhouse"].level,
G.GAME.hands["JCJ_fullerhouse"].l_mult,
G.GAME.hands["JCJ_fullerhouse"].l_chips
},
    use = function(self, card, area)
        update_hand_text({ sound = "button", volume = 0.7, pitch = 0.8, delay = 0.3 }, {
            handname = "Two Three",
            chips = G.GAME.hands["JCJ_twothree"].chips,
            mult = G.GAME.hands["JCJ_twothree"].mult,
            level = G.GAME.hands["JCJ_twothree"].level,
        })
        level_up_hand(card, "JCJ_twothree", false, 1)

        delay(0.1)
        update_hand_text(
            { sound = "button", volume = 0.7, pitch = 1.1, delay = 0 },
            { mult = 0, chips = 0, handname = "", level = "" }
        )
    end,
    can_use = function(self, card)
        return true
    end,
    set_badges = function(self, card, badges)
        badges[1] = create_badge("Dwarf Planet", G.C.BLUE, G.C.WHITE, 1.2)
    end
}
#

oh wait lemme fix my desc rq

#

just realized i put that in the wrong planet

#

imagine i put that in the fuller house planet okay

gusty peak
#
loc_vars = function(self, info_queue, card)
  return { vars = {  G.GAME.hands["JCJ_fullerhouse"].level, G.GAME.hands["JCJ_fullerhouse"].l_mult, G.GAME.hands["JCJ_fullerhouse"].l_chips} }
end
faint yacht
#

Don't forget that the 2nd arg is the "name" of the poker hand.

bright axle
#

to use a variable inside of config extra is card.ability.extra.variable?

gusty iron
#

i just predefined it in the description

#

JIPPIE

#

now i just need the uh

#

{V:1} table

steady smelt
#

is there any way to combine multiple images into one sprite in-code? not setting separate sprites but specifically only rendering one sprite that's composed of multiple things

bright axle
#

read the atlas config

#

you just set up the card size and the a grid of x and y is used to navigate it

gusty iron
#

for the levelling

steady smelt
faint yacht
#

If your "frames" are aligned on the atlas, you can change the currently shown "frame" on the fly by

card.children.center:set_sprite_pos({x = 0, y = 0}) -- for base card, change x and y accordingly.
card.children.floating_sprite:set_sprite_pos({x = 0, y = 0}) -- for floating sprite (or soul_pos) instead
steady smelt
#

that is also not what i asked