#💻・modding-dev

1 messages · Page 584 of 1

devout edge
#

i'm not entirely sure when to and not to use keys

idle plaza
#

If you're comparing <card>.config.center.key then the answer is yes.

devout edge
#

ok

daring fern
#

You mean when it changes size?

long sun
#

whatever transform_projection is in the dissolve shader

#

i need this for a custom shader, so i can fix the remaining issue with the hat

static valley
#

how do I get a message event to play before the return in a calculate function?

#

like I want it to send 3 different messages, wait a second, and then send a 4th message along with its appropriate return output

#

(yes this is me working more on the slot machine)

static valley
#

so extra is where I put in the output?

static valley
daring fern
static valley
#

ohhh

wild berry
#

how can i make my joker not show my mod's tag

daring fern
wild berry
#

ty

#

and what about not showing it in the collection

daring fern
wild berry
#

alright thanks

sleek citrus
#

I was thinking of making a mod where the jokers and cards are flipped (i.e. you have a deck of jokers and a single hand of cards you can buy and sell)
after looking at smods and the balatro source, it seems like a giant undertaking, like I might even have to rewrite large portions of the game
anyone know if a mod like this already exists?
is there something I'm missing like an easy way to modify the card and joker collections? can I add hooks anywhere?
I've never developed in lua before, please assume I know absolutely nothing

rare torrent
#

how can i make my enhancement swap chips and mult when scored?

#

i keep getting this error

lofty elm
#

can you send some more of the code

frosty rampart
#

show code

rare torrent
#
    key = "swapping",
    
    loc_txt = {
        name = "Swapping Card",
        text = {
            "Swaps {C:chips}Chips{} and {C:mult}Mult{}",
            "when scored"
        }
    },
    
    
    unlocked = true,
    discovered = true,

    atlas = "swapping",
    
    calculate = function(self, card, context)
    if context.main_scoring and context.cardarea = G.play then
    return {swap = true}
    end
end
}```
lofty elm
#

you need ==

static valley
#

how do I have the sound's pitch not get changed (specifically when a sound is set in the return part of a calculate function)?

lofty elm
#

if context.main_scoring and context.cardarea == G.play then

rare torrent
unkempt thicket
#

How can i stop Found effect table with no assigned repetitions during repetition check from showing up in debug log.

daring fern
unkempt thicket
#

So i can do not context.repetition/context.retrigger_joker_check in the if statement and it'll fix the problem?

unkempt thicket
#
    ret.playing_card = {}
    local chips = card:get_chip_bonus()
    if chips ~= 0 then
        ret.playing_card.chips = chips
    end
end``` in eval_card general effects
#

Or where the card is scoring SMODS.score_card(context.other_card, {cardarea = G.play, all_in_jest = { main_scoring_chip_vaules = true }})

lofty elm
#

anyone know a good way to have a joker do something like give money multiple times in the same context? In this case I want it to give money once per card destroyed. I tried this with and without what's commented out, but the way it is it happens way too fast (obvsiouly) or with the events the game just stops.

      for i, destroyed_card in ipairs(context.removed) do
        -- G.E_MANAGER:add_event(Event({
        --   func = function()
            ease_dollars(card.ability.extra.money)
        --     return
        --   end
        -- }))
      end
    end```
#

sorry to jump in lol

frosty rampart
#

you need to return true in events

lofty elm
#

oh duh, mustve copied smt wrong

#

ty

unkempt thicket
lofty elm
#

oh but now the happen at the same time

#

this might not even be possible without smt wack

frosty rampart
#

add the line delay = 0.4, before the line func = function()
you can tweak the number to change the timing

lofty elm
#

oo cool

lofty elm
frosty rampart
#

oh right i forgot the trigger isn't the default
also add this line before the delay line:
trigger = "after",

lofty elm
#

oh got it, ill try that

#

ty again

frosty rampart
#

(by default, events have trigger = "immediate", which just trigger as soon as they possibly can and totally disregard any delays)

lofty elm
#

got it, I'll keep that in mind

#

lol, so the delay works but it delays first then triggers both at the same time

#

@frosty rampart
with delay set to 5 for dramatic effect. No worries if you don't know a fix for this but I thought I'd double check

daring fern
frosty rampart
#

well they want it to give money in separate chunks once for each destroyed card

lofty elm
#

oh ok, I didn't think the event could return dollars I'll try that

lofty elm
#

ok cool

#

sorry ik i should prolly just return twice the amount once but I feel like that would feel weird

lofty elm
#

I can't get each animation to be seperate

daring fern
lofty elm
#

wdym sorry

#

im unfamiliar

daring fern
lofty elm
#

oh woah ok ill try that, ty

#

uh

frosty rampart
#

yea that'll do two dollars popups, you'll probably have to figure out how to automate the process for an arbitrary number of destroyed cards

lofty elm
#

does this work for more than 2

#

got it

#

huh

frosty rampart
#

(you can nest extra tables i think)

daring fern
lofty elm
#

alrighty I think I can figure that out, thanks guys

static valley
# static valley https://cdn.discordapp.com/attachments/1419010183677612114/1420487943834828830/l...

Btw here's all the possible payouts that could happen:

3 diamonds

  • +300 chips

3 hearts

  • +20 mult

3 spades

  • x15 mult

3 clubs

  • $20

Jackpot

  • +700 chips
  • +100 mult
  • X70 mult
  • $77 dollars
  • played hand goes up 7 levels
  • 1 negative Soul Spectral Card
    -# reminder that each of these payouts have a 1/125 chance of happening

Btw not getting a payout has a 120/125 chance of happening.
if any of the payouts need to be buffed/nerfed, let me know

#

the only reason why the jackpot can give you a negative The Soul is because the odds of getting that jackpot is very close to the odds of getting The Soul from a booster pack

lofty elm
#

I think like x2 or x3 is equivalnt to the others

#

chips is also pretty high comparitive to money and mult

#

I'm thinking of like, money and mult are similar to on luckys but x15 mult is like in the stratosphere and 300 chips is 10x a bonus card. maybe like 100?

#

this is also just from a vanilla perspective, just do whatever you want if thats what you wanna do

wild berry
#

how can i update the reward text on a blind

static valley
#

as the payout

lofty elm
#

prolly still a little high but since its random anyway go for it, 7 is thematic

static valley
#

yea

#

cause i'm trying to think about how to make the payout rewarding, since it's a 1 in 125 chance for each.
speaking of which, here's how I calculate each slot:

        local m1 = pseudorandom("comedy_slot_machine", 0, 4)
        local m2 = pseudorandom("comedy_slot_machine", 0, 4)
        local m3 = pseudorandom("comedy_slot_machine", 0, 4)
        local outputs = { "Diamond", "Heart", "Spade", "Club", "7" }
#

so, there's a 1 in 5 chance to get 1 seven, a 1 in 25 chance to get 2 sevens, and a 1 in 125 chance to get 3 sevens, for example

daring fern
frosty rampart
#

for how rare the effects are i don't think i'd ever pick it up
and because of how it works you couldn't even use cryptid seed on it to guarantee a jackpot or something

lofty elm
#

thats true

static valley
#

I actually just fixed it

lofty elm
#

You might want to consider making all the rewards be unrelated to scoring since you'll never be able to rely on it

#

though you could leave some in as like, not a real reward but its fun to see big number

frosty rampart
#

alternatively, there should be a bare minimum payout of like +4 mult, and weaker versions of your 3-of-a-kind payouts for matching two of a kind

static valley
#

yea I was thinking about that too

lofty elm
static valley
#

i'll add that later tho

thorn pumice
#

hii, i'm having an issue with a sticker that is applying to all stakes and i have no idea why. i have an SMODS.Sticker {} and it's currently in one stake--and is commented out in the stake (so not even enabled). am i missing something as to why its applying to all stakes?

static valley
#

would this work for getting 2 of a kind?

elseif (m1 == m2 and (not m2 == m3)) or ((not m1 == m2) and m2 == m3) then
frosty rampart
#

don't do not x == y, do x ~= y
otherwise that's almost there, but you still need to account for when m1 == m3

frosty rampart
frosty rampart
#

checking if 2 out of 3 random numbers match

idle plaza
static valley
static valley
daring fern
wild berry
#

cant select consumable card

static valley
#
elseif (m1 == m2 and m1 ~= m3) or (m1 == m3 and m1 ~= m2) or (m2 == m3 and m2 ~= m1) then

this is what I did

#

now how do I have it give the soul after the "jackpot" message is displayed?

#

hold on I figured it out

daring fern
static valley
#

yea i just figured that out

wild berry
#

for some reason the card created through here doesnt get placed into consumables

#

and can just be moved anywhere

lofty elm
rare torrent
#

can i make a card enhancement texture appear in front with the "set_sprites = function(self, card, front)"?

lofty elm
#

np

daring fern
wild berry
frosty rampart
vale grove
#

i know this is probably the most fucked up code you guys have ever seen but ive tried everything i could think of and it just doesnt work,
the idea is that the whoosh effect triggers before the money and tarot generation trigger (the joker works functionally)
(preferrably i want the money and tarot to happen during joker triggers)

lofty elm
# wild berry bump

I think that'll prolly need a lua hook or whatever which is beyond me atm sorry

wintry solar
#

And change your context check to joker main if you want it to trigger during the joker scoring

wild berry
daring fern
wild berry
#

ah ok

#

ty

lofty elm
#

does that you do stuff that besides change the dollar amount?

#

Its also possible they do just wanna change the dollar amount

wild berry
#

i think its just visual

#

yes

rare torrent
daring fern
rare torrent
frosty rampart
# rare torrent im so confused on how it works, like i just want the base texture enchacement to...

Sleeved draws the default base card on the actual card center, so you can ignore the enhancement's set_sprites function entirely. you don't need that part

everything you need is the DrawStep in the sleeved file. you can pretty much copy/paste it, replace the check for self.children.center.paperback_sleeved with a check for self.children.center.modprefix_enhancementkey (where you fill in your own mod's prefix and enhancement key), and replace the positions in the set_sprite_pos calls with positions relevant to your own atlas

wild berry
rare torrent
frosty rampart
#

you need the second set_sprite_pos call to reset it back to the original center's art

#

without it the center will start drawing the overlay's art too

rare torrent
#

still didn't work

wild berry
frosty rampart
frosty rampart
wild berry
#

wdym?

rare torrent
frosty rampart
#

if you have debugplus, hover over a card with the enhancement, and in the console run eval dp.hovered.children.center.omega_rigged

daring fern
wild berry
#

wait

#

i think im getting this the wrong way

#

it is saved

#

...

frosty rampart
# rare torrent

so you got the stuff wrong
is that your mod prefix and the key of the enhancement?

wild berry
#

i realized the issue

daring fern
wild berry
#

im a dumbass

frosty rampart
#

hang on a minute lemme go test some stuff

#

oh i'm stupid

frosty rampart
# rare torrent i think so?

you do need a set_sprites function in your enhancement

set_sprites = function(self, card, front)
  card.children.center.omega_rigged = true
end,
#

it doesn't automatically set that, i manually put it in lmao

rare torrent
#

💀ok yeah that was it thanks!

dapper sun
#

i've returned for my info_queue-based torture and suffering

#

aka: trying to make an upgrade preview

#

this time, i wanna try a different approach

#

how do i make a custom info_queue description type

#

or whatever i need to do

#

to just make {set = "Joker", key = "j_modded_key", vars = {}} work

#

because it only works with vanilla jokers and that sucks

#

i can make a table containing every value that a G.P_CENTERS table has, and it doesn't work while the G.P_CENTERS table does

#

so i have no idea what the problem is

devout edge
#

how do i set a specific joker to be created

dapper sun
#

?

devout edge
#

nvm ignore

dapper sun
#

oops wrong server

#

i love asking for help with the same thing on 2 different servers 😊

thorn pumice
# frosty rampart post the sticker code and the stake code
    modifiers = function()
        G.GAME.modifiers.enable_rentals_in_shop = true
    end
})

SMODS.Stake:take_ownership('stake_orange', {
    unlocked_stake = 'fanatic_viridian'
})

SMODS.Stake {
    key = 'viridian',
    
    unlocked_stake = 'fanatic_rose',
    applied_stakes = {'orange'},
    above_stake = 'orange',
    prefix_config = {above_stake = {mod = false}, applied_stakes = {mod = false}},
    
    modifiers = function()
        --G.GAME.modifiers.enable_fanatic_luxurious = true
    end,
    
    colour = HEX('239087'),
    
    pos = {x = 0, y = 0}, 
    atlas = 'fanatic_stakes',
    sticker_pos = {x = 0, y = 0},
    sticker_atlas = G.ASSET_ATLAS["stake_stickers"]
}

SMODS.Stake {
    key = 'rose',
    
    unlocked_stake = 'gold',
    applied_stakes = {'fanatic_viridian'},
    above_stake = 'fanatic_viridian',
        
    modifiers = function()
        -- nothing
    end,
    
    colour = HEX('D4426E'),
    
    pos = {x = 1, y = 0}, 
    atlas = 'fanatic_stakes',
    sticker_pos = {x = 0, y = 0},
    sticker_atlas = G.ASSET_ATLAS["stake_stickers"]
}```

```SMODS.Sticker {
    key = "luxurious",
    badge_colour = HEX('8FF8E2'),
    pos = { x = 0, y = 0 },
    atlas = 'fanatic_stickers',

    default_compat = false,
    needs_enable_flag = true,

    should_apply = function(self, card, center, area, bypass_roll)
        local is_in_shop = (area == G.shop_jokers) or (area == G.pack_cards)
        local chance = (math.random(1, 100) <= 30) --manual chance
        local is_joker = (card.ability.set == "Joker")
        --local random_chance
        return not card.ability.rental and is_in_shop and is_joker and chance
    end,
    
    apply = function(self, card, val)
        card.ability[self.key] = val
        if card.ability[self.key] then
            card.cost = card.cost * 2
            card.sell_cost = 0
        end
    end
}```
#

sorry that's huge lol

dapper sun
#

also bc they linked to a msg from here lol

frosty rampart
thorn pumice
#

oh! thank you!

#

would you bychance also know why the not card.ability.rental check doesn't actually check for rentals?

fiery bronze
#

How do I make a joker detect if an attempt to destroy it was made

frosty rampart
thorn pumice
frosty rampart
#

i think so, yes
or maybe take ownership of rental to modify its should_apply function

thorn pumice
#

gotcha, thank you :3

fiery bronze
#

I'm trying to make this effect

thorn pumice
fiery bronze
#

How does this work

#

Because i'm reading it and i'm lost

thorn pumice
fiery bronze
fiery bronze
fiery bronze
#

I'm trying to find documentation and i'm lost lol

daring fern
fiery bronze
#

I assume so because of it using context

#

but I can't for the life of me find the documentation for what check_eternal and other_card are

signal plaza
#

eternal agony and despair

daring fern
fiery bronze
daring fern
fiery bronze
#

what other card

iron haven
#

ok.

glad osprey
#

@red flower

red flower
#

FAN

devout edge
#

for some reason specifically the part where it makes a clone of itself doesn't work. everything else does but i'm not sure why this specifically fails. i've looked at the code for perkeo and judgement in vremade and i still have no clue so, as usual, i come to the balalalalatro discord in my time of need

daring fern
devout edge
#

ah

#

not gonna lie classic me move to ignore the obvious problem lmao

#

thanks my man

#

and now it's crashing because of <name> expeccted near [

signal plaza
#

THERE IS NO CHARACTER!!

#

ETERNAL AGONY AND DESPAIR!!!!!!!!

#

I LITERALLY COPIED THE JSON BASE FROM A FUNCTIONING MOD!!!!!!!!

frosty rampart
#

send the json file here
like the file itself, don't copy/paste

iron haven
#

making tarots is kinda hard for me only because my mouse can go all over the place.

signal plaza
#

i will

#

copied from Yahimod and previously that one modding tutorial i cant find
forgive me if the issues obvious i have no knowledge on lua and i called everything gay because its a test mod

frosty rampart
#

i meant like. drag the json file into discord and upload it

iron haven
#

my mouse moving around is making me angy

devout edge
#

so... can someone tell me why the game crashes when i run this code?
the rest of the joker code doesn't matter as this section isn't connected to anything other than a if/then/else command which i know works as the game crashes on line 55 (aka where this section begins)

signal plaza
#

mb

#

didnt know that was possible

#

its not

#

letting me post it

frosty rampart
devout edge
#

asides from that i have no clue

#

tbh i think it's stupid too

frosty rampart
signal plaza
signal plaza
#

or make a new file and paste the code

frosty rampart
lucid owl
#

also you should probably name the function?

frosty rampart
#

i wouldn't copy/paste

devout edge
signal plaza
#

the video i based it on was uh

#

9 months old

#

soo

devout edge
frosty rampart
lucid owl
# devout edge

remove the function(self, card, area, copier) and its relevant end

frosty rampart
#

you don't need a separate function because it's already in the calculate function

lucid owl
#

yeah that's a whole other function

devout edge
#

good to know

#

i am a noob

#

it works! huzzah!

#

only note is that for some reason the negative copy and the original switch places but that's probably just a debug+ shenanigan

signal plaza
frosty rampart
#

shouldn't be

signal plaza
#

nor windows 11?

#

alright lets hope this works

devout edge
#

ok after a tiny change it works perfectly

#

this makes my third joker (and most complicated yet) done

#

...well i need to add in the description but that should be easy

signal plaza
#

also wont let me post

devout edge
#

thanks balatro people

signal plaza
#

maybe its a visual studio setting

signal plaza
frosty rampart
#

yea i don't understand what's happening lol

#

how is it erroring when you try to upload it?

signal plaza
#

oh uh

#

i mean the only error ive seen is just the lovely logs one

#

it doesnt crash or go into debug logs (if that even happens?) it just doesnt appear because its never loaded

#

do i need extensions?

frosty rampart
#

how is it not letting you post the file in discord

signal plaza
#

i press enter

#

doesnt show

#

NEVERMIND

#

THE ISSUE WAS ME BEING A SPED

#

BECAUSE I DIDNT KNOW I NEED TO CLOSE IT TO SAVE IT ON VSC

#

SO IT HAD NO DATA

frosty rampart
#

...ah

signal plaza
#

sorry for wasting your time

frosty rampart
#

glad it's fixed lmao

signal plaza
#

thanks for helping me realize that though

#

:D

#

my code,

#

my code disappeared

#

its gone

feral tree
#

is it possible to add a seal to a specific card in the deck?

signal plaza
clear ocean
#

they ain't all going to be winners i guess

#

i think i know what's the issue being that its the list of cards discarded but is there something where it only grabs the cards you just discarded

loud summit
#

how do you disable the boss blind without causing the win screen to break

clear ocean
#

uh what?

loud summit
#

like the luchador/chicot effect

clear ocean
#

not blind.disabled for checks and disable = function(self)

loud summit
#

no i mean how do i trigger the blind to be disabled

#

without breaking

#

does it break if you call disable on a already disabled boss

clear ocean
clear ocean
#

or something weird idk

loud summit
#

that explains it then

clear ocean
#

some disables more so reverts so stuff like the wall borks

loud summit
clear ocean
#

no idea

loud summit
#

so check G.GAME.blind.disabled?

clear ocean
#

i guess?

clear ocean
loud summit
#

?

clear ocean
safe dawn
clear ocean
#

i mean depends on your scope honestly for me im going to wait until most if not all the content is finished code and design wise before a public beta

static valley
#

how do I check if I won a run with a specific joker? (this is to make an unlock requirement for a deck)

round lion
#

do negative playing cards exist in basegame (but unused)?

clear ocean
#

it's an edition so it can be used on cards but as you could probably see there's probably a reason why it's not in the vanilla game

signal plaza
#

9999999999 negative red seal kings

rocky plaza
#
local main_menu_hook = Game.main_menu
function Game.main_menu(change_context)
    local ret = main_menu_hook(change_context)
    G.SPLASH_MULTIVERSE_LOGO = Sprite(
        0, 0,
        6,
        6 * G.ASSET_ATLAS["mul_mod_logo"].py / G.ASSET_ATLAS["mul_mod_logo"].px,
        G.ASSET_ATLAS["mul_mod_logo"],
        { x = 0, y = 0 }
    )
    G.SPLASH_MULTIVERSE_LOGO:set_alignment({
        major = G.title_top,
        type = "cm",
        bond = "Strong",
        offset = { x = 0, y = 3.75 }
    })
    G.SPLASH_MULTIVERSE_LOGO:define_draw_steps({ {
        shader = 'dissolve',
    } })
    G.SPLASH_MULTIVERSE_LOGO.tilt_var = { mx = 0, my = 0, dx = 0, dy = 0, amt = 0 }
    G.SPLASH_MULTIVERSE_LOGO.states.collide.can = true
    G.SPLASH_MULTIVERSE_LOGO.dissolve = 1
    G.SPLASH_MULTIVERSE_LOGO.dissolve_colours = {Multiverse.C.PRIMARY1, Multiverse.C.PRIMARY2}
    G.E_MANAGER:add_event(Event({
        trigger = 'after',
        delay = change_context == 'splash' and 3.6 or change_context == 'game' and 4 or 1,
        blockable = false,
        blocking = false,
        func = (function()
            play_sound('whoosh1', 0.2, 0.8)
            ease_value(G.SPLASH_MULTIVERSE_LOGO, 'dissolve', -1, nil, nil, nil,
                    change_context == 'splash' and 2.3 or 0.9)
            G.SPLASH_MULTIVERSE_LOGO:juice_up(0.1,0.1)
            G.VIBRATION = G.VIBRATION + 1.5
            return true
        end)
    }))
    function G.SPLASH_MULTIVERSE_LOGO:click()
        play_sound('button', 1, 0.3)
        G.FUNCS['openModUI_Multiverse']()
    end
    function G.SPLASH_MULTIVERSE_LOGO:hover()
        G.SPLASH_MULTIVERSE_LOGO:juice_up(0.05,0.05)
        Node.hover(self)
    end
    function G.SPLASH_MULTIVERSE_LOGO:stop_hover()
        Node.stop_hover(self)
    end
    return ret
end

@sturdy compass
the hook for the main menu

#
[manifest]
version = "1.0.0"
dump_lua = true
priority = 1

[[patches]]
[patches.pattern]
target = "game.lua"
pattern = '''
if G.SPLASH_LOGO then
    love.graphics.push()
    G.SPLASH_LOGO:translate_container()
    G.SPLASH_LOGO:draw()
    love.graphics.pop()
end
'''
position = "after"
payload = '''
if self.SPLASH_MULTIVERSE_LOGO then
    love.graphics.push()
    self.SPLASH_MULTIVERSE_LOGO:translate_container()
    self.SPLASH_MULTIVERSE_LOGO.T.r = 0.08 * math.sin(G.TIMERS.REAL * 1.152)
    self.SPLASH_MULTIVERSE_LOGO.T.scale = 1 + 0.03 * math.sin(G.TIMERS.REAL * 1.06)
    self.SPLASH_MULTIVERSE_LOGO:draw()
    love.graphics.pop()
end
'''
match_indent = true
times = 1

[[patches]]
[patches.pattern]
target = "game.lua"
pattern = '''
if self.SPLASH_LOGO then self.SPLASH_LOGO:remove(); self.SPLASH_LOGO = nil end
'''
position = "after"
payload = '''
if self.SPLASH_MULTIVERSE_LOGO then self.SPLASH_MULTIVERSE_LOGO:remove(); self.SPLASH_MULTIVERSE_LOGO = nil end
'''
match_indent = true
times = 1

the lovely toml file

#

idk what im doing wrong

sturdy compass
#

You have created an atlas containing your logo sprite correct

rocky plaza
#

yes

#

it runs correctly without cryptid installed

#

but for some reason it breaks when cryptid is installed

#

i was fiddling with some stuff earlier tho while trying to fix it

sturdy compass
#

Again, that crash report is very foreign to me so I have no clue what could be causing it as everything seems to look fine. I just tested again with Cryptid and it still works fine Emoti_Shrug

rocky plaza
#

hmmmmm

#

i can go get the lovely dump

sturdy compass
#

Considering nothing is destructive you shouldn't need to

rocky plaza
#

yeah
this is a really strange crash tho

#

hmm
val being nil there is kinda sus

#

ok Astra im going to fully ctrl c ctrl v ur main menu code

#

and see if that works

#

ofc i'll change vars as needed

#

@sturdy compass i cant 😭
i literally ctrl c ctrl v'd ur code into my mod and it still gave me that same exact error

sturdy compass
rocky plaza
#

i guess my mod is eternally incompat with cryptid now

frosty rampart
#

good :)

rocky plaza
sturdy compass
#

yes

rocky plaza
#

welp

#

hold on
one last thing i can try

#

ah fuck it didnt work

vapid flume
#

this is a dumb question but how do i set ante as opposed to adding/subtracting with ease_ante

rocky plaza
vapid flume
#

oh alr thank u

rocky plaza
#

its basically setting ante to 0 then adding to it until the ante becomes what u want it to be

charred widget
#

Hello again friends, I have another issue I'm looking to resolve

#

Arceus here (praise be his name) is supposed to copy the effects of all jokers in your posession, but he's not doing that. Can someone figure out why this is not happening?

iron haven
#

Hey guys, how do I make new consumables?

loud summit
#

read the wiki

iron haven
loud summit
iron haven
loud summit
#

undocumented functions my beloved...

iron haven
#

uhhhhhhhhhh

#

I forgor to make a pack sprite. Does that matter?

#

does the pack sprites matter or no?

iron haven
loud summit
#

i dont think it technically matters

#

though you usually get consumables through packs

frosty rampart
#

do you think a sprite is going to magically come into existence for you
you need a sprite. it doesn't have to be good but you need to either implement one or point it to reuse an existing pack's texture as a placeholder

loud summit
#

i mean you dont nnnneed a pack if there are other ways to spawn it

iron haven
#

3 is ok?

frosty rampart
#

3 what

loud summit
#

packs i assume

iron haven
#

normal, jumbo, mega

frosty rampart
#

yea
it's your mod you can do literally whatever you want

#

3 packs, 35, 0, as long as you're happy with how your mod turns out

iron haven
#

maybe 0 will be better

frosty rampart
#

do the consumables show up in the shop?

iron haven
#

haven't coded it yet

iron haven
#

also consumables shouldn't have rarities

iron haven
#

SMODS.Letters...

frosty rampart
#

yea you can't just do that if it doesn't already exist in smods
unrelated but update your steamodded, latest release is 0827c

iron haven
#

taking a break..

sturdy compass
charred widget
sturdy compass
#

I think it just might be

#

Also I see y'all are getting the F treatment here... good luck

high verge
#

Found out there were metal gear cards

charred widget
sturdy compass
#

Glad I could help

calm karma
#

real dumb one, whats the G.GAME thing to access the current ante?

lavish elm
#

quick question what does integer|integer mean?

#

eg. 0|1

slim ferry
#

thats just what vscode says when something can be multiple values

daring fern
#

lavish elm
#

ok another question how to make legendaries appear in shop bc when I changed the legendary_mod value to 1 as a test the game crashed do I just take ownership of the legendaries and make them appear or what?

true jasper
lavish elm
#

but I want from it to stay 0

true jasper
lavish elm
#

I want them to appear in shop when my joker is present

#

ok as a temporary idea I will just set the weight to 0.000000000001

true jasper
lavish elm
#

oh ok thanks

lavish elm
#
SMODS.Rarity:take_ownership("Legendary", 
{
    default_weight = 1
})

test code

#

doesn't work why?

maiden phoenix
#

You also have to change the code in get_current_pool to allow them to spawn

lavish elm
#

how to do that?

maiden phoenix
#

Do you know how to lovely patch?

lavish elm
#

nope

high verge
#

I decided to add a deck back to the mgs deck for the screenshot only to remember the deck back doesn't show up in the cards view

lavish elm
#

newbie here

maiden phoenix
calm karma
#

hi, im trying to work out how id do this, but i got no clue

#

im trying to print something to the console when it is the end of the round and the last played hand was a high card

#
if context.end_of_round and context.scoring_name == "High Card" then
                return true
            end

thats what i had

#

im trying to make more achievements, but im figuring out how stuff like this works, starting simple before making it more complicated

#

i just cant figure it

lavish elm
#

anyways thanks I will try to figure it out

maiden phoenix
#

Look how other mods use it too it's a good reference point 👍

#

Usually they're in lovely folders within the mod, or .toml files

high verge
#

I'll release the deck probably tomorrow

lavish elm
#

ima look at cryptid(big mistake probably)

hidden mirage
#

how to find how many cards are being drawn in context.drawing_cards

hidden mirage
#
        if (context.setting_blind) or (context.before and G.GAME.current_round.hands_left == 1)then
            card.ability.extra.activate = true
        end
        if context.drawing_cards and card.ability.extra.activate then
            card.ability.extra.activate = false
            G.E_MANAGER:add_event(Event({
                func = (function()
                    card:juice_up()
                    play_sound('cardFan2', 0.9 + math.random() * 0.1, 0.8)
                    return true
                end)
            }))
            return {
                cards_to_draw = context.amount + card.ability.extra.extra_cards
            }
        end
    end```why did this trigger when opening a tarot pack
daring fern
hidden mirage
alpine tulip
#

Hi, new to modding. I just wanted to ask about blueprint_effect. I've read some of the other issues people have had and tried implementing it but im not sure why its not returning the 'other_joker_effect' despite in testing, the joker triggering the message that is also within the return statement (this also goes for card ability.extra.count == 1 not working as well)

daring fern
#

Also what is the goal?

alpine tulip
#

the goal i have is basically when you play gold cards, it grants retriggers to the adjacent joker ala blueprint. once the the retriggers have been used, it resets.

#

basically its gonna give bursts of retriggers fueled by gold cards

daring fern
alpine tulip
#

yes kinda
[edit cause im half asleep and didnt realise what im saying]

  • i want gold cards to store retriggers based on the amount played so if you wanted to save the retriggers, you could move this joker to the far right and have it not activate
daring fern
# alpine tulip yes kinda [edit cause im half asleep and didnt realise what im saying] - i want ...
if ((G.play and G.play.cards > 0) or card.ability.extra.count > 0) and context.retrigger_joker_check then
    local other_joker, failed = nil, false
    for k, v in pairs(G.jokers.cards) do
        if v == card then
            if i == #G.jokers.cards then failed = true end
            other_joker = G.jokers.cards[i+1]
        end
    end
    if context.other_card == other_joker then
        local count = card.ability.extra.count
        for k, v in pairs(G.play.cards or {}) do
            if SMODS.has_enhancement(v, 'm_gold') then
                count = count + 1
            end
        end
        card.ability.extra.count = (failed and card.ability.extra.count) or 0
        if failed then return nil end
        if count > 0 then
            return {repetitions = count}
        end
    end
end
alpine tulip
#

thanks a bunch. also would this retrigger context work for jokers that don't score? for instance in my current attempt at an implementation, if there is not a compatible joker i wanted the count to remain at whatever many gold cards were played so that the retriggers could be stored for use with other non scoring jokers.

alpine tulip
#

would i have to include another context for other situations for retriggers to occur (example: discard context for mail-in-rebate)?

daring fern
alpine tulip
#

ok sweet

rare torrent
#

how to i show a sticker tooltip using the "info_queue[#1116390750314307698_queue+1] = G.P_CENTERS.s_star"?
what's the sticker prefix basically

wild berry
#

but smods has this function

#

how come it doesnt work

#

more info

frosty rampart
frosty rampart
wild berry
#

oh

frosty rampart
#

it's only a feature in 0827

wild berry
#

well, im trying to make my mod compatible with a mod that relies on the old version im on

#

is it possible to port the smod function

#

into my mod

long sun
#

why is this patch not printing anything?

wild berry
#

have you set the Card's phanta?

#

or wait

#

try doing a test print by doing

#

print(type(card.phanta_dimmadomeextra))

long sun
#

👍

wild berry
#

when its initialized

#

and then do another print before you do the if check

long sun
#

table

#

the second log line didn't run

#

so i'm assuming set_hard_T isn't actually being called, then

#

which is fine

daring fern
wild berry
long sun
#

right ;u;

#

thanks

wild berry
#

anyone know why this always returns 0?

#

im using it during context.final_scoring_step

daring fern
long sun
#

where does Balatro set the tilt of the children in a Card, when it's being hovered?

wild berry
#

where does smods use SMODS.calculate_round_score or SMODS.set_scoring_calculation?

#

aside from its apposite functions

#

that do that

vale grove
#

just a quick question how do you make probabliities update after obtaining oops all sixes?

daring fern
wild berry
vale grove
wild berry
vale grove
#

i mean in text

#

functionally it works but how do i make the text update

daring fern
wild berry
#

the first parameter of get probability vars is your card

#

second is the nominator

#

third is denominator

#

fourth is your seed

#

you'll want to use that seed later on so it calculates it correctly

daring fern
daring fern
wild berry
#

i cant count

#

corrected

#

the first and second vars are for the local ones

#

so you can use it in the description of the card

#

they will change dynamically

vale grove
#

when oops all sixes is obtained

vernal seal
#

hello, what is causing this crash?

wild berry
#

atlas?

rotund sable
wild berry
long sun
#

i'm not sure if it can be called there

wild berry
#

wdym store?

#

it would just store a 0

vernal seal
long sun
#

if you store it there in before, then maybe not

wild berry
long sun
#

i think, since it's calculating the hand after it's been played, it's like "no hand is being played so it's worth 0"

rotund sable
daring fern
long sun
#

oh, so the diffuse shader handles the hover skewing?

daring fern
long sun
#

?

#

wym

daring fern
long sun
#

dissolve* sorry

#

that's not a shader

#

oh wait you mean the variable in said shader

#

so yes then

#

i don't follow ;u; start over

#

so, what does balatro do to make cards rotate in 3D space, when hovered?

#

[aware that Balatro is 2D but it makes it appear as 3D]

#

you can't just delete all that 😭

vernal seal
wild berry
#

show the error

vernal seal
long sun
#

so your Voucher, right

#

did you give it an atlas

#

atlas = 'CustomVouchers'

#

?

#

wait nvm that's not the error anyway

wild berry
#

line numbers?

#

no wait nvm

long sun
#

you can remove the parentheses around the table you're giving Atlas

#

that's probably the issue

#

you're passing a table in as the first argument

red flower
#

that wouldn't change anything

long sun
#

nevermind :> but still do that

red flower
vernal seal
red flower
#

same crash?

#

do you have the files in the correct place? is your voucher defined after your atlas?

vernal seal
red flower
#

yeah but is the atlas code before the voucher code

vernal seal
vale grove
#

i have a more theoritcal question,
as some of you might know yahimice made a balatro mod where he has his twitch stream as a joker,
the joker gives 1 mult per 5 viewers he has,
is it possible for me to do this with how many hours a friend of mine has on a game on steam?

daring fern
vale grove
#

im pretty sure it is

#

yes it is

#

how to actually do it is probably a task for later bcs thats gonna require alot of effort

#

but im happy to hear you think its possible

loud summit
#

i mean you just need to make a SMODS.http and query a public steam api

long sun
#

i give up trying to make Doug Dimmadome cleverly ;u;

#

i'm just gonna make a gigantic sprite

#

maybe later, if i'm smarter, i can improve it

daring fern
long sun
#

grand, thanks

#

i don't get it

#

in both 1x and 2x

#

why is this one Joker doomed to not work 😭

daring fern
long sun
#

yeah i don't know why it wouldn't exist

daring fern
long sun
#

-# she says, without a prefix

#

thanks :3

vernal seal
modest cradle
robust marsh
willow scroll
#

@maiden phoenix i have a question related to the fusion multi_box patch you shared with me

#

would you happen to know if i keep hovering/unhovering over a fusion card, with, lets say about 30 jokers, that it then produces lag that stays even when the card is sold?

# Add fusion ability to multibox -credit SDM_0
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = "if AUT.info then"
position = "before"
payload = """
if card and card.ability and card.ability.extra and type(card.ability.extra) == 'table' and card.ability.extra.maxboism_multi_boxes then
    multi_boxes = {}
    local _first = true
    if card.ability.extra.maxboism_multi_boxes then
        local boxes = SMODS.shallow_copy(card.ability.extra.maxboism_multi_boxes)
        for i, v in ipairs(boxes) do
            local key = v[1]
            if not G.maxboism_savedjokercards[card.sort_id] then break end
            local fusion_ui = Card.generate_UIBox_ability_table(G.maxboism_savedjokercards[card.sort_id][key])
            if _first then
               AUT.main = fusion_ui.main
               AUT.main.main_box_flag = true
               _first = false
            else
                multi_boxes[#multi_boxes + 1] = desc_from_rows(fusion_ui.main)
            end
        end
    end
end
"""
match_indent = true
#

it really kills fps and im too stupid to see why

maiden phoenix
#

Does it keep appending multi_boxes with lower fusions?

willow scroll
#

it does not

#

even with only 2 jokers in if i keep at it for like a solid 10 seconds

#

the lag dissapears upon starting a new game though

#

or leaving to the main menu

#

genuinely baffled at what the cause is because my fusion jokers work almost perfectly atm its just the multi boxes kill performance somehow?

#

or something related to them

maiden phoenix
#

Can you check if multiboxes keeps adding up internally by printing its length?

willow scroll
#

alright let me see

#

looks fine?

#

but i may be stupid let me read the whole function itself to see whats going on

#

yeah no i dont see the reason why it would be like this

static valley
#

hey quick question

#

currently adjusting a legendary joker that I made

#

is gaining x1 mult whenever a probability fails good, or is it too broken and I need to tone down the mult gain

#

wait hold on

#

lucky cards are a thing

red flower
#

yeah one hand of lucky cards would be like X7 mult

static valley
#

how about x0.5 mult gain then?

maiden phoenix
willow scroll
#

but let me try again rq

#

lmao if i disable multiboxes i can merge like 3000 jokers

rare torrent
willow scroll
#

pretty sure stickers have no prefix

#

but i do believe youre missing mod prefix

rare torrent
#

non, i do have my mod prefix

#

because if i put a joker name and j_ it appears just fine

#

but i don't want to display a joker i want to display a sticker description

#

also why does the badge say ERROR?

willow scroll
willow scroll
rare torrent
#

what does iirc mean?

willow scroll
#

if i recall correctly

rare torrent
#

ah

#

and do i put that just inside my sticker code or inside loc_text or loc_vars?

willow scroll
#

oh youre using that

#

uhh

#

no clue, sorry

rare torrent
#

goddam it's fine

lavish elm
#

so after looking at a bunch of toml files I still don't know hwo to patch nor even just add legendaries to the shop pool

modest cradle
lavish elm
#

so uh pls help

rotund sable
#

But it was label (in loc_txt) iirc

rare torrent
rotund sable
#

I even found my old screenshot of the docs :clueless:

unkempt thicket
#

I've ran into so many bugs on smods release as people mark them as a bug from the mod i'm working on. (they still occur without the mod though)

long sun
#

help ;u; what went wrong this time

#

okay changing the py value of the atlas fixes this

#

but i need it to be that value

stoic void
#

WHAT THE HELL

#

why so long

long sun
#

it's a big hat :3

stoic void
#

ah ok

modest cradle
#

Big hat

#

Real shit

long sun
#

i tried doing it with a 71×95 image but it was broken so i gave up

mystic river
daring fern
# long sun

Firstly, you shouldn't call card:set_sprites every frame, but it does nothing without inputs.

long sun
#

right

#

it is important for the animation framework, so

long sun
#

so the pos stays up to date

daring fern
long sun
#

omg yeah i removed it and nothing changed ;u;

#

thanks

daring fern
long sun
#

oh fair

#

i changed it to this but this is also not working, in the same way

wild berry
#

how can i make a joker check when another joker is being triggered

daring fern
wild berry
#

ty

stiff locust
wild berry
daring fern
wild berry
#

okay

wild berry
toxic rain
#

is there a way to loop through each rank in the full deck and check how many of each rank there is?

wild berry
#

make a table

#

add an index which has the id of the ranks

#

loop through all the deck with G.deck.cards

#

check if the card has an id equal to that

#

hold on

toxic rain
#

oh

wild berry
#

ill do the code

daring fern
wild berry
#

its optional??

loud summit
daring fern
wild berry
# toxic rain oh

local tab = {}
for n, x in pairs(G.deck.cards) do
if tab[x:get_id()] then
table.insert(tab[x:get_id()], x)
else
tab[x:get_id()] = {x}
end
end

toxic rain
#

oooh thanks

wild berry
#

np

wild berry
#

like

#

what do i add

daring fern
wild berry
#

oh

slow lotus
#

who should be the spades

daring fern
# wild berry oh
SMODS.current_mod.optional_features = function()
    return {
        post_trigger = true,
    }
end
wild berry
#

ty

#

i dont get why they have to be optional and not enabled by default though

lavish elm
#

G:delete_run()
how does this one work(it just crashes)

daring fern
toxic rain
loud summit
lavish elm
#

I got assertion failed crash

#

what does this mean?

daring fern
lavish elm
#

so how to prevent this crash when using this function

#

the new run one

daring fern
lavish elm
#
if context.joker_main then
            local rand = math.random(1,6)
            if rand == 1 then
                G.FUNCS.start_run()
            end
#

ignore the other strat run one it is just a test

#

anything?

stiff locust
#

does anyone have a code example for SMODS.gradient

frosty rampart
#

smods does

stiff locust
#

it does??

#

okay

frosty rampart
#

game_object.lua

stiff locust
#

that's pretty simple I can do that

frosty rampart
#

smods has examples of most of the stuff it implements in game_object.lua, basically redefining vanilla content in smods terms
(although i think these gradients are used for the notice that you have mod conflicts/missing dependencies)

gilded goblet
stiff locust
#

it's all just coming out as black

errant arrow
#

how do i replace a card? adding jokers that replace themself with another card once their time is up

toxic rain
#

ok so I'm mostly finished with ther joker but the bottom row of the text is Xnil when it should say the current Xmult

    key = "solo",
    loc_txt = {
        name = 'The Solo',
        text = {
            "Gives {X:mult,C:white} X1 {} Mult",
            "Gain {X:mult,C:white} X1 {} Mult for each rank without",
            "A duplicate in your {C:attention}full deck{}",
            "{C:inactive}(Currently{} {X:red,C:white}X#1#{} {C:inactive}Mult){}"
        }
    },
    atlas = 'MMM_Jokers',
    unlocked = true,
    discovered = true,
    blueprint_compat = true,
    rarity = 3,
    cost = 8,
    pos = { x = 4, y = 0 },
    config = { extra = { xmult = 1 }```
toxic rain
daring fern
vernal seal
#

hello am going to again ask of what is the problem with the atlas as i didn't managed to fix this
any help for what causes to crash the game will be very thankful
heres the error the game gives, the atlas table and the voucher file:

topaz berry
#

Im making a joker and want it to be able to copy more than 1 card in a similar way to blueprint. The SMODs API says merge_effects can be used to condense the returns of blueprint_effect. I am testing it and can not make it work. Below I have included the code for what I have so far. It currently should copy the effect of the joker to its left and the joker to its right.

calculate = function(self, card, context)
        local left_joker = nil
        local right_joker
        for i = 1, #G.jokers.cards do
            if G.jokers.cards[i] == card then left_joker = G.jokers.cards[i - 1] end
        end
        for i = 1, #G.jokers.cards do
            if G.jokers.cards[i] == card then right_joker = G.jokers.cards[i + 1] end
        end
        return SMODS.merge_effects(SMODS.blueprint_effect(card, left_joker, context),SMODS.blueprint_effect(card, right_joker, context))
    end,
}

Here is the vanillaremake blueprint code for reference

calculate = function(self, card, context)
        local other_joker = nil
        for i = 1, #G.jokers.cards do
            if G.jokers.cards[i] == card then other_joker = G.jokers.cards[i + 1] end
        end
        return SMODS.blueprint_effect(card, other_joker, context)
    end,

Could someone explain if I am using SMODS.merge_effects properly or if I am making a different error?

toxic rain
vernal seal
daring fern
# topaz berry Im making a joker and want it to be able to copy more than 1 card in a similar w...
local my_pos, effects = 1, {}
for i = 1, #G.jokers.cards do
    if G.jokers.cards[i] == card then my_pos = i end
end
if G.jokers.cards[my_pos-1] then
    effects[#effects+1] = SMODS.blueprint_effect(card, G.jokers.cards[my_pos-1], context)
end
if G.jokers.cards[my_pos+1] then
    effects[#effects+1] = SMODS.blueprint_effect(card, G.jokers.cards[my_pos-1], context)
end
if next(effects) then return SMODS.merge_effects(effects) end
vernal seal
daring fern
vernal seal
mellow thunder
#

Would it be feasible to change the background music if you're in the blind select screen and only if a specific boss blind is coming up? It's not super important, but I think it would be cool and I haven't had much luck finding anything about this

daring fern
mellow thunder
#

Oh thank you, didn't realize it would be that easy

toxic rain
#

ok i can't for the life of me figure out why im not getting the current xmult in the text, ive tried from testing it updates just fine but isn't showing up in the text, ive tried removing the local from solo_tally but that doesn't change anything (have to send the actual code in next message bc character limit)

toxic rain
# toxic rain ok i can't for the life of me figure out why im not getting the current xmult in...
SMODS.Joker {
    key = "solo",
    loc_txt = {
        name = 'The Solo',
        text = {...,
            "{C:inactive}(Currently{} {X:red,C:white}X#1#{} {C:inactive}Mult){}"
        }
    },
    atlas = 'MMM_Jokers',
    unlocked = true,
    discovered = true,
    blueprint_compat = true,
    rarity = 3,
    cost = 8,
    pos = { x = 4, y = 0 },
    config = { extra = { xmult = 1 } },
    loc_vars = function(self, info_queue, card)
         local solo_tally = 0
        if G.playing_cards then
            local ranks = {}
            for k, v in pairs(G.playing_cards) do
                ranks[v:get_id()] = (ranks[v:get_id()] or 0) + 1
            end
            for k, v in pairs(G.playing_cards) do
                if ranks[v:get_id()] == 1 then
                    solo_tally = solo_tally +1
                end
            end
            return {
                xmult = 1 + card.ability.extra.xmult * solo_tally,
            }
        end
        return { vars = { card.ability.extra.xmult, 1 + card.ability.extra.xmult * solo_tally } }
    end,
    calculate = function(self, card, context)
        if context.joker_main then
            local solo_tally = 0
            local ranks = {}
            for k, v in pairs(G.playing_cards) do
                ranks[v:get_id()] = (ranks[v:get_id()] or 0) + 1
            end
            for k, v in pairs(G.playing_cards) do
                if ranks[v:get_id()] == 1 then
                    solo_tally = solo_tally +1
                end
            end
            return {
                xmult = 1 + card.ability.extra.xmult * solo_tally,
            }
        end
    end
}```
cursive gazelle
#

File should be under assets/1x
And assets/2x

vernal seal
long sun
#

i have officially given up, this will do

toxic rain
clear ocean
#

also oops works so idk what is causing the crash actually im assuming its my code

#

looks like this crash happens regardless of the blind is disabled or not

tepid crow
clear ocean
#

huh

#

that's weird

#

why is it crashing

tepid crow
#

also I'd use context.fix_probability instead of context.mod_probability but that's probably kind of a secondary thing

clear ocean
clear ocean
tepid crow
clear ocean
tepid crow
#

the return was fine, you only need to change the if statement context check

clear ocean
#

the blind.disabled or context.fix_probability?

tepid crow
#

you only need to change if not blind.disabled and context.mod_probability then -> if not blind.disabled and context.fix_probability then yes

clear ocean
#

which i did

#

let me comment out the long

tepid crow
#

yeah, but you also changed the return to include denominator, which it shouldn't

clear ocean
#

okay it must be the radian itself because its the same crash even with horizon commented out

#

and i did remove the enominator line so not sure what's causing it now

#

and i can comment every other one out

clear ocean
tepid crow
clear ocean
#

discord momento

tepid crow
clear ocean
#

sure

#

get_new_boss()

distant junco
#

whats the prefix for booster packs?

clear ocean
tepid crow
clear ocean
#

hmm

#

so it could be the boss = { min = 1 }, line

#

not sure why though since min = 1 is allowed and all the other blinds worked

tepid crow
clear ocean
#

that could be why

clear ocean
#

wait that might be why

#

shit that might be why

#

since i changed the blind from the long to the horizon

#

please don't be why

#

mainly because it would make me stupid

#

im shawmhawking rn

tepid crow
#

weeeee

clear ocean
#

with that TWO rows are complete

#

yes yes

mellow thunder
#

So I have a consumable here that swaps your hands and discards during a blind, and if you end up with 0 hands this way you lose instantly. But for some reason after you lose this way, your playing card hand stays active and blocks everything underneath it until the game gets restarted. I've tried moving the 0 hands check pretty much everywhere, and it does the same thing. Does anyone know how to fix this?

clear ocean
#

again not the most original

#

it works kinda

#

it doesn't debuff if removed and if you add one it doesn't apply asap

#

it does take like a moment

#

not sure why

#

it's weird like it works and does update correctly but not fast enough and not sure why

frosty rampart
#

reference a similar blind (e.g. the plant or one of the suit-debuffing ones) from vanillaremade to make sure you're catching everything maybe

clear ocean
#

those simply have a debuff table i am duplicating the oyster i made which debuffs enchanced cards

frosty rampart
#

and the oyster debuffs immediately if enhancement status changes?

clear ocean
frosty rampart
#

might need to hook/patch somewhere to force the game to recalc debuff when a seal is applied (i figure it's already set up to do so when a center changes, because that's a situation that can be encountered in vanilla. like changing a card's suit during a suit-debuffing blind)

clear ocean
#

my best guess is either my code isn't optimised or well yeah that

frosty rampart
#

i doubt it's code optimization

clear ocean
#

i mean how hard would it be to hook/patch the recalc debuff and honestly would it be worth it since it does update and the deck does update when going into the blind

ocean sinew
#

how to make a booster in the consumable area that the players can open

clear ocean
#

immediately going into the blind

#

the reason it looks like unfinished art wise since im going to go ahead and work on the code so i can worry about art later

ocean sinew
#

how to create booster packs in the consumable area

clear ocean
#

what do you think of this idea?

ocean sinew
#

Killer blind

clear ocean
#

removing all does make it more compact

#

that's enough for tonight going to get ready for bed and play some new horizons

gusty iron
#

how would i go about patching a 4th blind into every ante?

upbeat bronze
#

ok so im learning joker forge a bit

#

trying to figure out how i'd have a joker create one of two different tags when a blind is skipped

twilit wing
#

i wanna make a joker that does something only when money is subtracted or taken away

#

is there a event for that?

feral tree
#

difference between ease_background_colour and ease_background_colour_blind?

gusty iron
#

oh GOD WHAT DID I DO TO THE SCALING

jolly shadow
#

seems fair probably

loud summit
#

green stake on stereoids

gusty iron
#

OH GOD

#

(Scaling is Ante{Ante}Ante)

#

(+300 as a base)

loud summit
#

literally impossible

gusty iron
loud summit
#

true

#

maybe if you get a shippost joker

gusty iron
#

Its mainly to prepare for a new rarity im making

#

Where basically if you get it on any other stake besides YF, you kinda just win

loud summit
#

oh

fallow breach
gusty iron
#

you need to set card first, i believe.

gusty iron
mild bronze
mild bronze
#

Lots of things

#

N{n} scailing off triggers and money, every cent is +1 for n and every trigger, like opening packs and really anything gives +1

#

^ mult on conditions

#

^^ chips and mult

#

Luck changes

#

Luck chances

#

Setting changes

#

^^^^^^^ mult if you have only this joker

#

Busted scailing

#

X mult

#

X chips

#

Joker creation

#

Consumable creation

#

+1 slots for everything, joker slots, consumable slots, and all that

#

Its own mini guys (like summons basically)

#

More stuff

#

Uhh

#

Yeah

gusty iron
#

What if I just make it so that the youre fucked stake immediately crashes the game upon getting that joker

mild bronze
#

Then i'm fucked, duh

#

Maybe the half chapter would work tho

stiff locust
mild bronze
#

Its a little worse but still good

frosty rampart
mild bronze
gusty iron
#

The rest get put as zeroes

#

So 301 -> 300
304 -> 300

#

As im relatively sure thats how the base game does it too

charred widget
#

What is the if statement for the highest ranked card in a played hand?

frosty rampart
#

there uh
isn't one

you need to loop through the played hand and find the highest rank that way

charred widget
#

i see

#

and how would i do that?

frosty rampart
#

set a local highest_rank to 0 before the loop, loop through the played hand, and if the current card has a higher rank than the current highest rank you store that new rank in highest_rank. at the end of the loop you now have the highest rank
if you're in context.individual, you can now check if the current card (i.e. context.other_card) has the highest rank, and if it does do whatever (if you wanted to do something when the highest rank is scored)

harsh belfry
#

set the local highest_rank to -math.huge instead because if someone makes a negative rank for some reason the code is exploded

mild bronze
#

I forgot how to do lua i do like 4 coding languages and have short term memory loss

frosty rampart
#

if someone makes a negative rank for some reason i will kill them with hammers /j

shell timber
charred widget
frosty rampart
#

try it on your own first :3

mild bronze
#

I'm gonna get gunned down because of my -4 card rank now

charred widget
#

ok so there's local in the joker I'm working on, but it's under update = function

#

can i do local in calculate = function?

frosty rampart
#

yea you can do local anywhere
it essentially just means that as soon as you leave the function, the variable ceases to exist

#

you don't want to leave stray variables lying around, if that makes sense

stiff locust
#

you ever think about that one mr bat man

charred widget
#

actually better question, does card.rank exist as a variable

faint yacht
#

card.base.suit, card.base.value, card.base.id, card.base.nominal...

charred widget
#

so value in this case would be the rank?

faint yacht
#

As string.

charred widget
#

so I think i want rank

#

because i don't think the loop would be looking for a string

#

unless i am mistaken

faint yacht
#

ID is number.

stiff locust
#

but what if it was a table

charred widget
#

alright, how would i loop through played cards

stiff locust
#

for index, value in ipairs(G.play.cards) do

#

best time to do this is during context.before or context.after

#

do before if you want it to affect scoring and after if you don't

charred widget
#

well what I'm trying to do is find a card with the Cell edition, as well as the highest rank in the played hand, and retrigger that card twice

stiff locust
#

it's best you run value:get_id() to get the rank of the cards, that makes it compatible with modded effects that change ranks

#

returns an integer, aces are 14 it's aces high

#

for edition check if value.edition and value.edition.key == "e_modprefix_editionkey" then

#

the first part here checks value.edition exists, otherwise it'll crash if the card has no edition

charred widget
#

I already have the edition checking set up

spring osprey
#

hey, im trying to make a joker similar to steel joker that counts the Ace of Spades in ur deck and idk where i went wrong but its only doing x1 no matter how many ace of spades i have

    config = {
        extra = {
            x_mult = 0.1,
            ace_tally = 1
        }
    },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.x_mult, card.ability.extra.ace_tally } }
    end,
    calculate = function(self, card, context)
        if context.before then
            for k, v in pairs(G.playing_cards) do
                if v:get_id() == Ace and v:is_suit('Spades', nil, true) then card.ability.ace_tally = card.ability.ace_tally + 1 end
            end
        end
        if context.joker_main then
            return {
                Xmult_mod = 1 + card.ability.extra.x_mult * card.ability.ace_tally,
                message = 'X' .. card.ability.extra.x_mult,
                colour = G.C.MULT
            }
        end
    end
}```
stiff locust
spring osprey
#

OHHHH

#

lmao

#

thats ez fix ty

stiff locust
#

yeah

stiff locust
#

after you check the rank and edition of the card in context.before, set a flag on the correct card

#

like value.modprefix_hit, something that won't be used by other mods

#

like how c dagger applied card.getting_sliced to mark stuff

#

then in if context.repetition and context.cardarea == G.play then
you can check if the card has the flag modprefix_hit and retrigger that card twice return { repetitions = 2}

#

and then in context.after go through all the cards in the played hand again and remove the flag from all of them

#

technically you could just run the iterate through cards in context.repetition and ... that is really unoptimised and will run the loop way too many times, since context.repetition already goes through all the played cards once

charred widget
#

you know what

#

this coding stuff is too much work for my brain at 11:53 pm

#

I'll do this tomorrow

stiff locust
#

that's fair

mild bronze
#

I need sleep I'm hallucinating

stiff locust
#

keep at it but sleep first

#

coding is really rewarding when you get it down

mild bronze
#

There are multiple black figures outside my house

stiff locust
mild bronze
#

Maybe

loud summit
mild bronze
#

I'm in the dark fountain help

stiff locust
spring osprey
stiff locust
#

during loc_vars and during context.before for the joker to give accurate benefits

#

all code inside the loc_vars block runs when you hover over the joker

#

that makes sure it always displays the right value

spring osprey
#

oh thats convenient ty

stiff locust
#

mhm

stoic void
#

what do I do

daring fern
stoic void
#

I have to go now, didnt know the time

#

I will not understand wht that means but the time I get back home]

true jasper
#

@stoic void

-- code here
end```

```remove_from_deck = function(self, card, from_debuff)
-- code to reverse effect here
end```
stoic void
#

Ah ok

#

Thx

daring fern
stoic void
#

So calculate = function(self,
Card, from_debuff)
Code
end

true jasper
daring fern
#

lavish elm
#

can you export stuff from forge into lua?

rotund sable
#

On the sidebar

lavish elm
#

ok thx

long sun
#

is there a pool for every center in the game? (including Jokers, Tags, Consumables)

#

or do i have to loop over G.P_CENTERS and G.P_TAGS separately

daring fern
long sun
#

right

#

okay i may as well explain what i wanna do

wispy falcon
#

Is there a mod to start with a custom deck? I need it for testing some stuff

long sun
#

i'm making stakes similar to Ortalab's, that only allow Vanilla and Phanta content, and only Phanta Jokers

#

so i need to hook their in_pools

daring fern
long sun
#

wait fair ;u;

#

idk i'll try a different method