#💻・modding-dev

1 messages · Page 500 of 1

manic rune
#

unless its only that case when you are using ref_table and ref_value

wind steppe
#

that looks right

manic rune
#

since yggdrasil has something that changes the dynatext's color a lot

short girder
# wind steppe that looks right

i mean for me it does too but like im here wondering how i'd create multiple tables if, for example, the player played a different first card in their three of a kind

manic rune
#

isnt it SMODS.destroy_cards or am i wrong

short girder
#

actually thats really stupid

#

it fixes itself

#

nevermind

short girder
thorn furnace
manic rune
#

oh is it colours

thorn furnace
#

changing colours doesnt change it either KHD_TrunksWat

#

im gonna try colours + recalculate

manic rune
#

yeah its colours, crap

#

me when inconsistent namings

short girder
#
if context.scoring_name == 'Three Of A Kind' then
    local cardToDraw = context.scoring_hand[1]
    for k,v in pairs(G.discard.cards) do
        if cardToDraw == k then
            SMODS.calculate_context({ playing_card_added = true, cards = { cardToDraw } })
            table.insert(cardsCreated,cardToDraw)
        end
    end
end
if context.end_of_round then
    for i = 1, pairs(cardsCreated) do
        SMODS.destroy_cards(cardsCreated[i])
    end
end```
put this in your calculate code and tell me if it errors
short girder
#

if it does, send the error code

manic rune
#

oh but is this not in the ui code's func?

thorn furnace
manic rune
#

i mean, it looks like it fits in there me think

#

try it :3

thorn furnace
#

okii

sonic cedar
#

can someone tell me why this crashes the game for my tester?

it works just fine for me?

sonic cedar
manic rune
#

G.PROFILES... exists as nil at first

#

so you are doing nil + 1 there

sonic cedar
#

this was when they tried to use the devil

#

once

manic rune
#

. yeah, what i said, add a nil check

sonic cedar
manic rune
#

:3

#

read it again

#

carefully

short girder
thorn furnace
manic rune
manic rune
#

-# god its hard to help without being able to directly do stuff on my end to test

thorn furnace
short girder
#

let me create a joker and test it myself this dude is probably on mobile

manic rune
#

colours should be in object's table i think

sonic cedar
manic rune
#

no

sonic cedar
#

whar

thorn furnace
manic rune
#

G.PROFILES[G.SETTINGS.profile].hpfx_crimsonCount = G.PROFILES[G.SETTINGS.profile].hpfx_crimsonCount or 0

sonic cedar
thorn furnace
lucid owl
#

SMODS.current_mod.set_debuff can be used to prevent debuffs, right?

sonic cedar
#

hi dilly

#

hi trif

modern kindle
#

i have hopefully for the final time fixed that table overflow issue i was having earlier

lucid owl
#

hi

manic rune
thorn furnace
#

o

manic rune
#

{n = G.UIT.O, config = {object = DynaText({scale = 0.4, string = localize(G.GAME.ygg_chosen_skill_tree_sec or 'ygg_skill_tree_sec1'), maxw = 9, colours = { G.C.WHITE }, float = true, silent = true})}} }},

modern kindle
#

hi smt

modern kindle
lucid owl
# daring fern Yes.

thanks! so set that as a function somewhere and it'll modify how debuffs are calculated?

modern kindle
#

realized it was because i was pulling drive named every time calculate ran and adding it to the table

#

so now i cache them

#

and it seemed to work for a few antes

manic rune
#

im sleepy, just ignore ot

#

it*

sonic cedar
daring fern
turbid field
#

I played a 3OAK and it did nothing, then I played another and it crashed to this

short girder
#

can you send me line 48

#

actually you dont need to

#

for i = 1, #cardsCreated do

lucid owl
short girder
#

make this your for loop

lucid owl
#

yeah

#

because pairs() returns something entirely different and for loops go off of a number

short girder
#

yeah i forgot you dont need to reference the table in a one variable loop

manic rune
lucid owl
#

you haven't seen it used like that because ya can't

manic rune
#

yeah that, makes sense 😭

short girder
#

does anyone have the bugged seed for erratic deck

#

so i can draw three of a kinds every time

wind steppe
turbid field
manic rune
#

<@&1133519078540185692>

short girder
#

mods

#

god fucking damn it another one

turbid field
#

hacked account probably

lucid owl
#

nah just a spam bot

#

well actually yeah might be hacked

#

either way they're gone lol

short girder
#

alright so the joker is currently doing nothing

#

probably because it's not creating any cards

lucid owl
short girder
#

currently not creating any cards

jolly shadow
#

k is the key

#

cardToDraw == v

short girder
#

oh gotcha

red flower
lucid owl
# short girder

a good rule of thumb for when using for k, v in pairs() is that k = key and v = value (whatever object corresponds to the key)

short girder
lucid owl
#

k is gonna be a number with whatever index in the table it's at, v will be the actual object

#

(im pretty sure)

red flower
#

also you never want to do things outside of a strict context check, so you shouldnt use context.scoring_name without checking for a context first

short girder
#

yeah but thats like not the effect of that guy's joker

#

oh nevermind

red flower
# lucid owl wdym?

always check for one of the main contexts like before, after, joker_main, etc

lucid owl
lucid owl
#

i'm probably guilty of not doing that a few times

short girder
short girder
red flower
#

if that's the timing you want, yes

#

i haven't been following the convo to know what the effect is

short girder
#

draws the first scored card of a three of a kind again

#

im trying to circumvent drawing by creating that same card

red flower
#

you dont seem to be doing that in that code

short girder
#

oh

red flower
#

this is what I'm reading:
if hand is 3oak: check if any of the cards (it's actually the index but you already got corrected on that) in discard is the first card in played hand (which is never true because it hasn't been discarded yet in any scoring context) then emplace it in the played hand (without removing it from discard)

short girder
#

i was told by multiple sources that playing a card and discarding a card would put them in the same table (G.discard.cards)

red flower
#

yes, but they're not put there until after scoring, where context.scoring_hand doesn't exist

short girder
#

hold on i think certificate has what im looking for

#

nope, context is unique to first hand drawn

red flower
#

there's a context for before drawing the next hand, context.drawing_cards

short girder
#

i should use that

short girder
#

actually cant i call it in my config

red flower
# short girder actually cant i call it in my config

usually you save it to card.ability
but in this case I would save it to the playing card directly

in context.after you set context.scoring_hand[1].modprefix_card_to_draw = true

then in context.drawing_cards you loop through G.discard, draw that card and set that_card.modprefix_card_to_draw = nil

manic rune
#

hi N'

short girder
#
  G.play:emplace(nv_card_to_draw)
  table.remove(G.discard.cards,nv_card_to_draw) 
end```???
fringe mortar
#

Hello

solemn shuttle
#

say i have a consumable that wins the blind when you use it
[it does it by setting the chips count to the blind size if that matters but can only be used when actually in the blind ofc]

how do i get it to stop drawing other cards after the fact
it seems like setting G.STATE to G.STATES.HAND_PLAYED doesnt work either oddly enough

#

everything else works about it its just that that's a problem lol

short girder
#

this just does nothing

#

because it's nil

red flower
short girder
#

this helps so much dude

#

im pretty sure draw_card() isnt real

#

thats why im having to circumvent it

#

ykw lets go back to making copies of a card

lucid owl
red flower
lucid owl
#

draw_card() basically does the whole shabang automatically

solemn shuttle
short girder
#

OH MY GOD

modern kindle
lucid owl
#

it does everything for you essentially

short girder
#

yeah it does

#

okay now

solemn shuttle
thorn furnace
#

how does your code look 🙏
I can't get it to work

solemn shuttle
#

i initally had this as a joker whose effect triggered when sold and it worked fine there but i reworked it to be a consumable for context

#

im considering like

#

having it trigger a variable and maybe it's checked like in context.after but then i'd have to play a hand first and im tryna Not do that

modern kindle
thorn furnace
#

okii

chrome widget
#

@red flower Here, if this would benefit you at all:

    key = 'DARK_EDITION',
    prefix_config = false,
    colours = {HEX('99CC99'), HEX('CC9999'), HEX('66FF66')},
    cycle = (2 * math.pi),
    update = function (self, dt)
        self[1] = 0.6 + 0.2 * math.sin(G.TIMERS.REAL * 1.3)
        self[3] = 0.6 + 0.2 * (1 - math.sin(G.TIMERS.REAL * 1.3))
        self[2] = math.min(self[3], self[1])
        self[4] = 1
    end
})```
#

err I guess it's actually 2pi/1.3

#

either way the cycle value itself is unused in the function

sonic cedar
red flower
#

i think it's because using a consumable might be messing with the state

solemn shuttle
red flower
#

what about like this

solemn shuttle
#

oh shoot wait

solemn shuttle
#

-# yeah i think my problem was not knowing the proper G.STATE check that way there wouldn't be the conflict as you said

#

joy

quasi comet
#

how would you go about changing a sticker's spawn rate in the shop mid-run?

rapid stag
#

sanity check moment, context.consumeable.ability.type == 'Planet' is the right check for this, right? cirDerp

daring fern
#

ability.set not ability.type

rapid stag
#

ahhhhhhhh, set. was wondering why it looked wrong to me

subtle merlin
#

how would i be able to give a joker a perma bonus?

dreamy thunder
#

Idk what or where to patch though

#

:D

daring fern
subtle merlin
dreamy thunder
#

Patches are goated

#

Fym you dislike them

subtle merlin
subtle merlin
dreamy thunder
#

Just

#

Put the line

#

And put the payload

#

How is that confusing

subtle merlin
#

i needed help patching 3 lines

dreamy thunder
#

You cant patxh multiplr linrs

#

Iirc

subtle merlin
#

patching isnt the way for the idiotic

dreamy thunder
#

I cant even type holy shit

rapid stag
#

was something changed in steamodded in the past couple months about how joker sprites are set? something i wrote that i haven't touched for ages suddenly stopped working

subtle merlin
dreamy thunder
#

I cant even use a keyboard correctly

daring fern
red flower
dreamy thunder
red flower
#

yes

dreamy thunder
#

Damn

#

I didnt know that

#

It did not work when i tried 😔

#

Guess i did sm wrong

rapid stag
red flower
#

no idea

thorn furnace
#
if context.end_of_round and not context.game_over and context.individual then 
  if blind_completion_as_percentage >= 1 and G.GAME.current_round.hands_played == 1 then
    local shield_bonus = 5
    ALLOY.ease_shield(shield_bonus)
  end
end

not entirely sure why but this line of code activates like 20 times consecutively

quasi comet
#

add context.main_eval in there

thorn furnace
#

thanks dance

rapid stag
#

what's the property i check for to see if a passed center is fake for tooltips?

rapid stag
#

ah, it's literally just that, thanks

quasi comet
#

ive tried creating my own global variable and feeding it into the sticker's own rate and having just a joker modify that variable but it doesn't seem to really take the value in consideration(?)

daring fern
quasi comet
#

huh! wow that was surprisingly simple lol. i feel dumb. Thank you!

rapid stag
#

well now i need a new solution for changing the floating sprite via card:set_sprite or similar

faint yacht
#

card.children.floating_sprite:set_sprite_pos

rapid stag
faint yacht
short girder
#

something is crashing that didnt before

rapid stag
short girder
#

correct

#

it's not mine it's cross mod and the name of the set is entirely correct

#

another instance where it doesnt crash

dreamy thunder
#

Itd not xorrect

#

EnchancedDocuments

#

Is the set key

#

Sorre 😔

short girder
#

THEN WHY DID THE FIRST ONE WORK

#

??

dreamy thunder
#

IDK

short girder
#

ykw let it be

#

okay now its generating two cards from scrap

#

what

#

hold on let me copy one of my previous consumables

jolly shadow
#

why dont the xchips apply

inner cobalt
#

Holy shit is that Edward Robinson

rapid stag
chrome widget
#

is the rotate mod for Sprite:draw_shader() in radians?

rapid stag
jolly shadow
#

the semicolons are fine.

rapid stag
#

ah

rapid stag
chrome widget
#

Question for anyone with knowledge of the draw_shader function: how do the offsets work????

#

I've been trying to scale, rotate, and offset some things, but I'm not sure why only the rotate is working as expected

quasi comet
#

how does one change the blind chip number on this screen?

daring fern
quasi comet
#

i tried patching the UI_definitions to double the number but didnt work, and hmm i had looked in cryptid, but i didnt look there

#

oh. my thing was working i uh. forgot to write functions/ before the filename in my target path

#

i took a look at the cryptid patches and realized i just messed up the path PFFP

chrome widget
#

trying to figure out how to to keep a sprite that's set as a major from wobbling as it follows another card

lament agate
#

how do you modify the subtext of the shop sign

#

"prepare for your run" thing

daring fern
lament agate
daring fern
lament agate
lament agate
wintry solar
daring fern
lament agate
#

alright

lament agate
daring fern
chrome widget
daring fern
#

Yes.

chrome widget
#

The result however is that it doesn't seem like the resulting sprites corretly follow the major's rotation, evne when it's declared as the draw_from object?

#

In this case, trying to set the rotation specifically causes the weird offset they have. They're supposed to be dotted around the card. Not setting the rotation for them does get me something that more resembles the correct positions, but I don't know the math to transform the rotation correctly

Because I think the fundamental problem is that the newly drawn sprites match the rotation of specifically the top left of the card at all times, because that's the origin position it offsets from. For cards that are exactly the same dimensions (like basically all seals and stickers), it doesn't matter, but the individual sprites here are 18x18 and need to be offset

wintry solar
chrome widget
#

I've got no idea how to do that tbh

#

I'm more used to calculating relative rotations with like 3D points but on 2D planes and with whatever strange offsetting/scaling this is doing, no clue

vestal magnet
#

for some reason the sound plays when the hand is played and not around the same time as the message is displayed

#

on an individual card

wintry solar
#

Put sound = 'mkrk_cut' in the return table instead

pastel kernel
#

is "if context.buying_card and cardarea == G.vouchers then" the right syntax for when checking for if a voucher gets redeemed?

pastel kernel
daring fern
coarse marsh
#

@molten relic

molten relic
#

you forgot a ' at the end of [3] =

#

best guess

#

oh and the [1] and [2] and such are unneccesary

daring fern
daring fern
coarse marsh
coarse marsh
rotund sable
#

just saying

coarse marsh
rotund sable
#

new line = enter

coarse marsh
#

Thank you but i already figured out how it worked

#

Just forgot to reply

rotund sable
#

more people there know how to help with JokerForge

hidden notch
coarse marsh
#

What does this mean

rotund sable
# coarse marsh

looks like trying to assign something to rarity/type that doesn't exist

pastel kernel
#

help

molten relic
#
        if context.individual and context.cardarea == G.play then
            if context.other_card:is_suit(card.ability.extra.suit) then
                    card.ability.extra.spade = true
            end
        end
        if context.joker_main then
            if card.ability.extra.spade == true then
                card.ability.extra.spade = false
                return {
                    xmult = card.ability.extra.xmult
                }
            end
        end
    end
}```
#

why dont this a work

rotund sable
pastel kernel
daring fern
rotund sable
#

context doesn't have .ability

daring fern
pastel kernel
#

no wait i missed that actually

pastel kernel
#

i have terrible eyesight is all

#

thanks for catching that

molten relic
pastel kernel
#

i have terrible reading comprehension

#

voucher.cost = 0

"attempt to index local 'voucher' [a function value]"

daring fern
pastel kernel
#

oh

#

wait then why does this work?

if context.starting_shop and not card.ability.extra.triggered then
     local booster = SMODS.add_booster_to_shop("p_arcana_mega_1")
     booster.cost = 0
      card.ability.extra.triggered = true
    end```
#

i ditched the random chance btw

rotund sable
#

because here you're calling the function

daring fern
#

How does one do reversed text?

rotund sable
daring fern
faint yacht
#

Mirrored text?

daring fern
faint yacht
#

"Flip horizontally" mirrors the image.

daring fern
faint yacht
#

So something like aeiou becomes aeiea or uoiou...

daring fern
faint yacht
#

...closest, I guess, is a custom font that includes the flipped characters, though I am not sure about the shadows.

daring fern
faint yacht
#

¯_(ツ)_/¯

unborn bay
#

i made one for iroyokia but its not entirely 100% accurate

royal ridge
#

is there an smods function for getting the result of get_current_pool without the unavailable entries?

#

just checking before i make one myself

wintry solar
#

No

pastel kernel
# rotund sable because here you're calling the function

like this? (should spawn the next seeded object each time according to the wiki)

        if context.starting_shop and not card.ability.extra.triggered then
                local voucher = SMODS.add_voucher_to_shop
                voucher.cost = 0
                card.ability.extra.triggered = true
        end```
daring fern
pastel kernel
#

so i have to add a key

royal ridge
daring fern
pastel kernel
#

i never should've ignored those bluej classes

#

back in like 7th grade

#

oh yeah, how do i randomize which voucher spawns?

daring fern
simple helm
#

what are the ids of ace, j, q and k?

crisp coral
#

14, 11, 12, 13 in that order

slim ferry
#

does it matter what you put into the seed of pseudorandom_element? i see some mods just put a raw string into it but some others do pseudoseed("text") instead which is confusing me a bit

rotund sable
#

i think raw strings are the newer thing

#
function pseudorandom_element(_t, seed, args)
    if seed and type(seed) == "string" then seed = pseudoseed(seed) end

from lovely/dump

crisp coral
#

raw string is from smods

pastel kernel
#

Ok so the joker works, now my only problem is how do I make it so that it does not give way too much money than it should

pastel kernel
#
-- end of round dollars
    if context.end_of_round and not context.blueprint then
            return {
            dollars = card.ability.extra.dollars
            }
        end```
#

so i just remembered i had a snippet for this exact purpose

#

and it's in one of my jokers

#

But honestly it’s much funnier to learn about these mistakes and how I can use this to make even more broken jokers

red flower
#

end_of_round is called with individual and repetition so you also need to check for context.main_eval

wild berry
#

why does this happen

long sun
#

how can i replace the small and big blinds with a specific boss blind?

wild berry
crisp coral
#

you need to have that many values in your loc vars

wild berry
#

oh

red flower
long sun
#

okie :D thanks!

simple helm
#

wait,can i use local variables with context.other_card:get_id()?

red flower
#

wdym

simple helm
#

i wrote local rankvar = 2, i change it to random every ante, and then if context.cardarea == G.play and context.other_card:get_id() == rankvar then

#

every time i use that rank it crashes

long sun
#

log?

daring fern
red flower
#

a local is not saved between function calls

simple helm
#

so i place it in extra?

idle plaza
simple helm
#

ill try

#

now it does nothing

daring fern
simple helm
#
      card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.xmulthand
      return{message = 'ESENCIA'}
    end```
daring fern
simple helm
#

yes

idle plaza
simple helm
#
    extra = {
      rankvar = 2,
}}```
red flower
#

did you restart the run

wild berry
#

how 2 check played card amount

#

im genuiely lost i cant find much on the documentation

#

and what i find is just basic stuff

#

and sometimes the basic stuff i need is missing

#

i dunno if its just me

pearl jacinth
#

is it possible to include spaces in text with background color

daring fern
wild berry
#

end the markup with a {}

wild berry
pearl jacinth
#

no i meant something like {X:red,C:white}text here{}

#

with the space

wild berry
#

it will color the space too

idle plaza
pearl jacinth
#

is it possible to include that

wild berry
idle plaza
wild berry
#

oh

pearl jacinth
red flower
pearl jacinth
#

that makes no sense

red flower
#

B was added by smods so it works while X is vanilla :3

pearl jacinth
#

why didn't steamodded change X: to work like that as well

lament agate
#

question

#

can i name lovely.toml to anything?

daring fern
lament agate
lament agate
#

thank

#

s

#

no tom's language?

wild berry
#

actually is there a way to check all the global values of balatro

#

not all but like

#

the important ones

wild berry
#

where

daring fern
wild berry
#

oh

lament agate
#

much better

#

@maiden phoenix relating to the sprite, what size is the sprite, both the patch and the assets

maiden phoenix
#

It's fetched from the center (center.T.w, center.T.h)

lament agate
maiden phoenix
#

Yes you can modify it

lament agate
#

i see

#

do i need to

#

identify the atlas?

maiden phoenix
#

You put your atlas key here

#

Instead of "Joker"

lament agate
#

i see i see

modest dock
#

Hi
I'm facing problems when trying to make a rank considered as an enhancement
I referenced Extra Credit's alloy joker and ive enabled quantum enhancements at the top of the file, but the game crashes without logging anything,
Would greatly appreciate any help

calculate = function(self, card, context)
        if context.check_enhancement then
            local id = context.other_card:get_id()
            if id > 2 and id < 11 then
                return {m_wild = true}
            end
        end
    end
lament agate
#

hopefully thisll work

modest dock
#

thanks a lot!

wild berry
#

how to check all the cards in the player's hand

lament agate
maiden phoenix
#

modify or replace center.T.w and center.T.h

lament agate
maiden phoenix
#

like "12" or "center.T.w * 4" idk

lament agate
#

ah alright

unborn bay
#

what the hell is center.T

#

that doesn't exist

#

a center is not an instance of a movable 😭

lament agate
#

whuh

primal robin
#

<@&1133519078540185692>

unborn bay
#

<@&1133519078540185692>

#

KILL

primal robin
#

2.5-3 seconds

lament agate
#

mods

unborn bay
#

KILL

wild berry
#

come the fuck on

lament agate
#

there you go

livid scroll
#

🔫

livid scroll
wild berry
maiden phoenix
#

Cringe

primal robin
#

Center is not a card

unborn bay
#

a center is a prototype for a card

primal robin
#

It's card definition

maiden phoenix
#

I know but it's still dumb

unborn bay
#

it wouldn't make sense though

primal robin
#

It is not

lament agate
#

so which one is right

maiden phoenix
#

They're right

unborn bay
#

set the coordinates and the width and height manually

lament agate
#

so numbers?

unborn bay
#

the first 4 parameters for a sprite definition is the x coordinate, y coordinate, width and height

#

so numbers

primal robin
#

no way, numbers..

unborn bay
#

i believe the x and y coordinate doesn't matter since it gets snapped to the ui element anyway

maiden phoenix
#

I love hardcoded values

lament agate
#

so width and height only?

maiden phoenix
#

Yea

lament agate
#

alright guys

#

watch this

#

imma cook

primal robin
#

I'm watching

lament agate
#

all of this just for a shitpost mod

#

🥀

primal robin
#

You'd be better cook hard and good

#

Or else

lament agate
#

D:

primal robin
#

free mult

maiden phoenix
#

Make Spongebob proud

lament agate
#

dont dagger me

#

anyways

#

brb

#

like this right?

maiden phoenix
#

Yea

unborn bay
#

that's gonna appear pretty big ingame btw

lament agate
#

i know what im doing

#

do i need set atlas or

#

for example

maiden phoenix
#

Just try it

lament agate
#

alright

red flower
lament agate
#

oh come on

#

@maiden phoenix

#

oh wait

red flower
#

youre missing the manifest at the beginning of the file

lament agate
#

fuck

lament agate
#

hold

#

crash

#

@maiden phoenix did i fuck something up

#

forget it

#

i fixed it

#

now it doesnt show up

maiden phoenix
#

What's your description like

lament agate
#

ignore the dent

unborn bay
#

lemme see the entire patch

maiden phoenix
#

Right I fetch a center to show a sprite

lament agate
#
[[patches]]
[patches.pattern]
target = "functions/misc_functions.lua"
pattern = "elseif part.control.E then"
position = "before"
payload = '''
elseif part.control.yourmodprefix_S then
    local center = G.P_CENTERS[part.control.tngt_S]
    if center then
        final_line[#final_line + 1] = {
            n = G.UIT.O,
            config = {
                object = Sprite(0, 0, 478, 120, G.ASSET_ATLAS["tvtime"], center.pos)
            }
        }
    end
'''
match_indent = true
maiden phoenix
#

If yours is a sprite alone you'll have to use a different approach

lament agate
#

oh

#

what is it

maiden phoenix
#

Remove the center stuff and replace center.pos with {x = 0, y = 0} (or whatever value your sprite is located)

slim ferry
#

how would i reference the primary/secondary colors of a modded consumable type?

maiden phoenix
#

Yea and the center check and the end below

unborn bay
#

ok

maiden phoenix
#

Yea lol fix that too

#

smh

lament agate
#

hOLD

#
[[patches]]
[patches.pattern]
target = "functions/misc_functions.lua"
pattern = "elseif part.control.E then"
position = "before"
payload = '''
elseif part.control.tngt_S then
        final_line[#final_line + 1] = {
            n = G.UIT.O,
            config = {
                object = Sprite(0, 0, 478, 120, G.ASSET_ATLAS["tvtime"], {x = 0, y = 0})
            }
        }
'''
match_indent = true
#

this should be right?

#

same name for both .ATLAS and ASSETS_ATLAS

#

whats wrong

unborn bay
#

you forgot your mod prefix

#

😁

lament agate
#

where

#

oh

#

wait

#

where

#

alrgiht it works

#

thanks guys

wintry solar
#

Maybe I should build proper support for this

lament agate
#

god please

wild berry
#

why doesnt this debuff cards

vestal magnet
#

how do i set a card's sell value

wild berry
red flower
#

or card.sell_cost = number but keep in mind it will reset when card:set_cost() is called

lament agate
#

i thought the res was right

maiden phoenix
#

Otherwise it will bleed

lament agate
#

is that why?

maiden phoenix
#

usually yea

slim ferry
#

why does vanillaremade put "vremade_spe" into the key_append in SMODS.Booster when the mod prefix is just vremade?

lament agate
maiden phoenix
lament agate
#

there

maiden phoenix
#

There's still contact it seems? Show your sprites

lament agate
red flower
maiden phoenix
#

Maybe add even more spacing around the sprite

lament agate
#

noted

maiden phoenix
#

And don't forget to change your atlas px and py if you change the sprite size ofc

slim ferry
wild berry
lament agate
#

it matters???

slim ferry
#

that seems wierd

lament agate
#

ohhhh

maiden phoenix
#

lol

lament agate
#

aint no way the sprite will look good

#

in this res bro

maiden phoenix
#

tiny

slim ferry
#

tragic!

red flower
#

ill send a PR rn

wintry solar
#

I mean you can put anything in there it doesn’t matter

unborn bay
#

you can even put nothing

slim ferry
#

then why is it even a field to begin with if what you put in there changes nothing

red flower
#

I would say it does matter, I have used it

unborn bay
#

its for rng

lament agate
#

brother 😭

red flower
#

It's also for in_pool

wintry solar
#

I mean it doesn’t matter what you decide the string to be

maiden phoenix
#

Why are you reducing the sprite size?

lament agate
#

oh i dont need to?

maiden phoenix
#

Just change the width and height in the lovely patch

lament agate
#

i did

#

14, 7 in the patch

wild berry
unborn bay
#

you don't need to resize the image tho 😭

#

just the sprite

maiden phoenix
#

Don't be affraid to go smaller

#

omg again??

slim ferry
#

at moderators

rotund sable
#

<@&1133519078540185692>

unborn bay
#

I hate discord role search

#

it decided to disappear on me for some fucking reason

karmic creek
#

I deed it

lament agate
#

so i can just put the number here

maiden phoenix
#

Yea how do you even ping that role? Writing it out doesn't work

unborn bay
#

if discord gives a suggestion to it iirc

maiden phoenix
karmic creek
#

You have to look deep in your heart and believe

unborn bay
#

in mobile it disappears sometimes

maiden phoenix
unborn bay
#

and never reappears until you restart the app

#

top 10 reason why discord mobile app sucks

lament agate
#

patch size: 17, 4
atlas size: 478, 120

maiden phoenix
#

ok

#

What's the x y of your file rn

lament agate
#

0 0

maiden phoenix
#

Wtf

lament agate
#

cuz its a single file

wintry solar
#

17 is very wide for a sprite btw

maiden phoenix
#

No I mean pixel size

#

Sorry

lament agate
#

oh

unborn bay
#

Sprite width and height is for the visual size

lament agate
#
object = Sprite(0, 0, 14, 7, G.ASSET_ATLAS["tngt_tvtime"], {x = 0, y = 0})
wintry solar
#

A card is like 2.1 iirc

unborn bay
#

you do not need to mess with your image in anyway if you wanna scale it down

lament agate
#

there

rotund sable
lament agate
maiden phoenix
#

Keep your sprite how it was and just fiddle with 14, 7 making them lower

knotty orchid
#

Is it possible to create animated jokers? I'm trying to set an animated atlas to a joker but my game keeps crashing

maiden phoenix
#

Like 2, 1 idk

wild berry
maiden phoenix
#

Just test some values

red flower
lament agate
knotty orchid
maiden phoenix
#

You still got sprite bleeding

red flower
knotty orchid
#

Oh

wintry solar
knotty orchid
#

I'll try

#

thanks!

lament agate
rotund sable
# knotty orchid I'll try
    update = function(self, card, dt)
        if card.ability.extra.delay == 60 / card.ability.extra.FPS then
            card.ability.extra.x_pos = (card.ability.extra.x_pos + 1) % 40
            card.children.center:set_sprite_pos({x=card.ability.extra.x_pos,y=0})
            card.ability.extra.delay = 0
        else
            card.ability.extra.delay = card.ability.extra.delay + 1
        end
    end,

This is a snippet from my animated joker

wintry solar
#

I am mobile so it’s hard to tell but that definitely looks like it doesn’t have a pixel border

maiden phoenix
lament agate
#

okay yeah no it works

#

with OTHERS

maiden phoenix
#

Tennaception

rotund sable
red flower
#

speaking of boosters, they don't actually use in_pool, right? the docs say they do but I don't see where

short girder
#

I'm pretty sure they don't

#

I didn't need one when making mine and it worked just fine

red flower
#

I'm planning to do a PR for in_pool things so I can add that too

red flower
short girder
#

I mean yeah but what would the boosters even get from in_pool

wintry solar
#

They definitely do use in pool

short girder
#

Wait what

wintry solar
#

Its just not in get_current_pool

red flower
#

i dont see it in get_pack

wintry solar
red flower
#

oh

#

nice to know

wintry solar
#

I’m pretty sure everything uses in pool

#

I would be very surprised if not

red flower
#

what are your thoughts of an SMODS.is_in_pool() to be able to manipulate the pool like SMODS.showman

wintry solar
#

I don’t like pool manipulation as a mechanic in general but I can see the use of it

slim ferry
#

smods wiki says to put mod prefix before the key of a consumabletype when using it in text styling, but that doesnt work. is smods wiki stupid?

lament agate
#

whats the vars for the box color again

wintry solar
#

box_colours = {}

lament agate
#

hmm idk why its yellow lined

red flower
#

you dont have the lsp pointed to the vanilla code

lament agate
#

but besides that

#

it doesnt work

red flower
#

i has to be inside vars iirc

lament agate
#

hold

slim ferry
#

all i did was enter the shop

lament agate
#

@maiden phoenix sprite keeps bleeding for no reason

#

im so tired of this

red flower
wintry solar
slim ferry
placid star
#

who was making that debug plus plus mod with the tabs on the right side of the screen?

lament agate
wintry solar
#

and what px/py have you got rn?

lament agate
#

still the same

wintry solar
#

which is?

lament agate
#

478, 120

wintry solar
#

it should be 484/126

lament agate
wintry solar
#

because he fixed your image

#

to give it a transparent border to stop the bleeding

lament agate
#

oh

#

so in the future, i just give every sprites a transparent border

#

?

slim ferry
# slim ferry

game only crashes when entering a shop too, not when doing anything else with the consumable type

red flower
#

i think it's trying to compare the shop_rate and failing but idk why

slim ferry
#

thats wierd

#

is there anything else that could be causing that?

wintry solar
#

did you load a run from before you added the type

slim ferry
#

no i didnt

#

i made the run specifically to test the type

wintry solar
#

can you do eval G.GAME.wonder_rate

slim ferry
#

where?

wintry solar
#

debug plus console

plucky zenith
pearl jacinth
#

use SMODS.add_card instead

red flower
#

yet

#

im making some

pearl jacinth
#

they create cards instantly

slim ferry
lament agate
#

i swear to god, why is it always in the up corner

vast bough
#

where is the black hole implementation in vanilla remade i think im blind

red flower
#

spectrals

red flower
vast bough
#

im blind

#

thank u

red flower
#

thats x and y

slim ferry
wintry solar
lament agate
wintry solar
lament agate
wintry solar
#

align = 'cm' in whichever node's config

slim ferry
#

thanks

wintry solar
#

I don't know why that happened 🤣

#

maybe because it was 0.0?

#

I know just 0 works

slim ferry
#

would be wierd since vanillaremade also sets the shop_rate for spectrals to 0.0

#

actually would adding a new booster during the run cause that

red flower
#

i also havent tested stuff in vanillaremade that well so dont take it as gospel :p

wintry solar
#

no it shouldn't do

#

0.0 works for me 🤷‍♂️

misty radish
#

Is there a way to have a specific DebugPlus command activate when you press a specific key?

pastel kernel
#

ctrl

#

then that specific button

slim ferry
#

but i dont think you can add new ones

pastel kernel
#

ctrl+key

misty radish
simple helm
#

how do i generate a card from an specific pool?

pastel kernel
slim ferry
#

for vanilla the pools are Base, Enhanced and Playing Card for playing cards (base = no enhancement, enhanced = yes enhancement, playing card = default enhancement rate), and then Joker, Tarot, Planet and Spectral afaik

hardy viper
hardy viper
#

the key is like

#

a normal center key

#

btw

#

key_pressed is the actual physical key

misty radish
hardy viper
#

oh

#

dw about it

#

just use "some_key" it doesnt make a difference

misty radish
#

Oh okay

modern kindle
#

Im not sure if you guys would know, but would you guys know of a way to try and pull gpu and cpu utilization of the users machine?
I tried doing the ffi approach like I did for my disk and ram variation but it does not seem to be as effective in that the value is incorrect as well as im only pulling from nvidia specific gpus
Id like to be able to pull the info that task manager displays but it doesn't seem to let me read it as I can ram usage and disks installed on the host machine

slim ferry
#

is there a way to have my mod file have a copy in my balatro mods folder thats always synced to the folder where i edit it in? constantly replacing the mod in my mods folder is a bit annyoing

modern kindle
#

Cause as I said it was effective for these two, its just not for gpu and cpu usage

red flower
hardy viper
#

gain money equal to the sum of the digits of your (ipv4) ip address

lament agate
#

bepis is torturing me to look for joker localization

red flower
#

where did it go

modern kindle
lament agate
modern kindle
#

Gpu would increase each cards chip value by gpu utilization %

red flower
slim ferry
lament agate
modern kindle
lament agate
#

i need to find it

slim ferry
#

0% blind size 🔥

modern kindle
#

The disk joker scores differently depending on the disks you have
If you have 1 disk it scores on every card played, if you have 2-3 its on every hand played, if you have 4+ its end of round

#

So it'd be neat to do more variation like that

lament agate
#

damn you @manic rune

modern kindle
#

Damn you @manic rune

manic rune
#

:3

#

surpass me

real night
#

damn you @manic rune

wintry solar
#

Oh I think I have terrible news for bepis

manic rune
#

dang yall be punching me in the guts rn

#

what is it

wintry solar
#

You know all that work you did on progress bars?

manic rune
#

yeah

wintry solar
#

I am 95% sure that the default UI supports them anyway

manic rune
#

i would be happy if someone got a better implementation honestly-

#

what

modern kindle
#

Eremel you are very wise would you have the answer to my query perchance

wintry solar
#

I just need to test it out later

manic rune
#

wait since when???

wintry solar
#

Since ever

manic rune
#

😭

#

well crap, i mean, at least it wont be a finicky approach

#

i would probably rework the progress bar at one point if it wasnt for that anyways

#

since, the vertical bar is still weird as hell

keen atlas
lament agate
#

@manic rune so good news and bad news

#

good news is that i give up

manic rune
#

-# how is that good news

lament agate
#

and the bad news is that the animated sprites wont work in here

#

I DONT KNOW HOW THE FUCK HE FITS

manic rune
#

thats odd, did you put a card in there or just object

lament agate
#

THAN OTHER SPRITES

#

😭

lament agate
manic rune
#

yeah it wont work then

#

set_sprite is exclusive to Card

#

if its just a sprite then it wont have functions like that

lament agate
#

fair fair

#

dude how the hell he fits

#

like damn

#

other sprites are just cornered

#

but tenna literally fits

manic rune
#

hes him

#

-# but basically, hes bigger than min width and min height of the node box, so the box is coating around him instead

lament agate
#

hmmmm

#

i have an idea

#

bevermind

#

ill keep this as a scrapped project

#

imma continue working on the update for now

#

still cant believe a streamer played my mod

red flower
#

murphy will land on it today trust

lament agate
#

i'd shit my pants X2

#

today was a surprise

wild berry
#

how to fix cards not being debuffed

modern kindle
#

hi N

#

sorry for not saying hi earlier i wondered if anyone could answer my question

red flower
#

hewwo

wintry solar
#

What was the question?

modern kindle
#

as youl see the ffi approach works for ram and disk but i cant pull the utilization of cpu and gpu that way reliably

wintry solar
#

I have no idea

modern kindle
#

im in shambles

wild berry
#

why am i being ghosted

lament agate
#

if no one notices your problem

#

bump it

wild berry
red flower
#

debuffing is complicated

#

as in i dont understand it, i mean

modern kindle
modern kindle
hushed field
faint yacht
#

You'd need an external "app" to interface with to really pull it off.

modern kindle
#

see its unfortunate because im able to read ram usage as well as disks installed to the machine, i can somewhat pull nvidia gpu utilization with this

local ffi = require("ffi")

local nvml = nil
local gpu_support = "unknown"

local function try_load_nvml()
    local success, lib = pcall(ffi.load, "nvml.dll")
    if not success then return false end

    nvml = lib

    ffi.cdef[[
        typedef struct nvmlDevice_st* nvmlDevice_t;
        typedef struct nvmlUtilization_st {
            unsigned int gpu;
            unsigned int memory;
        } nvmlUtilization_t;

        typedef int nvmlReturn_t;

        nvmlReturn_t nvmlInit_v2(void);
        nvmlReturn_t nvmlShutdown(void);
        nvmlReturn_t nvmlDeviceGetHandleByIndex_v2(unsigned int index, nvmlDevice_t* device);
        nvmlReturn_t nvmlDeviceGetUtilizationRates(nvmlDevice_t device, nvmlUtilization_t* utilization);
    ]]

    if nvml.nvmlInit_v2() ~= 0 then return false end

    local device_ptr = ffi.new("nvmlDevice_t[1]")
    if nvml.nvmlDeviceGetHandleByIndex_v2(0, device_ptr) ~= 0 then return false end

    gpu_support = "nvidia"
    return true
end

local function get_gpu_usage()
    if gpu_support ~= "nvidia" then return 0 end

    local device_ptr = ffi.new("nvmlDevice_t[1]")
    if nvml.nvmlDeviceGetHandleByIndex_v2(0, device_ptr) ~= 0 then return 0 end

    local utilization = ffi.new("nvmlUtilization_t[1]")
    if nvml.nvmlDeviceGetUtilizationRates(device_ptr[0], utilization) ~= 0 then return 0 end

    return utilization[0].gpu
end

-- Initialize GPU support once
if not try_load_nvml() then
    gpu_support = "none"
end

but as i said, with ffi it just isnt accurate to what we are reading through task manager..

i did consider helper scripts but that would require the user to download extra stuff

modern kindle
faint yacht
#

...I've not used external libraries with Lua, erally, so I'm not useful here much either.

modern kindle
faint yacht
hushed field
wild berry
#

k ty

wild berry
hushed field
#

The smods function allows you to just tag the cards, so you can just use a key if you wanna debuff them at a later point. Additionally, and I've only recently refactored all my jokers to not store any cards or jokers in their ability myself, it runs the risk of creating issues with other mods, and the references don't get stored between saving and loading

wild berry
#

and that function is?

hushed field
#

Meaning that if you save the game and quit, then reload, your joker won't know how it's stored

hushed field
wild berry
#

no like

#

the tag

#

you said

#

is it just the source

red flower
#

yes

hushed field
#

Oh, yeah

wild berry
#

and how do i get the source of the debuff later

red flower
#

card.ability.debuff_sources

hushed field
#

if you're consistent, you always know the source of each debuff. If your joker debuffs with source "mymod_joker_1", you can remove it with "mymod_joker_1" as the source as well

wild berry
red flower
#

it's a table

faint yacht
#

<@&1133519078540185692>

grand violet
wild berry
#

again??

modern kindle
#

i wonder what the confirmed kill count of each mod is

wild berry
#

to remove the debuff

red flower
#

yes

wild berry
#

is it G.deck?

slim ferry
#

why do all destroy all (other) jokers effects make a _first_dissolve variable first?

red flower
wild berry
#

kk

red flower
wild berry
#

it didnt work

red flower
#

debuff_sources is a table, like i said, but also you dont need to check for it

slim ferry
#

what does trigger = "before"/"after" in events created by consumables

wild berry
red flower
#

no, it's indexed by the source so debuff_sources[source] will work

#

but again, you dont need to check for it

#

SMODS.debuff_card does it for you

slim ferry
#

theres always a before or after there

#

but what does that even change

red flower
unkempt thicket
#

How do i draw step a tag?

wild berry
#

it doesnt debuff at all

red flower
#

remove the cardarea check from context.after

wild berry
#

gotcha

slim ferry
#

why does using a text color from a modded rarity not work for me? without mod prefix its just the default text color and with mod prefix (like it should be according to the smods wiki) it just has the nonexistent color option color

vast bough
#

can someone show me the line of code for add_card for a random joker taking from a pool of custom rarity

red flower
vast bough
#

is it that easy

#

why have i been fucking around with create_card

#

i swear that didnt work before

slim ferry
#

did you remember to put regular brackets around the table

vast bough
#

i remember trying that like weeks ago and thinking "oh well, i will just use create_card instead" but i can guarantee you it was some typo like that haha

#

and since then i have been using add_card sparingly because i thought it was broken or something lmao

slim ferry
#

its worked every time for me so far

crisp coral
#

you can now go back to using addcard everywhere

vast bough
#

i just thought the function was more limited or broken or something

slim ferry
#

you should have SMODS.add_card( { set = "Joker", rarity = "modprefix_key" } )

slim ferry
#

or not mod prefix if its vanilla

vast bough
#

what is the point of create_card then for creating jokers

#

is it just back compat

#

or is because of like playing cards too

slim ferry
#

why does this not work....

#

ive tried with and without prefix

#

neither gives anything

crisp coral
#

definite it by hooking to the loc_colours function

rotund sable
slim ferry
crisp coral
#

idk i don't use that

rotund sable
rotund sable
#

Are you trying to access it before it gets defined?

red flower
ebon shell
#

hi chat can someone explain to me how to make my joker create another joker? i tried snooping around another mod's code and found it uses a format like this:

card:add_to_deck()
G.Jokers:emplace(card)```
but when i did the same the game crashes once my joker triggers
#

im not a programmer so i have no idea if this code is correct to begin with

rotund sable
#
SMODS.add_card{key = "j_joker"}
rotund sable
wintry solar
# vast bough what is the point of create_card then for creating jokers

SMODS.create_card just creates a card, it doesn’t do any of the extra stuff that’s required for when you’re adding it to your slots, but it’s in essence just a wrapper for vanilla create_card to allow for easier use. SMODS.add_card just feeds your table into the create card variant but puts the card in the correct area and does add to deck functions too

long sun
#

question!

#

i'd like my tag to add a specific kind of Joker to the shop

#

code is:

#

will this be able to create duplicates of this Joker type without Showman?

#

have i done this correctly?

slim ferry
rotund sable
#

debugplus?

slim ferry
#

there is no print command]

rotund sable
#

eval G.ARGS.LOC_COLOURS

slim ferry
#

huh

rotund sable