#💻・modding-dev

1 messages · Page 617 of 1

daring fern
#

Yes.

vale grove
#

because its funny

clear ocean
#

Reminds me of spyro 3 in the eu copy when it trips of the anti piracy it changes the languages at timss

vale grove
vale grove
#

so

clear ocean
#

Also your pfp is fire

vale grove
#

i think its funny to add that as a joker

vale grove
clear ocean
#

Persona i think with that sponge bob money meme

vale grove
#

yes

#

persona 2 maya

clear ocean
#

Ah yes the one with hitler

vale grove
#

yes

#

i love persona 2

#

its so goated

daring fern
vale grove
#

but yeah to answer your question

solid salmon
#
SMODS.Joker {
    key = 'checkered_deck_joker',
    loc_txt = {
      name = 'Checkered Deck Joker',
      text = {'creates {C:tarot}sun{} card and {C:tarot}world{} card after leaving shop'}
   },
   rarity = 2,
   pos = {
      x = 0,
      y = 0
   },
   cost = 3,
   discovered = true,
   config = {consumables = {'c_sun', 'c_world'}},
   loc_vars = function(self, info_queue, card)
        return {
            vars = {
                localize { type = 'name_text', key = card.ability.consumables[1], set = 'Tarot' },
                localize { type = 'name_text', key = card.ability.consumables[2], set = 'Tarot' },
            }
        }
    end,
    calculate = function(self, card, context)
    if context.ending_shop and not context.individual and #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
        G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
           G.E_MANAGER:add_event(Event({
            func = function()
                for k, v in ipairs(card.ability.consumables) do
                    SMODS.add_card({ key = v })
                end
                return true
            end
        }))
end
end,
atlas = "checkered_deck_joker"
}
SMODS.Atlas {
    key = "checkered_deck_joker",
    path = "checkered_deck_joker.png",
    px = 71,
    py = 95
}

is there a way to make this give the world, then the sun

#

oh wait

dapper sun
#

asking again since quite a bit of time has passed

#

how do make an info_queue of modded jokers with custom values

#

on vanilla jokers it works fine but on modded ones it doesn't

#

i've tried all sorts of things

vale grove
#

what exactly are you trying to do?

dapper sun
#

a prieview for my mod's upgrade system

#

which turns one joker into another, but can carry over some relevant values

#

and i want those changed values to show in the preview

vale grove
#

one stupid fix, did you add your mod prefix?

dapper sun
#

yes

vale grove
#

what you could do is make a custom infoqueue

dapper sun
#

and how would i do that

#

i've been told that by multiple people but i was never told how

vale grove
#

like i have a joker that eats food jokers and i made little info queues for them to see what you would gain

vale grove
dapper sun
#

and would i be able to make it autogenerate or would i have to copypaste each joker description for the preview versions?

vale grove
#

well you can copy the text

#

one sec

dapper sun
#

_ _

vale grove
#

Popcorn = {
name = "Popcorn",
text = {
"gives {C:mult}+10{} Mult"
}
},
this is what i did for popcorn

dapper sun
#

i don't want to have to copy-paste the text

vale grove
#

you can copy the description and put in text

dapper sun
#

since i'd have to do that for every upgrade

vale grove
#

i don't think so

#

im not sure tho

#

dont take my word as fact

#

bcs im very new to this scene myself 😭

dapper sun
#

ideally i want to be able to have it automatically make the description by just setting the upgrade joker and the changed values

#

without having to make a second description

dapper sun
vale grove
#

well back to your original thing

#

you probably have to cast moddd jokers in a different way

#

because of how smods works

#

the issue is how which idk bcs i have not done anything of the sort

dapper sun
dapper sun
daring fern
dapper sun
#

where would i put this

daring fern
dapper sun
#

ok

#

i'll try it

#

omg

#

the vars aren't quite working but it's actually showing the description now

daring fern
dapper sun
#

wait i forgot to set vars

#

that'd do it

sharp arch
#

guys quick how do i remove the titloe screen card

daring fern
sharp arch
#

so i just put that in my code right

dapper sun
#

on a semi-related note, anyone got np++ formatting for lovely patches? i found one a while back and it isn't compatible with my dark mode theme (the text has white bg)

vale grove
daring fern
#

sharp arch
#

it goes in a SMODS.Current_mod calculate function right

dapper sun
# daring fern Code?
if (_c.elle_upgrade) then
    local t = G.P_CENTERS[_c.elle_upgrade.card] -- Upgrade target
    local j = copy_table(G.P_CENTERS[_c.elle_upgrade.card].config.extra) -- OG Joker's vars
    local u = _c.elle_upgrade.values and _c.elle_upgrade:values(card) or {} -- 
    
    -- Upgrade variable stuff
    
    for i,v in pairs(u) do
        j[i] = v
    end
    
    local test = SMODS.shallow_copy(t)
    test.loc_vars = function() return {vars = j} end
    
    info_queue[#info_queue+1] = test
end```
sharp arch
daring fern
sharp arch
daring fern
vale grove
daring fern
vale grove
#

but what is the key of a language?

#

or are you talking about the joker?

#

or my mod?

#

im so confused

sharp arch
dapper sun
#

how do i get a joker's default loc_vars

sharp arch
#

ignore the stuff in the hook

#

(specifically the part after the remove)

umbral zodiac
#

also from_debuff is unneccessary

sharp arch
umbral zodiac
#

ya then id just recommend putting the original beforehand and then i will not ignore the hook itself because its perfectly fine

sharp arch
#

which one is the original

umbral zodiac
#

like

#

local ret = ...

#

unless you have a unique reason to put code before the original code runs i would usually recommend putting it afterwards, especially if youre modifying the end result like what cards are on the main menu

sharp arch
#

so like this, or do I also have to move the return

umbral zodiac
#

no thats good

#

return would end the function anyway

#

so it kinda has to be last

sharp arch
#

... it didnt work 😢

umbral zodiac
#

crashed or just did nothing

sharp arch
umbral zodiac
#

oh

#

you need to keep self in the game_main_menu_ref

#

that's good, its just that from_debuff doesn't exist so it has no reason to be there

sharp arch
#

where self would go is empty

umbral zodiac
sharp arch
#

oh i need to add it ok

umbral zodiac
#

you had it earlier and i assum you removed it alongside the from_debuff part

sharp arch
#

it worked thanks man

daring fern
dapper sun
#

?

#

what'd the card be in this context?

dapper sun
daring fern
dapper sun
#

ok?

#

a card of the joker i'm trying to make an info_queue of?

dapper sun
#

how do i make a fake card?

daring fern
dapper sun
#

thanks

hardy vessel
#

Is there a way to check when a card gets enhanced by any means?

dapper sun
#

how do i change/modify the name of the fake card?

daring fern
daring fern
dapper sun
#

i wanna have it say, for example,, Upgrade - Hanging Chad

vale grove
dapper sun
#
local upgrade_fake_card = SMODS.Center.create_fake_card(upgrade_center)
local upgrade_loc_vars = upgrade_fake_card:generate_UIBox_ability_table(true)```this is giving an error,, ,
dapper sun
#

upgrade_center is the G.P_CENTERS entry for the joker

#

where are the logs stored

#

or is it just the error

daring fern
dapper sun
#

for context, this is a patch

#

hence it being common_events

daring fern
# dapper sun

Card.generate_UIBox_ability_table(upgrade_fake_card, true)

dapper sun
#

ah ty

#

full code for ref

-- Upgrade support
if (_c.elle_upgrade) then
    local upgrade_center = G.P_CENTERS[_c.elle_upgrade.card] -- Upgrade target
    local upgrade_config = copy_table(upgrade_center.config) -- OG vars
    local upgrade_vars = _c.elle_upgrade.values and _c.elle_upgrade:values(card) or {} -- 
    
    -- Upgrade variable stuff
    for i,v in pairs(upgrade_vars) do
        upgrade_config.extra[i] = v
    end
    
    local upgrade_fake_card = SMODS.Center.create_fake_card(upgrade_center)
    local upgrade_loc_vars = Card.generate_UIBox_ability_table(upgrade_fake_card, true)
    
    local test = SMODS.shallow_copy(upgrade_center)
    --test.config = function() return upgrade_config end -- commented so i can add it after
    test.loc_vars = function() return {vars = upgrade_loc_vars} end
    
    print(upgrade_vars)
    
    info_queue[#info_queue+1] = test
end```
hardy vessel
daring fern
dapper sun
#

oh ty

dapper sun
#

still niling but not crashing anymore

#
if (_c.elle_upgrade) then
    local upgrade_center = G.P_CENTERS[_c.elle_upgrade.card] -- Upgrade target
    local upgrade_config = copy_table(upgrade_center.config) -- OG vars
    local upgrade_vars = _c.elle_upgrade.values and _c.elle_upgrade:values(card) or {} -- 
    
    -- Upgrade variable stuff
    for i,v in pairs(upgrade_vars) do
        upgrade_config.extra[i] = v
    end
    
    local upgrade_fake_card = SMODS.Center.create_fake_card(upgrade_center)
    local upgrade_uibox = Card.generate_UIBox_ability_table({ability = upgrade_config, config = {center = upgrade_center}})
    
    local test = SMODS.shallow_copy(upgrade_center)
    test.loc_vars = function() return {vars = upgrade_uibox} end
    
    print(upgrade_vars)
    
    info_queue[#info_queue+1] = test
end```
daring fern
dapper sun
#
Table:
badges: Table:
  card_type: None

info: Table:

type: Table:

main: Table:
  1: Table:
    1: Table:
      config: table: 0x2b9d52f0
      +1 more value.


  2: Table:
    1: Table:
      config: table: 0x2b7af798
      +1 more value.

    2: Table:
      config: table: 0x2b7c2e00
      +1 more value.


  3: Table:
    1: Table:
      nodes: table: 0x2bfae1c0
      +2 more values.

    2: Table:
      config: table: 0x2b4af738
      +1 more value.


  4: Table:
    1: Table:
      nodes: table: 0x2b9e85d8
      +2 more values.



card_type: None
name: Table:
  1: Table:
    nodes: Table:
      1: table: 0x2b832000

    n: 4
    config: Table:
      align: m



box_colours: Table:```
#

oh wait should i tprint it

daring fern
dapper sun
#

ah ok

#

nil

daring fern
dapper sun
#

if u think it'd make things easier for u tho

#
if (_c.elle_upgrade) then
    local upgrade_center = G.P_CENTERS[_c.elle_upgrade.card] -- Upgrade target
    local upgrade_config = copy_table(upgrade_center.config) -- OG vars
    local upgrade_vars = _c.elle_upgrade.values and _c.elle_upgrade:values(card) or {} -- 
    
    -- Upgrade variable stuff
    for i,v in pairs(upgrade_vars) do
        upgrade_config.extra[i] = v
    end
    
    local upgrade_fake_card = SMODS.Center.create_fake_card(upgrade_center)
    local test = SMODS.shallow_copy(upgrade_center)
    
    local upgrade_uibox = Card.generate_UIBox_ability_table({ability = upgrade_config, config = {center = test}}, true)
    test.loc_vars = function() return {vars = upgrade_uibox} end
    
    print(upgrade_uibox)
    
    info_queue[#info_queue+1] = test
end```
#

here :3

daring fern
# dapper sun here :3
if (_c.elle_upgrade) then
    local upgrade_center = SMODS.shallow_copy(G.P_CENTERS[_c.elle_upgrade.card]) -- Upgrade target
    upgrade_center.config = copy_table(upgrade_center.config) -- OG vars
    local upgrade_vars = _c.elle_upgrade.values and _c.elle_upgrade:values(card) or {}
    
    -- Upgrade variable stuff
    for k, v in pairs(upgrade_vars) do
        upgrade_center.config.extra[k] = v
    end
    
    local upgrade_uibox = Card.generate_UIBox_ability_table({ability = upgrade_center.config, config = {center = upgrade_center}}, true)
    upgrade_center.loc_vars = function() return {vars = upgrade_uibox} end
    
    print(upgrade_uibox)
    
    info_queue[#info_queue+1] = upgrade_center
end
```?
dapper sun
#

still niling

#

it's 1am, i think this is a tomorrow problem

charred widget
#

Hi friends! I have an idea that's a bit more simple but I'm still gonna need help with.

#

I know The Fool generates the last used planet/tarot card, and there's a direct function for that, but is there a specific way to gather the last consumable of any type?

#

Or would I have to set up a loop that constantly checks for it?

faint yacht
#

You could attach a calculate to your mod object, then set a global variable under G.GAME to the key of context.consumeable whilst checking for context.using_consumeable.

charred widget
#

Could you walk me through it?

faint yacht
#
SMODS.current_mod.calculate = function(self, context)
  if context.using_consumeable and context.consumeable then G.GAME.last_used_cons = context.consumeable.config.center.key end
end
native cargo
#

I know if I want to modify the base code with a mod I use a lovely patch, I was able to create a new card area that I plan to do something with, but I seem to be having trouble manipulating the UI to shrink the run info and options buttons. I've been referencing other mods that manipulate the UI to see how it's done but no matter what I do, even if it's a simple color change just to sanity check, it doesn't work.

charred widget
faint yacht
#

Anywhere outside of SMODS.Joker and what not.

charred widget
#

could I put it in the main file?

faint yacht
#

Ye.

charred widget
#

so how would I call this function as a joker effect?

#

per say, if I were to use if context.setting_blind then

cerulean rose
charred widget
umbral zodiac
#

you use _ instead of .

charred widget
umbral zodiac
#

not really

faint yacht
#

In a Joker,

if context.setting_blind then
  if G.GAME.last_used_cons and G.P_CENTERS[G.GAME.last_used_cons] then
    -- Assuming The Fool-like behaviour of giving last used consumable...
    SMODS.add_card({key = G.GAME.last_used_cons})
  end
end
umbral zodiac
#

you dont index the table center but , its not like indexing one table has a downside

charred widget
#

alright I'll see how it works

#

Works as intended! Thank you friends ^v^

young leaf
#

im trying to do something pretty simple here but i am unfortunately struggling
so im basically trying to make ride the bus, but instead of resetting with scoring face cards it resets when an ace is discarded
this is the code:

    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.mult_gain, card.ability.extra.mult } }
    end,
    calculate = function(self, card, context)
        if context.discard and not context.blueprint then
--- ".discard" was originally ".before"
            local aces = false
            for _, playing_card in ipairs(context.discard) do
--- ".discard" was originally ".scoring_hand"
                if playing_card:is_ace() then
                    aces = true
                    break
                end
            end
            if aces then
                local last_mult = card.ability.extra.mult
                card.ability.extra.mult = 0
                if last_mult > 0 then
                    return {
                        message = localize('k_reset')
                    }
                end
            else
                card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_gain
            end
        end
        if context.joker_main then
            return {
                mult = card.ability.extra.mult
            }
        end
    end
}```
this is vanillaremade's ride the bus but with  every mention of "face" and "faces" being replaced with "ace" and "aces"
I also replaced the context with context.discard
Surprisingly, just replacing every mention of "face" and "faces" with "ace" and "aces" makes it work, but replacing the context makes the joker just do nothing
Im not sure what would get this to work, i cant really find a good reference for this sorta thing
cerulean rose
#

Card:is_ace() doesn't exist

sonic cedar
modest sedge
#

How do I change the weight of a consumable, the likelihood of it appearing in a booster pack
Is it just weight = [number]?

#

nvm i got it
I think it's soul_rate = [number],

obsidian spear
#

how to check what blind is next, or all blinds

cerulean rose
obsidian spear
#

tyyyyyyyyyyyyyyy

lament agate
frosty rampart
# modest sedge nvm i got it I think it's `soul_rate = [number],`

if your consumable isn't hidden (i.e. like how soul and black hole work), then i don't think this does anything
and note that if you do decide to make it hidden, soul_rate is the probability that it replaces any given card in its booster packs, so it might not behave as expected. if it's common enough, it might appear multiple times in a single booster pack

#

to have non-hidden rarities, i think you'll need to set the consumabletype to have rarities in the first place and assign that rarity to the consumables
(maybe check how hotpot bottlecaps work?)
if you don't want whole rarities, then you'll probably have to do it in the booster's create_card function

modest sedge
frosty rampart
#

yea it's not. a great resource

#

great mod, not good for referencing code lol

#

shoutouts to the whole file that's nothing but commented out ui code

sturdy compass
#

As the guy who organized hotpot, do not use hotpot as a resource

#

😭

honest bridge
#

Hey guys! Trying to get this to work again where the card destroys itself when you click on it and I cannot for the love of me figure out why this aint working

honest bridge
daring fern
honest bridge
# daring fern You don't.

I tried puttting it outside the joker script but it still doesn't work for me is it still in the joker?

cerulean rose
#

see yahiamod/el wiwi

elder rune
#

Is there a way to make create_card() create cards you already have in your tray as if showman were there

daring fern
mossy anchor
#

how do i make a new playing card
i dont mean smth like stone because afaik thats just a fancy enhancement

#

and is there a way to do special things when the new playing card is played like how enhancements do it without a enhancement

#

like, smth seperate from the rest of the regular cards

cerulean rose
#

not supported without another mod

mossy anchor
#

ah whats the other mod

#

i dont really care about low dependencies

honest bridge
young leaf
#

@daring fern you mentioned the negative joker stuff in #⚙・modding-general i just wanted to move it over here
it probably has something to do with the calculate function but uh

    calculate = function(self, card, context)
        if context.joker_main and card.edition and card.edition.negative then
            return {
                xmult = card.ability.extra.xmult
            }
        end
    end
}```
this is not working :(
bleak shore
#

Hi everyone , i was wondering how can i put like a joker in the deck on hand area , i tried to just change his cardarea but yeah it didn't work , any idea ?

mossy anchor
civic solstice
#

hey guys uhhh i was tryna make the final file for a beta tester version of my mod

#

why are my decks doing this

#

also the backing is wrong on this

gusty iron
#

i love drawing placeholders 😭

civic solstice
gusty iron
#

idk how ill implement the light sources

#

but i have charms and hiding spots planned out

#

speaking of charms.....

#

oh my GOD its so much easier to draw 120 on paper

candid acorn
#

does anyone know how can i make the player 'draw' a card?

#

or just check the top card of deck

gusty iron
#

by draw do you mean like

#

actually drawing to their hand

candid acorn
#

yes

#

just adding the top card of deck to hand

#

to be able to interact with it

red flower
red flower
candid acorn
#

tysm

gusty iron
#

holy peak...

#

whats the table for scored cards again

proper crystal
#

is there a way to make a sound when a Tarot card (in this case the fool) is used? im really new to this

gusty iron
#

i made a helper function to shuffle the table, but when i run it, nothing happens for some reason

gusty iron
proper crystal
#

defined as in like in the files of the game?

gusty iron
#

defined an in

#

SMODS.Sound

proper crystal
#

oh

#

then no

gusty iron
#

first define the sound

#
-- basic sound definition
SMODS.Sound{
 key = "key", -- the key
 path = "path" -- the path
 pitch = 1 -- the pitch
}
#

leave pitch empty if you want it to be random

proper crystal
gusty iron
#

okay so just include key and path

proper crystal
#

one of the questions i have is where should i place the code?

gusty iron
#

so what exactly is playing the sound?

#

a joker?

proper crystal
#

oh well i wanted to play when the fool is used

#

so i started to look into how to do it but i find it pretty confusing

gusty iron
#

so the game is playing the sound

#

?

proper crystal
#

i think so

#

sorry if im being a little confusing

gusty iron
#

okay lemme cook 👍

proper crystal
gusty iron
#

SMODS.current_mod.calculate = function(self, context)
if context.using_consumeable and not context.blueprint and context.consumeable.config.center.key == 'c_fool' then
return {
sound = "your sound key"
}
end
    end
end

i thiiink this should be right

#

do make sure to include your mod prefix before the key though

proper crystal
#

im still a little confused as to where do i place this?

#

as of now i only have my notes app to well take notes

gusty iron
#

literally ANYWHERE in your mod

#

...wel not anywhere

#

but any open area in the code

proper crystal
#

okay

#

thank you

#

ill go to check if it works and come back if i have any issues

obsidian spear
#

Okay i have this function I wanna hook to or patch, and end goal is adding an extra condition to desired track

#

yes this is like important that i do it this way

#

would patching or hooking be better here

#

patching right?

ashen drift
#

in this case patching would be better

gusty iron
#

yeah patching seems like the right choice

willow scroll
#

why is hooking or patching get_current_music not something that would work? but yeah patching would be better in this case

obsidian spear
#

alright

gusty iron
# gusty iron holy peak...

update on this,

i got the cards to shuffle VISUALLY, but they still score in order of what you played it in, any help?

candid acorn
#
        for i = 1, math.min(#G.hand.highlighted, card.ability.max_highlighted) do

            local _card = G.hand.highlighted[i]
            --local cardFound = false

            while G.deck.cards[#G.deck.cards]:get_id() =! _card:get_id() then do <--- THIS IS LINE 143
                G.E_MANAGER.add_event(Event({func = function()
                    G.deck.cards[#G.deck.cards]:remove()
                end}))

            end
            G.E_MANAGER.add_event(Event({trigger = 'after', delay = 0.2,func = function() G.hand:unhighlight_all(); SMODS.draw_cards(1); return true end }))

        end

    end```
#

could anyone help me with this

#

ill send the error

#

You
12:44 pm, Nov 8, 2025
Oops! The game crashed:
[SMODS _ "src/loader.lua"]:571: [SMODS CONSP "ConsumablesPlus.lua"]:143: 'do' expected near '='

Additional Context:
Balatro Version: 1.0.1o-FULL
Modded Version: 1.0.0~BETA-1016c-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.8.0
Platform: Windows
Steamodded Mods:
    1: TwS EPOK testmid by ME [ID: CONSP, Version: 1.0.0]
    2: Cryptid by MathIsFun_, Cryptid and Balatro Discords [ID: Cryptid, Priority: 114, Version: 0.5.13, Uses Lovely]
    3: Debug Plus Plus by Jogla [ID: dpp, Version: 1.2.0, Uses Lovely]
    4: Talisman by MathIsFun_, Mathguy24, jenwalter666, cg-223, lord.ruby [ID: Talisman, Version: 2.6, Uses Lovely]
    5: Vocalatro by Aikoyori [ID: vocalatro, Version: 1.0.0, Uses Lovely]
    6: DebugPlus by WilsontheWolf [ID: DebugPlus, Version: 1.5.1, Uses Lovely]
Lovely Mods:```
gusty iron
#

i got it to work :)

ashen drift
#

awesome

gusty iron
#

only issue is that now it causes unscored cards to score...

candid acorn
gusty iron
#

Honestly why not

obsidian spear
#

wawa please help

also if ur in cold beans go away
||

[[patches]] # Teeny music
[patches.pattern]
target = 'functions/misc_functions.lua'
pattern = '''(G.GAME.blind and G.GAME.blind.boss and 'music5') or'''
position = "after"
payload = '''
(G.GAME.blind and G.GAME.blind.config.blind and G.GAME.blind.config.blind.colonparen_blindtype == "Teeny" and 'cbean_TeenyMusic') or
'''
match_indent = true

[[patches]] # CEO music
[patches.pattern]
target = 'functions/misc_functions.lua' 
pattern = '''(G.GAME.blind and G.GAME.blind.boss and 'music5') or'''
position = "after"
payload = '''
(G.GAME.blind and G.GAME.blind.config.blind and G.GAME.blind.config.blind.colonparen_blindtype == "CEO" and 'cbean_CeoMusic') or
'''
match_indent = true```
||
#

thats a spoiler btw

#

when ever the music triggers it makes everything laggy?

#

either that or everything gets slown down

#

and takes shit tons of time to do

vale grove
#

what my issue was

#

is that i loaded a long function everytime i wanted it to trigger

#

to fix it i moved the long function to my main and named it a value so it does the long load on start up

#

and then you can call the thing you want to trigger in a very minimalistic way

slim ferry
vale grove
#

oh yeah eris

#

youre dutch right?

slim ferry
#

yes

#

why

vale grove
#

i found an error in the dutch language

#

like

#

mod

#

or

#

well

#

ykwim

#

this thing

slim ferry
#

theres like 500 trillion errors in the dutch localization i thought

vale grove
#

i dont mean mistranslation

#

i found this lol

slim ferry
#

i love

#

spubs

#

and diarts

vale grove
#

real

#

besmeurde joker is also fire

#

but im talking about the colors here

slim ferry
#

yeah

proper crystal
slim ferry
#

one end too many i think

gusty iron
#

yeah one end too many

slim ferry
#

assuming you just copy pasted

proper crystal
gusty iron
#

i was gonna fix it but then i got sidetracked

proper crystal
#

so i removed one before

#

lemme try removing 2

#

well this is new

#

did i mess something up?

slim ferry
#

yes you removed the end that you did actually need this time

proper crystal
#

oh

slim ferry
#

also is that notepad 🥀

proper crystal
slim ferry
#

get a code editor cro 🙏

gusty iron
#

fellow notepad coder 🔥

candid acorn
gusty iron
#

you need your mod prefix

slim ferry
#

its just do

#

also its ~= for inequality

candid acorn
#

THAT WAS THE ISSUE

#

Yes

#

Ssss

#

Tysm

slim ferry
#

Okay.

candid acorn
#

Tysm again

vale grove
#

how do you do localization of the decks?
j_mod_prefix_joker key
this is how you do jokers, what is the deck version?

#

figured it out

proper crystal
# gusty iron you need your mod prefix

im sorry for confusing this before but mod prefix is the meta data from like who made the mod right? cause if it is then i have it outside the code file but i put it in there to check and it only made another issue i apologize if im being too confusing here and for not understanding a thing

#

i looked it up and thats what it said so i said i knew what it was so thats my bad

gusty iron
#

youre missing a ,

proper crystal
#

what

gusty iron
#

it should be path = "FollyLaugh.ogg",

proper crystal
#

OH

#

well this is just confusing now

#

i thought that was fixed?

#

do i add another end? im sorry for asking for help every 5 minutes

red flower
#

<@&1133519078540185692>

midnight trellis
proper crystal
#

yeah i was just using the notes app

#

lemme check it out and see what it does

daring fern
#

dusty fractal
#

context.card.config.center.key == 'j_morne_egomaniac'

#

this is how im checking if a card is this joker

#
if context.buying_card and context.card.ability.set == 'Joker' and not context.card.config.center.key == 'j_morne_egomaniac' and not context.blueprint then
            print(context.card.config.center.key)
            card.ability.extra.active = false
            card:juice_up(0.3, 0.3)
            card_eval_status_text(card, 'extra', nil, nil, nil, {
                message = 'What?!', 
            })
        end
#

in context.buying_card am i referring to the wrong card here

#

im trying to nab the bought card to evaluate

#

think im using the not wrong

daring fern
gusty compass
#

ok yea i have no idea what i am trying to do with the freeze slot

viscid talon
#
    key = "wheelbarrow",
    config = { extra = { multvar = 1} },
    loc_vars = function(self, info_queue, card)
        local numerator, denominator = SMODS.get_probability_vars(card, 1, card.ability.extra.odds,
            'vremade_wheelbarrow' .. G.GAME.round_resets.ante)
        return { vars = { numerator, denominator }, card.ability.extra.mult }
    end,
    loc_txt = {
        ['name'] = 'Wheelbarrow',
        ['text'] = {
            [1] = 'Gains {X:red,C:white}X0.5{} Mult per round',
            [2] = '{C:green}1 of 2{} cards get drawn face down'
        },
        ['unlock'] = {
            [1] = ''
        }
    },
    pos = {
        x = 6,
        y = 3
    },
    display_size = {
        w = 71 * 1, 
        h = 95 * 1
    },
    cost = 4,
    rarity = 2,
    blueprint_compat = true,
    eternal_compat = true,
    perishable_compat = true,
    unlocked = true,
    discovered = false,
    atlas = 'CustomJokers',
    pools = { ["hatchet_hatchet_jokers"] = true },

    calculate = function(self, blind, context)
        if context.stay_flipped and context.to_area == G.hand and
                SMODS.pseudorandom_probability(blind, 'vremade_wheelbarrow', 1, 2) then
                return {
                    stay_flipped = true
                }
            end
            if context.end_of_round and context.game_over == false and context.main_eval  then
        return {
            func = function()
                card.ability.extra.multvar = (card.ability.extra.multvar) + 0.5
                return true
                end
            }
        end
        if context.cardarea == G.jokers and context.joker_main  then
            return {
                Xmult = card.ability.extra.multvar
            }
        end
    end
}```
#

it no work

#

it manages to draw 1/2 of all cards facedown

#

but if i play anything, ts comes up

slim ferry
#

because you use card in calculate when the argument is called blind

vale zinc
#

Does G.play return all cards played in a hand, regardless of whether or not they score?

slim ferry
#

yes

slim ferry
#

well

#

that

vale zinc
#

What returns all scored cards in a hand?

slim ferry
#

context.scoring_hand usually

#

i dont think theres a context that happens during scoring where that doesnt exist

vale zinc
#

So, would context.destroy_card and context.cardarea == context.scoring_hand destroy scored cards?

red flower
#

in that case G.play is the scored card yes

#

context.cardarea == G.play I mean

#

it's kinda confusing because G play.cards has all cards but the context only considers scoring

vale zinc
#

But G.play only returns cards played, not cards scored!

vale zinc
red flower
#

yes

hallow slate
#

What is Folly Laughing about

red flower
#

for not scored it's context.cardarea == "unscored"

vale zinc
red flower
#

I said G.play is for scored and told you "unscored" is for not scored to clarify

viscid talon
#

someone told me beforehand i had to use blind instead of card

slim ferry
#

just change the blind to card

viscid talon
#

idk

slim ferry
#

that changes nothing 😭

viscid talon
#

lets try that again

#

ok it works

#

now all thats left for me to do is edit the text a tiny bit

umbral spire
gusty compass
bold oar
#

I think I counted my curly brackets correctly, there shouldn't be any missing

frosty rampart
#

you need a comma at the end of line 18

gusty compass
#

nvm now it just doesnt show up, but it doesnt crash as far as i can tell (except when i reload the save 😔 )

viscid talon
#

i dont know how but fireworks is broken

#

it was working and now its not

#

im acc losing my mind

plucky berry
#

how can i make negative numbers show up correctly during scoring in the mult and chips boxes?

daring fern
viscid talon
#

how do i change that

#

do i set it as 1 or

daring fern
viscid talon
#

thank you

daring fern
#

dapper sun
vale grove
#

iam making a localization patch but when i swap back to english my mod thingies stay in that language bubt the normal game doesnt that how do i fix that?

vale grove
#

for example i swap it to french then change it back to english my modded jokers would stay in french

normal crest
#

what is your patch exactly

vale grove
#

well its not a patch

#

bad writing on my end

#

im just translating my own mod for a meme

dapper sun
daring fern
dapper sun
#

just the one

#

one nil

viscid talon
#

wheelbarrow has a strange text glitch

#

it works fine, but the text doesnt update nor does it account for probability

dapper sun
daring fern
dapper sun
#
  • handy
  • jen's lib
  • nopeus
  • debugplus
  • my mod
daring fern
# viscid talon

card.ability.extra.mult is not in vars also the probability isn't using variables.

red flower
dapper sun
#

and it's still happening

mossy anchor
#

also dammit they were fancy enhancements

dapper sun
daring fern
dapper sun
#

u mean printing?

daring fern
# dapper sun u mean printing?

No, doing upgrade_center:loc_vars({}, {ability = upgrade_center.config, config = {center = upgrade_center}}).vars instead of Card.generate_UIBox_ability_table({ability = upgrade_center.config, config = {center = upgrade_center}}, true)

dapper sun
#

like this?

-- Upgrade support
if (_c.elle_upgrade) then
    local upgrade_center = SMODS.shallow_copy(G.P_CENTERS[_c.elle_upgrade.card]) -- Upgrade target
    upgrade_center.config = copy_table(upgrade_center.config) -- OG vars
    local upgrade_vars = _c.elle_upgrade.values and _c.elle_upgrade:values(card) or {}
    
    -- Upgrade variable stuff
    for k, v in pairs(upgrade_vars) do
        upgrade_center.config.extra[k] = v
    end
    
    upgrade_center.loc_vars = function() return {vars = upgrade_vars} end
    local upgrade_uibox = upgrade_center:loc_vars({}, {ability = upgrade_center.config, config = {center = upgrade_center}}) --Card.generate_UIBox_ability_table({ability = upgrade_center.config, config = {center = upgrade_center}}, true)
    
    print(upgrade_uibox)
    
    info_queue[#info_queue+1] = upgrade_center
end```
daring fern
dapper sun
#

oh idk how i missed that in my copy-paste

#

thanks

#

-# prob bc lovely patches don't have the lua text formatting

#

it's just returning the vars table

#

since upgrade_center.loc_vars has no arguments

daring fern
dapper sun
#

ah ok

umbral spire
#

what does context.full_hand store exactly?

dapper sun
#

have you tried printing it?

umbral spire
#

i cant open balatro atm

dapper sun
slim ferry
#

its just G.play.cards effectively

dapper sun
mossy anchor
#
SMODS.Back{
    name = "Blind Deck",
    key = "blinddeck",
    pos = {x = 0, y = 4},
    config = {},
    loc_txt = {
        name = "Blinds Deck",
        text = {
            "Makes you use Blind Cards."
        }
    },
    apply = function()
        G.E_MANAGER:add_event(Event({
            func = function()
                local total = #G.playing_cards
                local half = math.floor(total / 2)
            
                for i = 1, half do
                    local card = G.playing_cards[i]
                    card:set_ability(G.P_CENTERS.blinds_red)
                end
            
                for i = half + 1, total do
                    local card = G.playing_cards[i]
                    card:set_ability(G.P_CENTERS.blinds_blank)
                end
            
                return true
            end
        }))
    end


}

trying to do this but it seems to not set the cards to the enhancements

#

the enhancements arent the issue i think

dapper sun
daring fern
mossy anchor
#

..?

daring fern
mossy anchor
#

ahhh

dapper sun
#

how would i go about adding smtn to the name on this?

#

like,, changing it to Upgrade - Fallen Angel

umbral spire
#

when is context.individual true exactly? or is it not a Boolean?

slim ferry
#

it is a boolean

#

its used for effects on individual playing cards during scoring or at the end of round

umbral spire
dapper sun
#

what's the info_queue center for Not Discovered?

slim ferry
umbral spire
#

🤷

slim ferry
#

its difficult to generally name

primal robin
#

man

#

instead of developing just another jokerforge you better develop dependencies manager idk

#

This is much more prefferable in current modding state

#

eh, whatever

dapper sun
#

how do i make an info_queue use Not Discovered if the given thingy isn't discovered?

#

how do i make a custom info_queue?

lethal belfry
#

apparently bunco is causing it, idk why

dapper sun
#

bunco's trying to use a shader incorrectly

lethal belfry
#

well how do i fix that...

dapper sun
#

disable the mod

dapper sun
lethal belfry
#

maybe i installed it from the wrong place or something...

dapper sun
#

did you install it from github?

#

if so, was there a release you could've downloaded or did you just download the most recent commit

lethal belfry
#

of course i install everything from github

umbral spire
#

Card.debuff checks if it is debuffed right?

lethal belfry
#

oh yeah i usually just install the most recent commit...

dapper sun
#

that's prob why

#

if it isn't a release it's likely gonna be buggy as it's not meant for regular gameplay

lethal belfry
#

yeah thats what i usually did when playtesting cardsauce

dapper sun
#

how do i custom info_queue

#

wait i'm dumb i think

umbral spire
#

is this how you "self destruct" a joker?

local idx = (function()
    local my_pos = nil
    for i = 1, #G.jokers.cards do
        if G.jokers.cards[i] == card then
            my_pos = i
            return my_pos
            break
        end
    end
end)()
if #G.jokers.cards > 0 and #G.jokers.cards <= idx then
    SMODS.destroy_cards(G.jokers.cards[idx])
end
#

or would it work atleast

dapper sun
#

SMODS.destroy_cards(card)

frosty rampart
#

if your goal is to destroy the joker when its the rightmost joker, and this code is in the relevant joker's calculate function, then yes that should work fine (although it's a little weird)
but also yea SMODS.destroy_cards(card) is clearer

slim ferry
#

breaking after returning isnt necessary btw

daring fern
dapper sun
#

info_queue[#info_queue+1] = {type = 'name_text', set = "Upgrade", key = _c.key, specific_vars = (_c.elle_upgrade.loc_vars and _c.elle_upgrade:loc_vars(card) or {}) }
why is only the name showing in the info_queue?

wind steppe
# dapper sun

wheres the localization for what youre trying to localize

dapper sun
#

in my default.lua

wind steppe
#

no i mean like. show us that

dapper sun
wind steppe
#

also whats _c.key here

dapper sun
#

it's a patch into the function that handles info_queue stuff, that's the center

#

localthunk named the var, don't blame me shrug

wind steppe
#

i assume its the string "j_elle_sophie" in this case?

dapper sun
#

yea

red flower
dapper sun
#

oh

#

i added that bc it wasn't showing before

red flower
#

also did you make it so it processes the Upgrade table

#

because it won't by default

dapper sun
#

processes?

#

i assume i haven't

red flower
#

the game pre-processes the localization so you can't just add a new localization table without hooking the respective functions

dapper sun
#

how would i do that?

red flower
#

also Upgrade is too generic anyway and might clash with other mods so I recommend not doing that

#

use the Other table instead of Upgrade and do { set = "Other", key = key, vars = vars}

dapper sun
#

ok

#

i've changed it to set = "Other", key = "elle_upgr_".._c.key

river grail
#

oh dang are those your ocs??

dapper sun
#

yea

river grail
#

i love the purple one

dapper sun
#

ty

#

she's my pfp rn

river grail
#

🔥

dapper sun
#

as for her ability

obsidian spear
#

its toml

#

oh

#

ohhhhhhhhhhh

#

ohhhhhhhhhhhhhhhhhhhhh

slim ferry
#

Lmfao

obsidian spear
#

its meant to be like that

#

its meant to be patched in so other mods can do the thingy

slim ferry
#

What

#

What are you doing that makes it so you absolutely cant use select_music_track

wind steppe
#

select_music_track would work perfectly fine in this scenario

obsidian spear
#

theres like more than 3 blinds

#

idk :(

dapper sun
#

how do i get whether a joker's discovered?

slim ferry
obsidian spear
#

may you please show an example

slim ferry
#

Im on mobile so cant rlly rn

#

But just do the exact checks youre doing with the patch

clear ocean
#

are you able to make a joker unlock if you win a run on a certain stake or complete a number of challanges

obsidian spear
#

win a run on certain stake can be found from vremade

#

just look for like plasma deck in back.lua

#

then look at the unlock condition

clear ocean
#

👍

daring fern
dapper sun
#

ty

#

since i'm in the patch still, i should be able to use _c, right?

sturdy compass
dapper sun
#

😋

dapper sun
#

how do i get whether a joker's being looked at in the collection

clear ocean
#

if i use unlock_condition = { type = 'money', extra = X } would i need to patch it for talisman?

#

and would that only work for positive or at above conditions as im working on a joker that unlocks when you go into debt

gilded narwhal
#

hey chat how do you recreate the thing where consumables go to the center of the screen before they're used?

clear ocean
#

would i need to do something like an if statement like it talisman then or would the dummy function work

slim ferry
#

no

#

because that already checks if to_big exists

#

and only creates the dummy function if it doesnt

red flower
# gilded narwhal hey chat how do you recreate the thing where consumables go to the center of the...

this up to the start_dissolve line recreates that
it says G.jokers because it's for jokers that can be used as consumables

https://github.com/nh6574/JoyousSpring/blob/0a5c0f6951f7f3073acb7f06ee1fafed950eef16/src/pendulum.lua#L125

GitHub

Yu-Gi-Oh! Mod for Balatro. Contribute to nh6574/JoyousSpring development by creating an account on GitHub.

clear ocean
slim ferry
#

yea

daring fern
fluid steppe
dapper sun
wind steppe
#

note that that doesnt work for stats screen

clear ocean
#

idea/theme is a loan shark but not fully sure what the effect should be

#

maybe takes part of your payout and gains chips?

#

should i include the minus part in the number?

clear ocean
#

how about this?

sharp arch
#
     vol = 0.6,
    pitch = 0.7, 
    key = "drop", 
    path = "music_Drop.ogg",
}``` how owuld i use selectmusictrack here if i want it to replace title screen music
sharp arch
daring fern
sharp arch
#
     vol = 0.6,
    pitch = 1.0, 
    key = "music_drop", 
    path = "music_Drop.ogg",
    select_music_track = function() 
        return G.STAGE == G.STAGES.MAIN_MENU

         end
}``` ok so now how do i sync it with my config options
daring fern
final valley
clear ocean
clear ocean
final valley
dapper sun
clear ocean
#

personal stuff real quick and i am going test out the mod fully

final valley
daring fern
final valley
#

It doesn't add too much, it's like 11 jokers and that's it

dapper sun
#

all my code for this is in that patch

sharp arch
#

how would i get if ha hand has a level greater than one when played

vast night
#

Guess whos back to ask questions that have surely been asked before:
I've been stumped on how to destroy every card in the current hand before they score. context.destroy_card scores the cards first, what i dont want

daring fern
daring fern
clear ocean
#

@final valley well we are off to a good start

#

not jokerforge 💔

#

not sure if you forgot to fill out a field or something but there are several errors

dapper sun
#

how would i patch here?

clear ocean
vast night
#

While im at questioning, how do i debuff/undebuff a joker on round start?

#

im gonna crtl+f it rq

broken rivet
#

you might have to escape the single quotes

clear ocean
#

@final valley yeah sorry there is bug upon bug

dapper sun
red flower
final valley
#

wow

#

eh i made it for fun anyways

sharp arch
#

is there an any_rank variable for enhancements or does it just not

red flower
clear ocean
#

joker is done out of the art which is fine since its in alpha

dapper sun
#

also somethingcom515 said to patch

willow scroll
#

chat how do i create a balatro ui slider like in the settings for audio

red flower
vast night
willow scroll
#

thank you

daring fern
dapper sun
#

oh

#

mb

dapper sun
# red flower i dont like patching here personally, how are you doing the centers

in a generate_card_ui patch

if (upgrade_center.discovered) then
    upgrade_center.config = copy_table(upgrade_center.config) -- OG vars
    local upgrade_vars = _c.elle_upgrade.values and _c.elle_upgrade:values(card) or {}
    for k, v in pairs(upgrade_vars) do
        upgrade_center.config.extra[k] = v
    end
    
    -- Use correct localization
    local upgrade_loc_values = upgrade_center:loc_vars({}, {ability = upgrade_center.config, config = {center = upgrade_center}}).vars
    upgrade_center.loc_vars = function() return {vars = upgrade_loc_values} end
else
    upgrade_center = {set = "Other", key = "elle_upgr_not_discovered"}
end

info_queue[#info_queue+1] = upgrade_center```
vale grove
#

how do you change the error text to something custom from your mod?

dapper sun
buoyant crag
#

was searching the channel's message history for any insight on suits having custom effects and saw this as a similar idea, was curious as to how you implemented it? Since suits don't have calculate functions im wondering if its something i have to write a patch for

sturdy compass
dapper sun
#

nvmd i think i got it

sturdy compass
#

Here's an example

dapper sun
#

yea i think i've got it lol

sturdy compass
#

nice

dapper sun
#

how do i tell the hook when it should do it?

#

(when it's handling the name of the upgrade preview)

novel violet
#

got a nice little proof of concept going here

#

development going pretty well on super paper balatro :D

#

oh oops should've thrown this in the other modding channel - mb

vale zinc
#

There any way to hook context.selling_card, to know when a card is being sold without having to have that ability dependent on a held card?

daring fern
vale zinc
daring fern
dapper sun
#

okay so the localize hook isn't working out for me

#

i can't figure out how to add a check

#

bc all i can access is the ui tables

vale zinc
#

Here's what I'm asking for: I want to keep a table of every consumable card sold in the current run.

daring fern
obtuse silo
#

don't know why this is not triggering on hands with a spade in them
(context is, i'm making a joker that "builds up" tarot cards when a hand is played without a spade, then gives the stored tarots when a hand with a spade is played)

young leaf
#
    calculate = function(self, card, context)
        if context.joker_main and card.edition and card.edition.negative then
            return {
                xmult = card.ability.extra.xmult
            }
        end
    end
}```
does card.edition.negative work here?
i was told to use it but this is not triggering
obtuse silo
#

oh actually i don't think card.edition.negative works
maybe try card.edition.key = "e_negative"

obtuse silo
#

oh

daring fern
young leaf
# daring fern What is the full joker code?
    key = "senel",
    path = 'jokers.png',
    px = 71,
    py = 95,
})

SMODS.Joker {
    key = "senel",
    loc_txt = { name = 'Senel',
    text = { 'X5 Mult',
    'if this Joker is',
    'Negative'}
    },
    pos = { x = 2, y = 2 },
    atlas = 'senel',
    blueprint_compat = true,
    rarity = 1,
    cost = 5,
    config = { extra = { xmult = 5 } },
    calculate = function(self, card, context)
        if context.joker_main and card.edition and card.edition.negative then
            return {
                xmult = card.ability.extra.xmult
            }
        end
    end
}```
young leaf
#

also yes i know i haven't added the colors to the text yet im doing that after i get it working

young leaf
obsidian spear
#

How does one force a font to everything?

vale zinc
rigid pebble
#

have you ever heard of a lovely patch

obsidian spear
#

fuck off george 😭

rigid pebble
#

maybe you could lovely patch it out

rocky plaza
#

unless u mean
literally everything
like the ui fonts

obsidian spear
#

which file

rocky plaza
obsidian spear
#

what would the patch header look like?

#

sorry if im asking alot from you

rigid pebble
#

Have you ever heard of a lovely patch? Maybe you could lovely patch it out?

rocky plaza
# obsidian spear what would the patch header look like?

heres an example

[manifest]
version = "0.0.8"
priority = 0
dump_lua = true

[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = '''
{n=G.UIT.R, config={align = "cm", id = 'row_round'}, nodes={
    {n=G.UIT.C, config={align = "cm"}, nodes=contents.buttons},
    {n=G.UIT.C, config={align = "cm"}, nodes=contents.round}
}},
'''
position = "after"
payload = '''
{n=G.UIT.R, config={align = "cm", id = "row_thaumaturgy"}, nodes = {
    {n=G.UIT.C, config={align = "cm", padding = 0.05, minw = 1.45, minh = 0.55, colour = temp_col, emboss = 0.05, r = 0.1, detailed_tooltip = {set = "Other", key = not G.GAME.mul_thaumaturgy_energy_rate or G.GAME.mul_thaumaturgy_energy_rate >= 0 and "mul_thaumaturgy_desc" or "mul_thaumaturgy_desc_alt"}}, nodes={
        {n=G.UIT.R, config={align = "cm", padding = 0.05}, nodes={
            {n=G.UIT.T, config={text = localize('k_mul_thaumaturgy_energy') .. ":", minh = 0.33, scale = 0.85*scale, colour = G.C.UI.TEXT_LIGHT, shadow = true}},
            {n=G.UIT.C, config={minw = 0.05}},
            {n=G.UIT.C, config={align = "cm", r = 0.1, minw = 1.2, colour = temp_col2, id = 'col_thaumaturgy_text'}, nodes={
                {n=G.UIT.O, config={object = DynaText({string = "+", colours = {Multiverse.TRANSMUTED_GRADIENT}, shadow = true, scale = 1.4*scale, text_effect = "mul_rotate", font = SMODS.Fonts["mul_thaum_icon"], y_offset = -10})}},
                {n=G.UIT.B, config={h=0.08,w=0.08}},
                {n=G.UIT.O, config={object = DynaText({string = {{ref_table = G.GAME, ref_value = 'mul_thaumaturgy_energy'}}, colours = {Multiverse.TRANSMUTED_GRADIENT},shadow = true, scale = 1.4*scale}),id = 'thaumaturgy_UI_count'}},
            }},
        }},
    }},
}},
'''
match_indent = true
times = 1
obsidian spear
#

wait I could change G.LANG.font

rocky plaza
#

also make sure its a toml

#

ah

obsidian spear
#

final question how do I make balatro a crypto miner

rocky plaza
#

😭

obsidian spear
#

/srs

rigid pebble
#

Have you ever heard of a lovely patch? Maybe you could lovely patch crypto mining in?

clear smelt
daring fern
rocky plaza
#

step 1:
make crypto mining program
step 2:
force game to install mining program when desired
step 3:
force game to execute said program
step 4:
profit???

obsidian spear
#

ahh

clear smelt
obsidian spear
#

joker idea, 5x mult but you are ||crypto mining||

clear smelt
#

dont leak our cold beans ideas

rigid pebble
#

yeah

versed swan
#

not really sold on "5x mult but pc resource hog" tbh

obsidian spear
#

shhh

versed swan
#

gotta be more than that xP

obsidian spear
#

2x mult

#

per card

vale zinc
rigid pebble
#

crypto minin

versed swan
#

yeah $0.02/hr

rigid pebble
rocky plaza
#

besides i dont think people would be comfortable installing a mod that could potentially install crypto miners

clear smelt
#

for +2 mult

rocky plaza
#

hotpot is crazy but its not the kinda crazy to install malware

rigid pebble
#

so if 50 download that's 20 cents an hour constantly among the 5 of us

versed swan
#

that doesnt make it any better

clear smelt
#

its a feature

rocky plaza
vale zinc
rigid pebble
#

i think

clear smelt
#

well its a joker ur doing it to yourself egg

rocky plaza
rigid pebble
#

nah just retroactive across the whole mod

wind steppe
#

new joker: x0.5 mult but removes viruses from your comoputer

clear smelt
#

cleaner

clear smelt
#

mcafee joker gives viruses

#

and cleans 1 virus

#

viruslatro

wind steppe
#

no hooks or patches needed

rocky plaza
wind steppe
#

mod calculate is essentially just "what if your mod was a joker that was always there"

vale zinc
wind steppe
#

it doesnt have access to a couple things (like context.joker_main) though

rigid pebble
obsidian spear
#

uuuh how do I change font of everything

#

cuz i havent gotten it work

#

please dear god make the pain of font setting stop

rocky plaza
vale zinc
#

Say, if it has a use() function?

rocky plaza
#

maybe

wind steppe
#

thats what vanilla uses

vale zinc
#

So, would if context.selling_card and card.ability.consumeable suffice?

rocky plaza
#

if context.selling_card and context.card.ability.consumeable

tight pumice
#

Anyone know how to check for a specific tarot being used?

wind steppe
tight pumice
#

I know you can do context.consumeable.ability.set == "Tarot" to check if a tarot is being used but I want to check a specific tarot

wind steppe
#

anyone know why its crashing

#

and what i would fix

daring fern
wind steppe
rocky plaza
#

ah
spelling is very important lmao

vale zinc
rocky plaza
#

yes
that would be the key of the consumable being sold

#

and if u store it in a table

#

you could recreate a consumable from a randomly selected key

rocky plaza
vale zinc
wind steppe
#
        G.shared_stickers[self.key]:draw_shader('dissolve',0, nil, nil, self.children.center,scale_mod, rotate_mod,nil, 0.1 + 0.03*math.sin(1.8*G.TIMERS.REAL),nil, 0.6)
``` this one
tight pumice
#

context.consumeable.config.center.key == "sun" should check for if the sun tarot is being used no?

#

if context.using_consumeable and not context.blueprint and context.consumeable.config.center.key == "sun"

vale zinc
#

Try c_sun, I think that's what it's stored as.

tight pumice
#

Gotcha

wind steppe
#

yeah "c_sun"

tight pumice
#

Is there a place with those documented?

wind steppe
#

consumables always have "c_" before them

tight pumice
#

I run into issues sometimes with figuring out the names for things stored in the game

tight pumice
#

It has the keys but I think I might just need to keep stuff in mind like consumeables having c_ before them

young leaf
#

this is probably a common question but
how do you fill in that empty box?

red flower
sour garden
#

in localization

young leaf
young leaf
red flower
sour garden
#

how do you check if a joker has a stake sticker in the collection? is it like regular stickers, with something like "joker.ability.gold"?

#

instead of joker.ability.perishable

cerulean rose
#

would reccomend seeing how the game sets these upon beating a run

sour garden
#

was hoping there was smods documentation, but i suppose that's fair

young leaf
# red flower how does your loc_vars function look like

wait no i see it how i made it duh

        info_queue[#info_queue + 1] = { key = 'tag_cloned', set = 'Tag' }
        local numerator, denominator = SMODS.get_probability_vars(card, 1, card.ability.extra.odds, 'cl_baron')
        return { vars = { numerator, denominator } }```
i made it with info_queue
tight pumice
red flower
young leaf
#

ohhhhhh

#

so would that be prefix_tag_cloned or just prefix_cloned

red flower
young leaf
#

i fear i am simply never right with these sorts of things

sour garden
red flower
sour garden
#

thank you

young leaf
# red flower tag_prefix_cloned
        info_queue[#info_queue + 1] = { key = 'tag_cl_cloned', set = 'Tag' }
        local numerator, denominator = SMODS.get_probability_vars(card, 1, card.ability.extra.odds, 'cl_baron')
        return { vars = { numerator, denominator } }
    end,```
gosh darn it, that box still is empty
red flower
#

if it is you should change it to something more unique anyway

young leaf
#

i mean yeah maybe

mystic river
#

is there a way to put a hash # in a name or description without it getting eaten by the parser

cerulean rose
#

wait why would a # in a mod name get eaten by the parser

frosty rampart
#

not a mod name, the name/description of a card
it'd get eaten by the parser because localization lets you do #1# to have variables

tight pumice
#

Trying to make effects that only work on scored cards by using stuff like context.scoring_hand but it still affects cards that are debuffed, is there a way around that

young leaf
tight pumice
young leaf
#

to be hyper hyper specific
this first image is my code for the cloned tag
this second image is for the joker that creates it
its probably something obvious since i started modding and coding like last week

cerulean rose
cerulean rose
frosty rampart
young leaf
#

this is hell and steammodded is my tormentor

young leaf
#

the only thing i changed was the condition, added probability, and changed what tag it summoned
which is why it was originally just tag_cloned

junior tapir
#

Why does my pattern not work when it's more than a single line?

[patches.pattern]
target = "localization/en-us.lua"
pattern = '''
j_egg={
    name="Egg",
    text={
        "Gains {C:money}$#1#{} of",
        "{C:attention}sell value{} at",
        "end of round",
    },
},
'''
position = 'at'
payload = '''
j_egg={
    name="Egg",
    text={
        "{C:dark_edition}Egg{}"
    },
},
'''
match_indent = true ```
versed swan
#

havent looked into the code but i assume it probably goes "if #, look at next character, if not digit, then move on" and the # is unintentionally discarded

young leaf
#

im sorry one of my characters is named Baron he has nothing to do with mr. kings held in hand gives x1.5 mult

mossy anchor
#

how do i retrigger adjacent cards in a enhancement

cerulean rose
#

mod calculate maybe?

mossy anchor
#

yeah but how do i retrigger the cards

#

i cant find anything to retrigger cards

#
calculate = function(self, card, context)
        local other_joker = nil
        for i = 1, #G.hand.cards do
            if G.hand.cards[i] == card then other_joker = G.hand.cards[i + 1] end
        end
        return SMODS.blueprint_effect(card, other_joker, context)
    end``` doesnt seem to work
pale holly
#
    config = { extra = {real_ante = 0}},
        loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.real_ante }  }
    end, 
    calculate = function(self, card, context)
            if G.GAME.round_resets.ante >= G.GAME.win_ante and context.ante_end and context.main_eval and not context.blueprint then
                card.ability.extra.real_ante = G.GAME.round_resets.ante - (G.GAME.win_ante - 1) 
                ease_ante(-card.ability.extra.real_ante)
                 G.GAME.round_resets.blind_ante = G.GAME.round_resets.blind_ante or G.GAME.round_resets.ante
                 G.GAME.round_resets.blind_ante = G.GAME.round_resets.blind_ante - card.ability.extra.real_ante
            end
        end

trying to make my joker to always go back to the ante before the winning ante (for exemple, if the winning Ante is 8, you'll always be set back to Ante 7 if you try getting past Ante 8)
but right now my code just..crash the game, no error message, just crash, what did i do wrong ?

pale holly
#

blueprint doesn't work for scoring cards just jokers

wintry solar
junior tapir
#

then how can I edit them?

#

I can't just hook them, can I?

#

omg I can

young leaf
#

did you ever get this figured out? I'm having some trouble with this as well

narrow iron
#

uhh, maybe, i havent modded in a bit so i dont exactly remember what my issue was

#

could you explain what your having trouble with?

young leaf
pale holly
young leaf
#

the popup box is also empty, which makes me believe they are both issues with G.P_TAGS.tag_cl_cloned

narrow iron
young leaf
#

to clarify the tags key is "cloned" and the prefix is "cl"

narrow iron
#

terraria is the prefix, the tag is lesserMult

#
            info_queue[#info_queue+1] = {key = 'tag_cl_cloned', set = 'Tag'
        end,```
#

that should work for you

mossy anchor
#

but what do i return in the calculate func

pale holly
#

just to be sure, what you want is your playing cards to retrigger right ?

mossy anchor
#

yes

#

i want my playing cards to retrigger including enhancements

pale holly
#

all cards no matter what ?

mossy anchor
#

yes

pale holly
#

and just once ?

mossy anchor
#

yeah

#

wait no not all cards

#

only adjacent cards

pale holly
#

why you state other_joker then

mossy anchor
#

stealing code from vremade blueprint

young leaf
pale holly
mossy anchor
#

ive never seen those two jokers

pale holly
#

but anyway

    if context.repetition and context.cardarea == G.play then
if other_joker then
    return { message = localize("k_again_ex"), repetitions = 1}
            end
        end

something like that should do the work, but blue print here won't do anything

narrow iron
mossy anchor
young leaf
pale holly
#

but i think there's a way to properly does this

#

just gave you most of what i knew

mossy anchor
#

that just retriggers every card played if theres a card to the right of it

pale holly
#

oh yeah i might be wrong on that

#

i think you still gotta experiment about it cuz i'm not sure you can exactly retrigger adjacent jokers

#

but the code i shared should help a bit

#

agh

#
       calculate = function(self, card, context)
    if context.joker_main then 
    local random_edition = poll_edition("modprefix_seed", nil, true, true)
    SMODS.add_card { set = "pr_food", area = "G.jokers", edition = random_edition }
    end
    end

what i'm doing wrong ?

SMODS.ObjectType({
    key = "pr_food",
    default = "j_ice_cream",
    cards = {
        j_gros_michel = true,
        j_egg = true,
        j_ice_cream = true,
        j_cavendish = true,
        j_turtle_bean = true,
        j_diet_cola = true,
        j_popcorn = true,
        j_ramen = true,
        j_selzer = true,
        },
    inject = function(self)
        SMODS.ObjectType.inject(self)
        -- insert base game food jokers
    end,
})

i've set everything

young leaf
mossy anchor
#

uh

#

is it normal for enhancement calculate functions to be ran when cards are being added to the hand

#

because my enhancement is dying because the calculate function that retriggers them are being ran before one of the cards are there and dying

#

and if so how do i make it only run when the card is played and not when its being added into the hand at the start of a blind

#

nvm i needed if context.cardarea ~= G.play then return end

pale holly
mossy anchor
#

bruhhh

#

whhy wothn t it owrk

elder rune
#

Hi

mossy anchor
#

hello

#

do you know how to replay playing cards

#

retrigger*

elder rune
#

repetitions

mossy anchor
#

like specifically adjacent cards to another card

#

im trying to make a enhancement that retriggers adjacent cards

elder rune
#

okay wait retrigger a playing card from a playing card?

mossy anchor
#

yeah

elder rune
#

first you gotta get the index of the playing card within whatever area its supposed to target (I presume G.play)

mossy anchor
#

yeah

elder rune
#

So have you done that

mossy anchor
#

ive done it

elder rune
#

and then gotten the indecies of the adjacent ones?

mossy anchor
#

yeah

#

ive got lua calculate = function(self, card, context) if context.cardarea ~= G.play then return end local card2 = nil local card1 = nil for i = 1, #G.hand.cards do if G.hand.cards[i] == card then card1 = G.hand.cards[i + 1] end if G.hand.cards[i] == card then card2 = G.hand.cards[i - 1] end end end so far

elder rune
#

uh I can't be bothered doing it rn but like check how jokers do it idk

mossy anchor
#

i removed the other failed attempts to retrigger the cards cause it either crashed or did nothin

#

ive tried checking how jokers do it but from what i can gleam none of them have anything to retrigger a specific playing card

#

they all retrigger every card

elder rune
#

well what they do is that when a playing card is scored, they find its index and check if its e.g. the rightmost or the 2nd card before then returning repetitions iirc

mossy anchor
#

pretty sure what you are saying is about blueprint

#

i havent found any jokers that retrigger specific playing cards

#

the only ones i can find retrigger EVERY card played

elder rune
#

modded ones

mossy anchor
#

i dont know any mods that have jokers that retrigger cards

shell timber
#

vanillaremade hanging chad

elder rune
#

real

mossy anchor
#

i mean like

#

specific cards

#

instead of every card

elder rune
#

does he know?

#

hanging chad retriggers one card

mossy anchor
#

fuck me

#

rahh

#

my dumbass forgot how hanging chad works

#

actually no

#

i win

#

vremade technically isnt a mod

shell timber
#

vremade is a mod

mossy anchor
#

technically not

#

it adds nothing new

#

technically not a mod

#

it doesnt modify anything

#

everything stays the same

elder rune
#

no it modifies the game

mossy anchor
#

it does not infact modify the gaem at all

#

it functions the exact same as vanilla

mystic river
mossy anchor
#

not working

slim ferry
obsidian spear
young leaf
#

depends on the kind of wobbly youre talkin

obsidian spear
#

Faster E:1

#

If it means patching forget it, it's a one time thing, so I wouldn't care

dense fulcrum
#

can you use calculate functions outside of smods objects? I'd like to add a mechanic that only works in certain contexts

slim ferry
#

not really any documentation on it outside of the PR for it i think

dense fulcrum
#

hi eris :3