#💻・modding-dev

1 messages · Page 466 of 1

hushed field
#

but is the set up there correct? Do the file names match?

#

And whats your code for the atlas being loaded in?

ancient mango
#

the png name was the wrong name🤦‍♂️

#

i am stupid

native zinc
#

where's the text box code? i would like to change the text box background

ancient mango
#

it worked... but i now see this error when i click play(like the deck not the menu button):
card.lua:4944: attempt to index local 'obj' (a nil value)

hushed field
#

I'm struggling to figure out what passes into cards and what doesn't. Seals have the same calculate function as enhancements, right?

native zinc
#

btw i'd like to say that i'm cooking

native zinc
ancient mango
#

what does this mean:
card.lua:4944: attempt to index local 'obj' (a nil value)
(i am stupid)

hushed field
#

Yeah, okay, so post_trigger only gets sent to jokers. I'm just missing the specific thing that's happening that limits that scope, I guess

ancient mango
#

no it happens when i click this

#

cause then it loads the joker

hushed field
#

oh, don't try and continue runs if you're changing things drastically in your code

#

just start a new run

ancient mango
#

no its no like i started a new run

#

and then when i got the joker it got that error

hushed field
#

that means that specific joker has something that the game tries to check that's broken

graceful brook
#

is there a way to let jokers in the collection be selectable? aka to change the area config highlight limit to 1 instead of 0?

ancient mango
hushed field
stiff locust
#

is perma bonus mult/xmult in base smods yet

red flower
#

yes

ancient mango
# hushed field Crash report and the code would be handy

wait it didnt crash again i think it works tho the tetx isnt showing up and i thinks thats becuase i dont know how to set up the loc_txt propelly with localization:
the lua file:

    key = "SpiderSushiMod",
    path = "SpiderSushiMod.png",
    px = 71,
    py = 95
}

SMODS.Joker {
    key = "top_hat",
    atlas = 'SpiderSushiMod',
    pos = { x = 0, y = 0 },
    config = { extra = { chips = 15, mult = 10 } },
    discovered = true,
    cost = 5,
    blueprint_compat = true,
    loc_vars = function(self, info_queue, card)
            return { vars = { card.ability.extra.chips, card.ability.extra.mult }}
    end,
    calculate = function(self, card, context)
        if context.joker_main then
            return {
                chips = card.ability.extra.chips,
                mult = card.ability.extra.mult
            }
        end
    end
}```
the en_us file:
```return {
    descriptions = {
        Joker = {
            top_hat = {
                name = "Top Hat",
                text = {
                    "Gives {C:chips}+#1#{} Chips and",
                    "{C:mult}+#2#{} Mult when scored"
                }
            }
        }
    }
}```
stiff locust
red flower
hushed field
stiff locust
#

ooh

hushed field
#

localization isn't working because you're missing the object type prefix and the modkey prefix

ancient mango
#

how do i do that then>

hushed field
#

[objectprefix]_[modprefix]_[objectkey]

ancient mango
#

no like wher edo i put it

hushed field
#

oh, c'mon discord

ancient mango
#

and how

hushed field
#

for example, this is a joker, so the object prefix is 'j', my mod is Balatro Goes Kino, and I've set the prefix in the .json file as 'kino', and the joker's actual key is 'titanic'

ancient mango
#

so j_ssm_top_hat would work?

hushed field
#

presumably, yeah

hushed field
ancient mango
#

i think it crashes because of the code or smth idk

hushed field
#

How are you loading in your files?

ancient mango
#

what do you mean loading my files

stiff locust
red flower
#

uhh can i see the code

umbral zodiac
#

that one cryptid formatting proposal from a few months back:

stiff locust
#
calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play then
            local myspot = -1
            if context.other_card:get_id() == 4 then
                for index, value in ipairs(G.play.cards) do
                    if value == context.other_card then
                        myspot = index
                    end
                end
                if G.play.cards[myspot + 1] then
                    G.play.cards[myspot + 1].ability.perma_mult = G.play.cards[myspot + 1].ability.perma_mult or 0
                    G.play.cards[myspot + 1].ability.perma_mult = G.play.cards[myspot + 1].ability.perma_mult +
                    card.ability.mult
                end
                if G.play.cards[myspot - 1] then
                    G.play.cards[myspot - 1].ability.perma_mult = G.play.cards[myspot - 1].ability.perma_mult or 0
                    G.play.cards[myspot - 1].ability.perma_mult = G.play.cards[myspot - 1].ability.perma_mult +
                    card.ability.mult
                end
            else
                myspot = -1
            end
            if myspot ~= -1 then
                return {
                    extra = { message = localize('k_upgrade_ex'), colour = G.C.CHIPS },
                    card = card
                }
            end
        end
    end
#

should give cards adjacent to scored 4s +2 perma mult

#

the adjacent to scored 4s part worked fine

#

oh wait I see what I did

#

no I didn't

#

i read it wrong

red flower
#

yeah no it looks fine to me

#

you dont do anything in the localization right?

stiff locust
#

no i don't manually add the extra mult label

#

the joker has localization that functions

red flower
#

then i have no idea, might be an smods bug? or maybe another mod

stiff locust
#

maybe another mod is clashing with it then yeah

ancient mango
summer furnace
#

I still need help with that, does anyone have an idea on how to fix it?

stiff locust
#

not sure what mod that would be

#

it would be a mod that implements perma mult on its own

red flower
#

if you have cryptid my guess is always that

stiff locust
#

i don't use cryptid

hushed field
stiff locust
#

my best guess is DX tarots just cause that mod is old

ancient mango
# hushed field If you show how the crash happens, and your code, I might be able to spot someth...

(i am using yahimod but that doesnt do anything)

    key = "SpiderSushiMod",
    path = "SpiderSushiMod.png",
    px = 71,
    py = 95
}

SMODS.Joker {
    key = "top_hat",
    atlas = 'SpiderSushiMod',
    pos = { x = 0, y = 0 },
    config = { extra = { chips = 15, mult = 10 } },
    rarity = 2,
    discovered = true,
    cost = 5,
    blueprint_compat = true,
    loc_vars = function(self, info_queue, card)
            return { vars = { card.ability.extra.chips, card.ability.extra.mult }}
    end,
    calculate = function(self, card, context)
        if context.joker_main then
            return {
                chips = card.ability.extra.chips,
                mult = card.ability.extra.mult
            }
        end
    end
}
stiff locust
#

not that one

ruby moon
#

Hey, someone can help me made a custom deck? I never made a mod before

teal ferry
stiff locust
#

gonna see if i can manually remove the secondary value for ++2 mult

ruby moon
ruby moon
teal ferry
ruby moon
ruby moon
teal ferry
#

this is a stemmodded mod to show how vanilla elements would be created if you were a modder

#

so theres how to create blue deck, yellow deck etc

teal ferry
#

btw i am new in modding too. i've been copy pasteing code from vanilla remade to understand moding

ruby moon
hushed field
ancient mango
#

k

stiff locust
#

BETMMA SPELLS

#

well that just removed a + from each number

#

that's technically closer

#

there are no other mentions of perma mult in my entire mods folder except a morefluff joker that uses it and the smods implementation of it

#

this perma mult is pissing me off

#

i am the original starwalker

rotund sable
#

do i have to change this description to mention that the hand is redrawn or the concept of "redraw if no cards, lose if no cards in deck" is known well enough?

stiff locust
#

the card's data has nothing wrong with it so I'm pretty sure this is just another mod causing it

hushed field
#

Start a new one

ancient mango
#

ok so i started a new run and got the joker but it still doesnt show the text and also i want to be able to continue a run

hushed field
#

The issue isn't that continuing a run is broken. The issue is that if you change things in your code, the loaded in objects don't change with it, which means that the game will run code that might no longer work.

#

Also, if the text isn't loading, you'll have still not set up your localization properly

#

What does that file look like now?

ancient mango
#
return {
    descriptions = {
        Joker = {
            j_ssm_top_hat = {
                name = "Top Hat",
                text = {
                    "Gives {C:chips}+#1#{} Chips and",
                    "{C:mult}+#2#{} Mult when scored"
                }
            }
        }
    }
}
hushed field
#

and you're sure your mod prefix is ssm?

ancient mango
#

yes.

red flower
#

en-us.lua

hushed field
#

Yup

ancient mango
#

ok so this is the third time that im saying this:
i am stupid

red flower
#

nah that one is understandable

ancient mango
#

thank you

hushed field
#

It's all stuff that happens even when you're more experienced, haha

ancient mango
#

it works

ancient mango
hushed field
#

The main thing is learning to read crash reports in a way that'll make you say 'oh, this is probably me being stupid' rather than 'oh, this is a difficult problem I'm gonna have to solve'

native zinc
#

i am responsible for three Rofflatro crashes and all of them have been syntax errors

umbral zodiac
#

does anyone know why my mod could possibly be preventing playing cards from self destructing, but just makes them not score anymore?
i literally have no idea why they don't, i dont hook anything relating to self destruction or card removal

teal ferry
#

SMODS.add_card{key = "j_my_master_hunter"}
card:start_dissolve() yo i am using this to technicaly turn my joker into another joker. any idea or resource how can i make it directly transform. or if jokers have turn back thing like when aplying ranked cards enchantment. can i make it turn back and transform it to another joker ?

umbral zodiac
#

card:set_ability(key)

#

you might have to do some extra stuff in order to make it turn back

teal ferry
teal ferry
red flower
#

i have a joker that transforms into other jokers each round but the implementation is complicated haha

umbral zodiac
teal ferry
#

does add_card function support spawning with edition ?

#

at least i could make it like its same joker this way

red flower
#

yes edition = "e_key"

#

but i would recommend using set_ability to "transform" jokers

#

that keeps everything

teal ferry
#

soo how do i use set ability in joker

red flower
umbral zodiac
teal ferry
#

thank you guys.

umbral zodiac
#

the most helpful i can be is by posting the entire github (which is here); i have no idea what causes this (it's been in for a while, but i never realized it was my mod since i tend to not update mods for a while)
all i'm doing right now is disabling non-essential code and seeing if it changes anything

teal ferry
#

it didnt work. i think i did something wrong . calculate = function (self,card,context)
if context.end_of_round and context.game_over == false and context.main_eval and G.GAME.last_blind.boss and G.GAME.last_blind and not context.blueprint then
card.ability.extra.invis_rounds = card.ability.extra.invis_rounds + 1
if (card.ability.extra.invis_rounds == card.ability.extra.total_rounds) then
--SMODS.add_card{key = "j_my_master_hunter"}
--card:start_dissolve()
card:set_ability("j_my_master_hunter")
end
return {
message = (card.ability.extra.invis_rounds < card.ability.extra.total_rounds) and
(card.ability.extra.invis_rounds .. '/' .. card.ability.extra.total_rounds) or
localize('k_active_ex'),
colour = G.C.FILTER
}

    end
    if context.joker_main then
        return {
            chip_mod = card.ability.extra.chips,
            message = localize { type = 'variable', key = 'a_chips', vars = { card.ability.extra.chips } }
        }
    end
    --
    
end
#

it didnot turned into the other joker

umbral zodiac
#

yep

umbral zodiac
#

i really wish i could just ignore this but it's so annoying

teal ferry
#

could it be because j_my_master_hunter 's in_pool is false ?

teal ferry
tepid crow
teal ferry
#

searched it but couldnt find

crystal pivot
#

```lua
your text here
```

tepid crow
#

actually that article has broken pngs wtf lmao
oh only if you disable cookies. because that makes sense.

umbral zodiac
#

at this point i'm just going to cut out entire files from the files to load list until i find the issue

teal ferry
#
the code 
umbral zodiac
#

narrowed down to 2 files

violet oasis
#

Anyone has any examples on how to do badge implementation with Malverk? I used SMODS' take_ownership to add badges to vanilla jokers, but it seems to create a conflict with Malverk (the game closes with no error messages after clicking the Texture menu button).

I saw Malverk has support for badges, but while the syntax is similar to how it's used in SMODS.Joker, I dunno how to specify which Joker I want to add the badge to.

umbral zodiac
violet oasis
# violet oasis Anyone has any examples on how to do badge implementation with Malverk? I used S...

From what I understand, you add this block to your AltTexture:

    key = {
        name = 'new name',
        text = {'new desc text 1', 'new desc text 2'},
        badge = 'badge_string'
    }
}```

Then change `badge_string` to whatever you want and use it here, with the colors and text you want to show:

```Malverk.badges.badge_string = function(self, card, badges)
    badges[#badges + 1] = create_badge(badge_label, get_type_colour(self or card.config, card), nil, 1.2)
end```

But I'm not sure *where* to add the ``Malverk.badges.badge_string` function. Should it be outside of the AltTexture? Do you need to add one for each Joker I want to change? Or just one for each badge type? Do I also need one new AltTexture for each Joker/badge type?
pastel kernel
#

how do you apply gold seal to a playing card

rotund sable
#

how do i properly add the cards to the deck? rn im doing

for i, v in ipairs(G.deck.cards) do
    v:start_dissolve()
end
for i, v in ipairs(G.hand.cards) do
    v:start_dissolve()
end
local card_1 = SMODS.create_card { set = "Base", edition="e_polychrome", enhancement = "m_steel", seal = "Red", front = "S_J", area = G.discard }
local card_2 = SMODS.create_card { set = "Base", edition="e_polychrome", enhancement = "m_steel", seal = "Red", front = "S_J", area = G.discard }
G.E_MANAGER:add_event(Event({
    func = function()
        G.hand:emplace(card_1)
        card_1:start_materialize()
        G.GAME.blind:debuff_card(card_1)

        G.hand:emplace(card_2)
        card_2:start_materialize()
        G.GAME.blind:debuff_card(card_2)
        
        G.hand:sort()
        return true
    end
}))

which is inside a consumable with a custom type

pastel kernel
#
        if context.before and context.cardarea == G.play and context.main_eval then
            local talisman_cards = 0
            for _, playing_card in ipairs(context.scoring_hand) do
                if not playing_card.seal or playing_card.seal ~= 'Gold' then
                    playing_card:set_seal('s_gold', true)
                    talisman_cards = talisman_cards + 1
#

how do you apply gold seal to played cards?

red flower
#

the gold seal key is just "Gold"

red flower
red flower
#

i cant read the code well on my phone but does the message show up

#

@ tkd

teal ferry
#

it says active when i beat the boss

#

normally does it just before deleting iteslf and adding other joker

#

this time it just stays active

#

and nothing happens

red flower
#

did the commented code work before?

teal ferry
#

yes commented works properly

#

it was also your code

#

thats why it work 😄

red flower
#

no idea then
what's your smods version

teal ferry
#

lets see

#

0626b

red flower
#

hmm yeah no idea

#

that's how i do it in my mod at least

teal ferry
#

interesting

pastel kernel
#

oh yeah, what about this?

    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue + 1] = { key = 'Gold'}
        return { vars = { card.ability.extra.xchips, card.ability.extra.xchips_mod } }
red flower
#

i might be missing something because reading code on discord mobile is a pain

teal ferry
#

no problem. i apreciate the effort

#

thank you as always

rigid solar
#

So I've created a Joker that says "Stone cards have their own rank" (meaning you can do 5oak with stone for example). For it to work, I created a new rank, and I applied a lovely patch to Card:get_id() saying if I have the joker and the card is stone, return the new rank.

Now, I don't want any card in the game to have that rank (like, cards from booster packs/magic trick or from cards that randomize ranks). The rank exists just for this Joker. How would I prevent this rank from generating in any way? Or is there a better way to code this joker maybe?

vast night
#

I thought i'd never need to ask again here, but what I'm doing is so complicated i just don't understand.

  • How do I add a new tab to the game info screen that works a bit like the voucher menu, just for single card sprites (not jokers, not playing cards but custom cards)
  • How do I store data in the run save?
  • What is the discard equivalent of ease_hands_played(1)?
vast night
rigid solar
#

like that?

vast night
#

try spawning in many mega standard packs with db+

rigid solar
#

yeah

#

ahah nope, decks have the rank

#

and the 1st mega standard has it too lmao

teal ferry
vast night
rigid solar
#

i did

teal ferry
#

time to git reset --hard. to working version

pastel kernel
#

can you even retrigger gold seal cards?

teal ferry
#

yaaay it works when i dont try to execute a code about local variables when theres no such card to hold variables. thanks @red flower

graceful brook
#

Could anyone help me figure out how to have a list of jokers be debuffed in the collection?

pastel kernel
vast night
graceful brook
#

I mean in the collection

pastel kernel
vast night
graceful brook
#

I'm trying to have this be persistent

vast night
vast night
graceful brook
#

I've been trying to find those tbh

#

but I haven't been able to find where I can hook into them

#

or where they are for that matter

chrome widget
pastel kernel
#

The description says
"Sisyphus Prime - Applies Talisman to played cards in hand, Gains x2 Chips per scored Talisman card, Retriggers Talisman cards, stockpiles xchips and unleashes it at the end of hand."

vast night
vast night
#

an enhancement?

#

or the rank you are saying?

pastel kernel
#

but i just wrote it as talisman

#

the spectral card used to apply a gold seal

vast night
#

and

#

so your description is:

Applies Gold Seal to Played Hand.
Gains X2 Chips per Scored Card with Gold Seal and retriggers them.
XChips Reset each Hand
#

hm

pastel kernel
#

stockpiles xchips, unleaashes them in played hand and resets them.

#

my main concern is just gold seal

#

it does gain permanent xchips on played gold seals

vast night
vast night
#

i think i understood incorrectly

pastel kernel
#

xchips get stockpiled per hand, so each card gives xchips like x2, x4, x8, x16, x32

pastel kernel
#

if permanent xchips x4, then it would be x4, x8, ...

#

wait

#

is that right?

#

yeah

#

xchips > x 2 > x 2 > x 2 > ...

vast night
#

are you meaning that the joker gains x2 chips every time a gold seal scores?

pastel kernel
#

it stores all your xchips and passes it on to the next card, doubling the xchips

vast night
#

and does it reset after the hand was played?

pastel kernel
#

i'm supposed to be making an interest based joker

#

maybe i can do it better.

#

instead of retriggering gold seal cards

vast night
#

card.ability.extra.xchips = card.ability.extra.xchips * 2 every time a gold seal scores
card.ability.extra.xchips = 1 after scoring finished

pastel kernel
#

um

#

xchips isn't the issue

#

the issue is not being able to apply gold seals

#

i'll just find a better method

#

instead of applying gold seals

#

it instead applies gold enhancement on played cards

#

and gains money from them

vast night
rapid stag
#

no change

graceful brook
#

I can't find them

normal crest
#

are you calling copy_card anywhere

rapid stag
#

other than this hook? yes

in one of my jokers

normal crest
#

show me the call

rapid stag
#

cartomancer appears to be the culprit - deck opens just fine with only it off

rapid stag
ancient mango
#
SMODS.Joker {
    key = "top_hat",
    atlas = 'SpiderSushiMod',
    pos = { x = 0, y = 0 },
    config = { extra = { chips = 15, mult = 10 } },
    rarity = 3,
    discovered = true,
    cost = 7,
    blueprint_compat = true,
    loc_vars = function(self, info_queue, card)
            return { vars = { card.ability.extra.chips, card.ability.extra.mult }}
    end,
    calculate = function(self, card, context)
        if context.joker_main then
            return {
                chips = card.ability.extra.chips,
                mult = card.ability.extra.mult
            }
        end
    end
}

how do i make it so top_hat activates every time a jack is used

normal crest
# rapid stag calls

well, honestly I can't tell in this code, but according to the crash log copy_card is being called with the string "294" as the first parameter

#

or in the latest one it was "399"

rapid stag
normal crest
pale holly
#

Hello !
I'm trying to make my joker trigger to debuffed cards but won't do anything, and i the card removal effect will only trigger once even if there's two cards removed, help to fix this would be appreciated thanks !

normal crest
#

it's not an issue with your mod, your hook looks fine to me

rapid stag
#

great, thanks

#

now to figure out what's going on with my joker

bleak plover
#

Hey y'all I'm wanting to get into Modding Balatro. Any good place to start or learn how too?

pale holly
#

Check mods you like, the closer to vanilla the better for starters, check the smods wiki as well of Vanilla Remade, great resource that remake the vanilla jokers but in the modding context, this will help you a lot

gilded blaze
#

download via green Code button

rapid stag
#

bump - so far, i've figured out:

  • moving the stuff in the return table's func to before it and removing the func made the stuff in the func work, but not the message. so it doesn't like this specific return
  • i wondered if it was a syntax or specific issue with the way i was forming this message, so i tried an eval SMODS.calculate_effect() with this message and it worked just fine
  • i tried doing return { message = 'Test' } outside of any context at the end of the calculate and that worked as expected
  • i wondered if it was an issue with changing a joker into another joker via set_ability but it persisted
    for some reason, it doesn't seem to like this specific return table in this specific circumstance? it just behaves as shown. it doesn't even crash, it does nothing. as if i never specified a return table
vast night
daring fern
flat mist
#

How can we see the code for a inbuilt jokers

#

Which file contains it

daring fern
vast night
vast night
pastel kernel
#

How do you apply gold “enhancement” to played cards?

daring fern
placid star
#

what are those files people use that move your mod info into a seperate file?

#

moving this into another file e.g

daring fern
near oak
#

When its needed, is the joker key j_prefix_joker or prefix_j_joker

pastel kernel
#

Ok so it’s kind of hard to create Sisyphus Prime’s ability.

#

Atleast for me

#

What other proposed abilities should I give him?

near oak
bleak plover
flat mist
#

Can someone programm a joker for me

#

I don't know how to code

lament agate
#

@daring fern you're still working on seals on every?

lament agate
ancient mango
#

is there a way to do this:

{X:attention,C:white}Top Hat{}

without removing the space between top and hat(this is in the en-us localization file)

lament agate
pastel kernel
#

is my "if boss blind is defeated" condition correct?

if context.end_of_round and context.cardarea == G.jokers and not context.blueprint and G.GAME.blind.boss and G.GAME.blind:get_type() == 'Boss' and G.GAME.blind:cleared() then
flat mist
pastel kernel
flat mist
daring fern
flat mist
#

I can make simple but it's harder

lament agate
placid star
#

does your game die when you have no hand size or when you cant draw any cards? so even if u have 0 hand size but you have a joker to draw cards will you live?

flat mist
placid star
#

damn ill need to hook :(

ancient mango
lament agate
ancient mango
#

no like where and how do i put in the loc_vars

pastel kernel
#
            if context.end_of_round and context.main_eval and not context.blueprint and G.GAME.blind.boss then
            card.ability.extra.xchips = card.ability.extra.xchips * 20
            card.ability.extra.interest = card.ability.extra.interest * 20
            card:juice_up(0.5, 0.5)
            play_sound('holo1', 1, 0.5)
            return {
                message = "Yes, that's it!",
                sound = "sisyphus_yesthatsit",
                colour = G.C.GOLD
            }

doesn't work.

#

doesn't work on trigger

lament agate
daring fern
ancient mango
#

in here:

return {
    descriptions = {
        Joker = {
            j_ssm_top_hat = {
                name = "Top Hat",
                text = {
                    "Played {C:attention}Jacks{}",
                    "give {C:chips}+#1#{} Chips and",
                    "{C:mult}+#2#{} Mult when scored"
                }
            },
            j_ssm_bottom_hat = {
                name = "Bottom Hat",
                text = {
                    "Gives {C:chips}+#1#{} Chips",
                    "and {C:mult}+#2#{} Mult",
                    "if adjacent to {X:attention,C:white}Top Hat{} Joker",
                }
            }
        }
    }
}
lament agate
#

in your main lua

#

not in your

#

loc file

pastel kernel
#

help

flat mist
#

Can you make a joker to show different text when buy it and different text when you see it in collection

summer furnace
#

does anyone have a solution for this issue?

lament agate
#

no idea until now

#

stretched is caused by wrong res methink

#

its 71x95

summer furnace
#

thats the funny bit

#

it is the right res

#

one frame is 71x95

lament agate
#

lmao

#

well fuck

#

uhh

#

i never tried animating one before

flat mist
# lament agate no idea until now

if card.area and (card.area.config.type == 'collection' or card.area.config.type == 'shop') then
return {
main_start = {
{ n = G.UIT.T, config = { text = "you shitty clown", colour = G.C.RED, scale = 0.4, shadow = true } }
}
}
end

#

Would this work

pastel kernel
lament agate
#

@daring fern could help

#

i have no idea

ancient mango
#

what color(hex) is attention(the orange one)

daring fern
ancient mango
#

thx

lament agate
#

fuck

#

so close

rapid stag
daring fern
pale holly
#

Ah

#

so should i just change to non scoring cards ?

pastel kernel
#

ok fuck trying to look for answers at 1AM, i'm going to bed.

daring fern
red flower
pale holly
flat mist
flat mist
lament agate
#

i need

#

hlep

red flower
lament agate
#
calculate = function(self, back, context)
        if context.end_of_round and not context.repetition and not context.individual then
            if G.GAME.blind.disabled and not G.GAME.blind.skipped then
                G.E_MANAGER:add_event(Event({
                    trigger = 'after',
                    delay = 0.4,
                    func = function()
                        local joker_pool = {}
                        for _, joker in pairs(G.P_CARDS) do
                            if joker.set == "Joker" and joker.rarity == 1 then
                                table.insert(joker_pool, joker.key)
                            end
                        end
                        
                        if #joker_pool > 0 then
                            local joker_key = pseudorandom_element(joker_pool, pseudoseed('welcomebacktosloplive'))
                            SMODS.add_card({
                                key = joker_key,
                                area = G.jokers,
                                from_card = nil,
                                discovered = true
                            })
                        end

                        local consumable_types = {'Tarot', 'Planet', 'Spectral'}
                        local chosen_type = pseudorandom_element(consumable_types, pseudoseed('thanksforsloppingby'))
                        
                        SMODS.add_card({
                            set = chosen_type,
                            area = G.consumeables,
                            from_card = nil,
                            discovered = true
                        })
                        
                        return true
                    end
                }))
            end
        end
    end
}
#

this doesnt spawn anything after

#

defeating a blind

#

what did i do rong

red flower
#

i dont think blind.skipped is a thing

lament agate
#

fuck

#

only that?

red flower
#

im still reading
jokers are G.P_CENTERS not G.P_CARDS

lament agate
#

right

primal robin
#

You know, that looks kinda cool. A lot of numbers, he-he.

So, basically tabs UI and pagination ready, now... API?

red flower
#

you also dont need to do any of that, add_card can spawn a common directly

lament agate
#

set joker rarity 1?

red flower
#

SMODS.add_card{set = "Joker", rarity = "Common"}

lament agate
#

its not a number?

red flower
#

you can do a number but theyre different for add_card

lament agate
#

right

#

the consumable is right too?

red flower
#

that looks fine

ancient mango
#

how do i make bottom_hat activate only if its adjacent to top_hat:

SMODS.Joker {
    key = "top_hat",
    atlas = 'SpiderSushiMod',
    pos = { x = 0, y = 0 },
    config = { extra = { chips = 15, mult = 10 } },
    rarity = 3,
    discovered = true,
    cost = 7,
    blueprint_compat = true,
    loc_vars = function(self, info_queue, card)
            return { vars = { card.ability.extra.chips, card.ability.extra.mult }}
    end,
    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play and context.other_card:get_id() == 11 then
            return {
                chips = card.ability.extra.chips,
                mult = card.ability.extra.mult
            }
        end
    end
}

SMODS.Joker {
    key = "bottom_hat",
    atlas = 'SpiderSushiMod',
    pos = { x = 1, y = 0 },
    config = { extra = { chips = 50, mult = 50 } },
    rarity = 1,
    discovered = true,
    cost = 3,
    blueprint_compat = true,
    loc_vars = function(self, info_queue, card)
            return { vars = { card.ability.extra.chips, card.ability.extra.mult, colours = { HEX('FF9A00') } } }
    end,
    calculate = function(self, card, context)
        if context.joker_main then
            return {
                chips = card.ability.extra.chips,
                mult = card.ability.extra.mult
            }
        end
    end
}
red flower
lament agate
red flower
lament agate
ancient mango
red flower
lament agate
#

fuck

rapid stag
lament agate
vast night
rapid stag
# vast night and the message dosent show up?

yes.

it used to be that the entirety of that prior if statement was in a function in the return table and that didn't happen either

so for whatever reason, the game is just not doing anything with this return table

red flower
ancient mango
lament agate
red flower
lament agate
#

@gaunt thistle wrong chat

#

LMAOOOOOOOOOOOOOOOOOOOOOOOOOOOO

#

BAHAHAHAHA

gaunt thistle
lament agate
#

grr

gaunt thistle
#

LMAOOOOOOOOOOOOOOOOOOOOOOOOOOOO

#

BAHAHAHAHA

#

ok lets go to modding chat

shell timber
#

modding-dev is civilised, as opposed to modding-chat

lament agate
#

the difference being this chat is more productive

#

hush

ancient mango
red flower
#

next(SMODS.find_card("j_modprefix_key")) checks if you own it

vast night
ancient mango
red flower
#

I know, and I already told you how to do it lol

rapid stag
ancient mango
red flower
#

well, I'm sorry

#

This channel is for modding help, not for someone else coding it for you

modern kindle
#

hi N

red flower
#

hi dilly!

modern kindle
#

how are you my friend

red flower
#

im sick again..
wbu

ancient mango
modern kindle
# red flower im sick again.. wbu

D:
get some soup, water, and rest
im okay, i went to get my rent from the atm yesterday and it ate my money so i had ot call the bank and they claim ill get it back in a few days so im waiting for that

400 bucks missing thank god i didnt try and pull more
otherwise its been hot here and is getting hot this week too

red flower
rapid stag
#

wouldn't just putting the next call in an if statement do that, though

#

oh specific slot

yeah, the for loop is probably the best bet for that, then

just loop through G.jokers.cards until you find your jokerand put the index into a variable. there's your slot number

red flower
summer furnace
#

are there any video to spritesheet converters, that are good to use? since I really do not want to space out every single frame (73) 1 pixel away 😭

pale holly
#

so, how do i make the card trigger for more than one card being removed (hangman for exemple)

modern kindle
#

i am being safe :D
i got plenty of water and all that

daring fern
pale holly
summer furnace
red flower
summer furnace
#

I'll do that thanks!

near oak
#

anyone know whats going on with this? my mods made with joker forge and crashes on startup

near oak
pale holly
#

well it seems to be main.lua, so around the line 212 from what i see

#

also joker forge is still quite a WIp and from what i remember, it's simplified lua, so the way it'll be coded may not work correctly

near oak
vast bough
#

probably a bug with a specific combination of triggers, conditions, and effects

pale holly
# near oak

i'm pretty sure something like created spectral doesn't even exist, more like add consumable spectral

#

unless it's a local

vast bough
vast bough
#

I will have a little look at it tonight when I'm home

rapid stag
#

bump:

  • moving the stuff in the return table's func to before it and removing the func made the stuff in the func work, but not the message. so it doesn't like this specific return
  • i wondered if it was a syntax or specific issue with the way i was forming this message/localize call, so i tried an eval SMODS.calculate_effect() with this return table and it worked as expected
  • i tried doing return { message = 'Test' } outside of any context at the end of the calculate and that worked as expected, so it's specifically this return
  • i wondered if it was an issue with changing a joker into another joker via set_ability, but it persisted when i tested it by spawning it from collection
  • there's no issues with printing the return table. that behaves as expected.
  • tested this during a blind to the same problem
  • testred other return tables and they work as expected
    here is the current calculate function with the return that is misbehaving highlighted:
pale holly
# near oak

one thing i would recommand is to put the jokers in a separate lua file, sure keeping all in the same lua file works but it'll be easier if you have separate files and everything
though again i suppose it's Joker FOrger way to work

#

Also, do you know a lil about manual joker codding ?

vast bough
#

and I want to add export options so if you would prefer each joker be it's own lua file in a joker folder, you can do that

#

that sorta thing

#

cos I've seen a couple mods do that too

pale holly
misty gorge
#

this code for some reason keeps giving me "attempt to compare table with number" errors, even when inserting to_big()

pale holly
vast bough
#

thankfully there's already ways to export individual joker files (added I last night), but you are right, export options would be great

daring fern
red flower
misty gorge
daring fern
misty gorge
#

Damn

rapid stag
red flower
#

let me check

#

also funny

lament agate
#

how do i set Jokers edition with add_card?

lament agate
rapid stag
daring fern
flat mist
#

Do I need to restart the game every time I update the code or is there any quicker way

pale holly
rapid stag
#

oh, inside add_card

lament agate
#

different approaches

lament agate
#

thanks

rapid stag
#

yeah, that should work in the add_card table

lament agate
daring fern
rapid stag
#

yes

lament agate
#

tyty

magic mauve
tepid crow
red flower
#

how that doesn't create major compatibility issues for mods that aren't made for Talisman in mind

🙂

sand sandal
#

is there a way to change card enhancement with a function

daring fern
red flower
summer furnace
#

for a spritesheet you only need 1 pixel distance between 2 sprites right?

daring fern
summer furnace
#

oh okay!

sand sandal
tepid crow
#

Mods, get him

red flower
#

<@&1133519078540185692>

sand sandal
daring fern
keen gorge
#

🔫

magic mauve
tepid crow
#

thanks gothic

tepid crow
#

Unless the non-talisman-requiring mod adds compatibility for talisman

red flower
#

most devs are aware of Talisman so they add compatibility themselves

summer furnace
#

why the hell does my animated joker move to the left by one pixel every frame 😭

tepid crow
#

lmao

summer furnace
#

I mean the animation itself not the joker lmao

sand sandal
#

this should coverts cards into hearts polychrome steel kings right?

red flower
#

or the defined size in the atlas

red flower
magic mauve
# tepid crow They just don't. It crashes

They just don't. It crashes

most devs are aware of Talisman so they add compatibility themselves
Those were my best guesses, mostly I was hoping there was a different answer but.... well good to know ^^

red flower
#

we are also hoping there's a different answer someday lol

magic mauve
#

Hehe, hopefully ^^

flat mist
#

Is there any way to make a card show different text during collection and when you buy it

keen atlas
red flower
sand sandal
red flower
sand sandal
#

anyway edgy

pliant garden
frigid perch
#

Something odd: When I add a third joker, it always becomes foil?

#
Game.main_menu = function(change_context)

    local ret = mainmenuref2(change_context)

    local newcard = SMODS.create_card({key='j_hanging_chad',area = G.title_top})
    G.title_top.T.w = G.title_top.T.w * 1.7675
    G.title_top.T.x = G.title_top.T.x - 0.8
    G.title_top:emplace(newcard)
    newcard:start_materialize()
    newcard.T.w = newcard.T.w * 1.1 * 1.2
    newcard.T.h = newcard.T.h * 1.1 * 1.2
    newcard.no_ui = true

    local newcard = SMODS.create_card({key='j_brainstorm',area = G.title_top})
    G.title_top.T.w = G.title_top.T.w * 1.7675
    G.title_top.T.x = G.title_top.T.x - 0.8
    G.title_top:emplace(newcard)
    newcard:start_materialize()
    newcard.T.w = newcard.T.w * 1.1 * 1.2
    newcard.T.h = newcard.T.h * 1.1 * 1.2
    newcard.no_ui = true
    return ret
end```
#

No idea why it would

sand sandal
wintry solar
summer furnace
pliant garden
frigid perch
daring fern
rugged crown
#

is there a way for a deck or a stake to set certain boss blinds for ante? Like if i wanna do ante 1 you play this blind

pliant garden
frigid perch
#

Would that be just under the SMODS line?

#

Sorry, I'm very new to this

daring fern
summer furnace
#

Would it be possible to somehow remove all decks except for one an every challenge from the game? (it's for a joke mod for my friend)

chrome widget
#

Talisman support is unfortunately a case of "Talisman got in early so now everyone must subscribe to it"

frigid perch
daring fern
rugged crown
frigid perch
summer furnace
rugged crown
daring fern
next timber
#

how would i make a joker do something every 0.25 seconds?

umbral zodiac
red flower
graceful brook
#

Could someone help me find where i can hook into the collection rendering to debuff some jokers?

summer furnace
#

Sooo I have this problem that tthe game crashes when I try to give a joker with a tarot card, but a specific pool only (and yes the pool is the same) Does anyone have a solution for this?

    key = 'givehdjoker',
    set = 'Tarot',
    object_type = 'Consumable',
    name = 'finushd',
    loc_txt = {
        name = 'FinusHD',
        text={
        'Erstellt einen rndm',
        '{C:attention}Finushd Joker{}',
        '{C:inactive}(braucht Raum){}',
        },
    },
    
    
    pos = {x=0, y= 0},
    order = 99,
    atlas = 'consumatlashd',
    unlocked = true,
    cost = 4,

    use = function(self, card, area, copier)
        local card = create_card('HDJoker', G.Jokers, nil, nil, nil, nil, nil, 'finushd')
        card:add_to_deck()
        G.jokers:emplace(card)
    end,

    can_use = function(self, card)
        if #G.jokers.cards < G.jokers.config.card_limit then
            return true
        end
    end,
}```
red flower
graceful brook
#

yes

#

I have a list of jokers I want to show debuffed in the collection

red flower
#

I would look into how the Banner mod does it

graceful brook
#

oh thats exactly what i need, thanks

summer furnace
red flower
#

can i see the objecttype

magic mauve
#

I've been curious about custom main menu cards, but one thing I notice is, using the same code as above with Perkeo, jokers with floating sprites appear to be off-centered

pliant garden
#

so many discussions about main menu cards

#

i want my main menu to have 70

#

make de mods

magic mauve
#

Hehe, well it's mostly the previous discussion about main menu cards that made me look this up ^^
As far as I can see in the search bar though, it doesn't seem to happen that often ^^

summer furnace
red flower
summer furnace
#

pools = {['HDJoker'] = true}, I have this for every joker I made

red flower
#

thats not enough, you need to make an SMODS.ObjectType

summer furnace
#

wdym?

red flower
#

you need to make an objecttype for that pool to be registered

summer furnace
#

oooh okay how do I do that?

red flower
faint yacht
sage crater
#

currently oscillates between 17 and 3

#

making it go from like +20 to -5 would be funny

pliant garden
red flower
faint yacht
#

-# Phone, yeah, valid.

sage crater
modern kindle
#

N go to sleep you're sick

red flower
#

im working

modern kindle
#

Tell them you're sick

#

I will have to intervene

red flower
#

i did, im working from home but im not sick enough to not work..

granite nymph
#

is there ANY possible way to make a card edition add or minus a value

#

(eg: add +5 mult when discarded or something)

daring fern
granite nymph
#

the card gains mult

#

and when its played it gives all its mult

daring fern
placid star
#

is there a way to print functions that are called?

placid star
daring fern
placid star
final jewel
#

Is there a way to prevent playing card to to spawn with a custom enhancement in the shop or in packs ?

final jewel
daring fern
final jewel
#

kk thx

placid star
daring fern
vast night
#

Hi. A friend of mine is testing my mod and for some reason they get like 0-1 fps (according to db+) and he got this crash when opening his mods folder. could someone help please? (I honestly dont think this happened because he opened the folder but i still dont get the problem)

Oops! The game crashed:
[SMODS _ "src/game_object.lua"]:3462: attempt to index local 'start_colour' (a nil value)

Additional Context:
Balatro Version: 1.0.1o-FULL
Modded Version: 1.0.0~BETA-0614a-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.8.0
Platform: Windows
Steamodded Mods:
    1: Fates Mod by ItsGraphax [ID: fates, Version: 1.0.5]
    2: DebugPlus by WilsontheWolf [ID: DebugPlus, Version: 1.4.2, Uses Lovely]
Lovely Mods:

Stack Traceback
===============
(3) LÖVE metamethod at file 'boot.lua:352'
Local variables:
 errhand = Lua function '(LÖVE Function)' (defined at line 575 of chunk [lovely debugplus.console "debugplus/console.lua"])
 handler = Lua function '(LÖVE Function)' (defined at line 575 of chunk [lovely debugplus.console "debugplus/console.lua"])
(4) Lua method 'update' at Steamodded file 'src/game_object.lua:3462' 
Local variables:
 self = table: 0x1c785710  {1:0.92904714116297, 2:0.409622191288, 3:0.35617639871202, 4:1, prefix_config:table: 0x1c799828, original_key:warning_bg, registered:true, colours:table: 0x1c2ce9e0 (more...)}
 dt = number: 0
 timer = number: 0
 start_index = number: 0
 end_index = number: 1
 start_colour = nil
 end_colour = table: 0x1c13af88  {1:0.99607843137255, 2:0.37254901960784, 3:0.33333333333333, 4:1}
 partial_timer = number: 0
 (for index) = number: 1
 (for limit) = number: 4
 (for step) = number: 1
 i = number: 1
 (*temporary) = C function: next
 (*temporary) = table: 0x1c494ca0  {1:table: 0x1c494e18, 2:table: 0x1c62e4c8, 3:table: 0x1c45bfe0, 4:table: 0x1c45c758}
 (*temporary) = number: nan
 (*temporary) = number: 1
 (*temporary) = string: "attempt to index local 'start_colour' (a nil value)"
#

tell me if you would need an extended version ^_^

vast night
# daring fern Code?

thats the fun part. there is probably no error on the mod's side since the crash happens in smods, but it is in my game:update hook so here is the update hook:

local game_update_ref = Game.update
function Game:update(dt)
    -- pre hook
    local ret = game_update_ref(self, dt)
    -- post hook

    -- update websocket client
    client:update()

    -- wait for poll screen
    if self.STATE == self.STATES.FATES_WAIT_FOR_POLL then
        self:update_wait_for_poll(dt)
    end

    -- game timer
    local countdown = math.floor(60 - (G.TIMERS.REAL - FATES.TimerStamps.COUNTDOWN))
    if countdown > 0 then
        FATES.Timers.COUNTDOWN = countdown
    else
        FATES.Timers.COUNTDOWN = 0
    end

    -- return hook
    return ret
end
daring fern
vast night
#

here is the full crash

rapid stag
#

bump:

  • moving the stuff in the return table's func to before it and removing the func made the stuff in the func work, but not the message. so it doesn't like this specific return
  • i wondered if it was a syntax or specific issue with the way i was forming this message/localize call, so i tried an eval SMODS.calculate_effect() with this return table and it worked as expected
  • i tried doing return { message = 'Test' } outside of any context at the end of the calculate and that worked as expected
  • i wondered if it was an issue with changing a joker into another joker via set_ability, but it persisted when i tested it by spawning it from collection
  • there's no issues with printing the return table, behaves as expected.
  • tested this during a blind to the same problem
  • tested other return tables in other contexts and they work as expected
  • tested trying to return any kind of valid joker return table during context.remove_playing_cards, game seems to just not want to do anything with tables returned during this context. seems to be a problem unique to me?
    here is the current calculate function with the return that is misbehaving highlighted:

how do i fix my return table not working as expected? the problem is that nothing is happening. it's as if i'm not returning anything

vast night
rapid stag
#

you can do either localize{} or localize({})

#

the former just does the latter

vast night
#

well what does it show then

#

add an or "BROKEN" to see if the returned value is nil

urban wasp
#

how do i use a vanilla shader as the shader in my edition

#

i.e. i want my edition "really negative" to use the negative shader from vanilla

daring fern
urban wasp
#

nah doesn't work

#

i get a crash telling me it attempted to index a number value

vast night
vast night
urban wasp
#

then how can i make it work, if at all?

daring fern
vast night
#

G.STATE

vast night
#

between cash out and shop

placid star
#

oh thats fire!

#

did you have to do alot of ui work with nodes to do that?

vast night
#

i actually wanted to keep the mod a surprise

#

but oh well

placid star
#

well it looks incredible

placid star
#

and i have alot of trouble with ui but i think this is the motivation i need to finally learn it

rapid stag
placid star
vast night
rapid stag
vast night
vast night
rapid stag
normal crest
rapid stag
#

is this something that's been fixed in dev since?

normal crest
#

I don't know

vast night
rapid stag
normal crest
#
SMODS.Joker {
  key = 'testw',
  loc_txt = {
    name = "w",
    text = {}
  },
  calculate = function(self, card, context)
    if context.remove_playing_cards then
      return { message = "Test! " }
    end
  end
}

This works perfectly fine, I'm on a dev build of smods tho

rapid stag
#

i'll take a look

normal crest
#

Before that

#

Make sure you have no other mods enabled when you try it

rapid stag
#

i did also try with minimum enabled mods, but i'll try agian

hasty mist
#

how can i check what rarity pool a joker is in

#

actually can i just

#

view an entire rarity pool with debugplus

#

how can i do that

placid star
#

how can i do something AFTER all joker effects have triggered? e.g.
i have a joker that draws a card to hand at the start of the round, and i have implemented a change that stops hand size =0 from killing you. instead i want all joker effects to trigger THEN itll check for how many cards are drawn, then if its 0 will kill you

placid star
copper thorn
#

what did i do wrong ?

loc_vars = function(self, info_queue, card)
        return { vars = { G.jokers and math.max(3, (G.jokers.config.card_limit + #G.jokers.cards) + #SMODS.find_card("j_awak_li", true)) or 1 } }
    end,
    calculate = function(self, card, context)
        if context.joker_main then
            return {
                xmult = math.max(3,
                    (G.jokers.config.card_limit + #G.jokers.cards) + #SMODS.find_card("j_awak_li", true))
            }
        end
    end
}```
final jewel
#

How can I change the color of a part in the description of a joker like a part change from {C:green} to {C:blue} if a joker is present.

daring fern
copper thorn
#
SMODS.Joker {
key = "li",
    loc_txt = {
        name = "{C:dark_edition}The Abrupt One",
        text = {
            "{X:mult,C:White}X2{} Mult",
            "for every filled joker slot",
            "{C:inactive}This joker inculded",
        }
        
    },
    atlas = "li",
    soul_pos = {x = 0, y = 1},
    rarity = "awak_li",
    pos = { x = 0, y = 0},
    cost = 50,
    unlocked = true,
    discovered = true,
    blueprint_compat = true,
    eternal_compat = true,
    perishable_compat = true, 
    loc_vars = function(self, info_queue, card)
        return { vars = { G.jokers and math.max(3, (G.jokers.config.card_limit + #G.jokers.cards) + #SMODS.find_card("j_awak_li", true)) or 1 } }
    end,
    calculate = function(self, card, context)
        if context.joker_main then
            return {
                xmult = math.max(3,
                    (G.jokers.config.card_limit + #G.jokers.cards) + #SMODS.find_card("j_awak_li", true))
            }
        end
    end
}```
final jewel
daring fern
copper thorn
#

wow

#

im writing at night don't worry

hasty mist
#

okay these are supposed to be removing each joker it lands on out of their own rarity pool and into the common rarity pool, why isn't it working?

#

the rarities visually update, but they dont move pools

violet oasis
# violet oasis From what I understand, you add this block to your AltTexture: ```{ key = { ...

Just in case anyone runs into the same issue as me, I figured out what was causing it. Apparently using take_ownership on the base joker causes Malverk to close the game if I press the Texture button in the options menu. I assume it's because the base joker texture is used on the GUI screen. Using take_ownership on any other jokers works without issue. Not 100% sure if I'm missing something, but reported it to the creator regardless. Hopefully this helps other people!

daring fern
hasty mist
# daring fern Try using `SMODS.remove_pool` and `SMODS.insert_pool`

how would i implement SMODS.insert_pool here? SMODS.remove_pool seems self explanatory, i can just use that instead of table.remove, but i dont know what to do with the current G.P_JOKER_RARITY_POOLS[1][card.ability.extra.current] = center part, simply replacing it doesnt seem to be correct

daring fern
copper thorn
#

how do i make a ^?? Mult ?

#

maube needs more context sorry

daring fern
copper thorn
#

i don't wanna bother with dependencies tonoght, sorry for the bother tho,

#

ima check on itlater

hasty mist
daring fern
daring fern
rapid stag
normal crest
#

what is minimum mods enabled

#

just the one mod with the joker and debug plus i imagine

rapid stag
#

debug plus, my mod and malverk.

normal crest
#

What else does your mod have

hasty mist
#

i dont understand catsob

daring fern
placid star
hasty mist
granite nymph
#

would the opposite of card.ability.extra.chip_gain
be card.ability.extra.chip_loss

rapid stag
# normal crest What else does your mod have

in terms of what, exactly cirDerp
i do hook SMODS.calculate_context but only to add a specific thing during context.end_of_round
i also have a bunch of other hooks like draw_from_play_to_hand
but nothing that should specifically disrupt context.remove_playing_cards, especially in a way that only specifically prevents return tables from doing anything.
i have patches, but again, nothing that should be touching this specifically

normal crest
#

try it without your mod

daring fern
placid star
#

since there isnt any scoring in this context

hasty mist
#

i hate rarity manipulation so much holy shit

#

absolutely impossible to work with

#

this is the code at the moment

rapid stag
normal crest
#

uhm

#

destroy a card using hanged man?

vast night
#

hey, where is the function stored that gets called once you lose / you end the game

rapid stag
#

why does context.remove_playing_cards care about the source of the destruction

vast night
rapid stag
vast night
vast night
#

😭 nvm

#

atleast it works now

normal crest
#

It's meant for debugging purposes

rapid stag
#

and that doesn't include testing implementations?

#

that's so confusing

normal crest
#

Anyway, it clearly doesn't work

rapid stag
#

i guess i'll raise it in the debugplus thread since this is just weird

copper thorn
#

i need help again, my joker is supposed to act like an inverted Stencil, X50 mult for each filled joker slot, it works fine with numbers under ten but with nulber bigger than ten it just acts like a simple X<10

#

this joker excluded too*

#

ima go to sleep i haven't checked the time, drop your help if you want i'll read them tomorrow

normal crest
# daring fern

okay I see, this does nothing because eval_card doesn't actually use the return value

#

I didn't expect debugplus to actually try and trigger that context

red flower
#

you dont need to count the joker itself since it should be in the joker slots already lol

scenic elm
#

What's the difference between ipairs() and pairs()?

normal crest
#

ipairs will loop thru consecutive integer indexes starting from 1

#

pairs will loop through all the keys

red flower
#

pairs is also not guaranteed to be in order

scenic elm
#

i'm not sure i get how that's different. could you elaborate? /genq
also, please @ me if responding :)

normal crest
#

Had to look it up but /genq apparently means genuine question

red flower
#

i say list because im very python brained i mean table

frigid cargo
#

how can i make it so if i have a specific joker, all jokers sell value becomes 0.

normal crest
#

if you're familiar with the concepts, ipairs treats the table as an array, pairs treats it as a dictionary

scenic elm
daring fern
scenic elm
normal crest
#

in javascript everything is objects tho

red flower
normal crest
#

and objects are practically tables

red flower
#

everything was tables the whole time!?

scenic elm
vast night
#

why tf does it crash w that

G.GAME.chips - G.GAME.blind.chips >= 0
normal crest
#

talisman 😱

scenic elm
vast night
scenic elm
#

you'd wanna run to_number() on it

vast night
scenic elm
#

are you doing to_number(G.GAME.blind.chips)?

vast night
#

sry

scenic elm
#

happens to the best of us lmao

daring fern
normal crest
#

is the to_big in chips even necessary

#

wouldn't it be only on the 0

scenic elm
daring fern
scenic elm
#

oh yeah, always use to_big when comparing in game numbers if you want or need talisman compat

#

any ideas why i'm getting an a nil value error when i try to access the ability field on this joker?

SMODS.Joker {
  key = "cultContractJ",
  atlas = "PLH",
  rarity = 3,
  pos = { x = 2, y = 0 },
  config = { extra = { repetitions = 3, suit = "Hearts" } },
  cost = 8,
  blueprint_compat = true,
  loc_vars = function(self, info_queue, card)
    local suit = card.ability.extra.suit or "Hearts"
    return {
      vars = {
        card.ability.extra.repetitions,
        localize(suit, 'suits_singular'),
        colours = { G.C.SUITS[suit] },
      }
    }
  end,

  calculate = function(self, card, context)
    if context.individual and context.cardarea == G.play and context.other_card.is_suit(card.ability.extra.suit) then
      return {
        repetitions = card.ability.extra.repetitions
      }
    end
  end,

  update = function(self, card, dt)
    if G.hand and card.added_to_deck then
      for i, v in ipairs(G.hand.cards) do
        if not v:is_suit("Hearts") then
          v:set_debuff(true)
        end
      end
    end
  end

  -- todo: add joker display compatibility @chore
}
red flower
#

context.other_card:is_suit

scenic elm
#

yeah just noticed it too lmao blindpepega

placid star
#

does anyone know if cards are actually drawn in draw_from_deck_to_hand ? i have this but it just kills me no matter if cards should be drawn and G.hand.cards should be populated

red flower
#

this is probably an event problem

#

wrap your stuff in an event so it runs after the drawing card events

placid star
#

do events happen after stuff outside of events run?

red flower
#

yes

placid star
#

ahh so thats what theyre used for, do i need to use a special trigger = '' thing?

red flower
#

i think the default one should be fine

static dagger
#

I'm trying to make played cards become queens, but they are being debuffed in the "cards previously played this ante" boss after being changed to queens, how could I fix this?

Here's the calculate function that I have so far:

    calculate = function (self, card, context)
        if context.before and context.main_eval and not context.blueprint then
            local found = 0
            for _, scored_card in ipairs(context.scoring_hand) do
                    found = found + 1
                    assert(SMODS.change_base(scored_card, nil, "Queen"))
                    G.E_MANAGER:add_event(Event({
                        func = function()
                            scored_card:juice_up()
                            return true
                        end
                    }))
            end
            if found > 0 then
                return {
                    message = "Slimed!",
                    colour = G.C.MONEY
                }
            end
        end
    end
red flower
static dagger
#

Oh, ok. Thank you

pulsar hawk
#

Is it possible to put shaders (i.e. polychrome) over a badge?

daring fern
pulsar hawk
daring fern
placid star
#

so i think the solution would be to call whatever function checks/triggers jokers then check for cards?

pulsar hawk
daring fern
red flower
placid star
red flower
#

well i dont think there's an easy way to do that without implementing your own hand_buffer or something

#

the event will always be too early for another card to be drawn

placid star
#

would there be another function i could use to check for G.hand.cards that would be late enough for the card to be drawn first?

red flower
#

no

#

oh wait i didnt fully understand what you meant
still no afaik, the problem is that there's no way to know that cards will be drawn in the future while also checking if cards were just drawn

#

you would need a hand_buffer like the joker_buffer or the dollar_buffer

#

(or hard-check for your joker)

placid star
red flower
#

no, it's not like an api thing, it's just a value that holds how many cards will be in the hand after events are played

#

look at how the vanilla cards use the buffer

#

basically the joker wants to increase the buffer by the amount of cards to be drawn
then you check for #G.hand.cards + hand_buffer < 1

#

you need to have an event inside an event inside the joker to clear it out

lament agate
#

pardon

#

but is

#

block = true a thing

red flower
#

in events?

placid star
#

would the joker on the context be the thing to add to the buffer?

lament agate
#

well in return

#

i wanted to block joker's effect for a deck

red flower
#

i think you can do blocking = true in returns

lament agate
#

ah thanks

red flower
#

oh that doesn't do that

#

that just blocks events from playing

lament agate
#

oh shit

#

is there a way tho

placid star
#

ill get on that tysm

red flower
placid star
# red flower yes

even with this and checking for #hand + hand buffer it still kills with the joker

#

oh shit event

#

i forgot

red flower
#

you should also print what hand + buffer is

primal robin
#

Entire day was spend on implementing all small things:

  • text label if there's no appropriate card center to display
  • alert, vanilla (!) or custom ones, where you can put anything, including DynaText
  • pagination

Next step - support different card sizes (booster packs, halfsie joker etc), more visual adjustments, and first actual features

#

I should make own thread actually, but I'm lazy trash

placid star
red flower
#

oh i just noticed that you arent checking if hand_buffer is nil

#

do you set it to 0 somewhere

placid star
#

i added it in init_game_object

red flower
#

that should probably be fine i guess

#

can i see more context on the joker code

placid star
red flower
#

oh, thats the opposite of what you want

#

the increase shouldnt be in an event, the decrease should be

#

also you should just set it to 0 when you reset it

rotund sable
#

how many fps do animated atlases have? or can i somehow change the fps of it?

placid star
red flower
#

did it print before?

placid star
red flower
#

the hand buffer is in the wrong side of the inequality

placid star
#

omg i just nloticed that

red flower
#

idk about the print, that seems to be a different logic error

placid star
#

and still, doesnt work

red flower
#

but from the code the idea is correct

#

so maybe it has to do with the luggage card logic

placid star
#

ive made sure that G.GAME.luggage_card is a card during testing

#

so that is strange

red flower
#

i mean the print should print regardless of any hand_buffer stuff in that case

placid star
#

its weird that it isnt working...

#

and i made sure that it isnt game overing before any of that happens

normal crest
#

@red flower brings a tear to my eyes

red flower
#

i will take it for myself

normal crest
#

MINE

placid star
#

I'll just have to hard check for my joker :c

red flower
#

lol

placid star
#

what checks for cards in hand being 0 then trying to draw cards?

wind steppe
#

how could i check the score limit for talisman in a different mod?

red flower
violet gulch
#

Anyone ever had an issue where enabling quantum enhancements in smods causes a hard crash/game close when selecting a joker once in the blind?

daring fern
#

There are some functions you can't use during context.check_enhancement that hard crash the game though.

violet gulch
#

and get_id() is one of them I'm assuming

daring fern
violet gulch
#

That'll do it. Thank you

rapid stag
#

oh question, do i do operations like to_big(var x) + to_big(var y) or to_big(var x + var y) cirDerp because i know talisman makes everything tables but i'm pretty sure you can't add tables

daring fern
daring fern
rapid stag
#

i see cirISee

#

goofy mod 😭

pastel kernel
#

i'm here again to try to ask for help again on my sisyphus prime joker again because again, it won't multiply its values after beating a boss blind.

#

i couldn't ask for help last time so i'm doing it again this time

frigid cargo
orchid dawn
#

hello, i have a question, is there any way I could make the small blind and big blind become boss blinds? In mechanics and appearance

orchid dawn
#

i tried for 2 hours

#

i really dont know

#

i wanna make a deck with 10 jokers slots, but all blinds are boss blinds

daring fern
orchid dawn
#

but, ty

daring fern
orchid dawn
#

ok

pastel kernel
#

i thought i had the answer but it still does not work. what am i doing wrong?

granite nymph
#

does anyone know how to fix the text at the bottom?

formal quest
#

How do I add to the base chips and mult preview before you hit "play hand"? I'm not sure I'm doing this right.

primal robin
wind steppe
#

how would i check if you've scored naneinf without talisman and on vanilla score limit talisman?

granite nymph
wind steppe
#

they only have four means of interacting with the world

daring fern
granite nymph
orchid dawn
#

hey @daring fern i tried looking at the cryptid code, but i didnt understand it, can you help me ?

granite nymph
orchid dawn
#

a mixer

wind steppe
granite nymph
#

aikoyoris shenanigans helped me more then cryptid

#

my biggest help was vremade

#

vanilla remade

orchid dawn
wind steppe
frigid cargo
wind steppe
#

what are you looking for

orchid dawn
#

i want a make the small blind and big blind become boss blind, in mechanics and appearance

a deck with this mechanic and 10 jokers slots

btw, sorry for mistakes, my english is dont very well

pastel kernel
#

i still don't know why my joker does not work

daring fern
pastel kernel
#

i mean i got the trigger function right

frigid cargo
wind steppe
orchid dawn
pure salmon
#

i think i've seen it done before but i can't remember where

orchid dawn
#

not the deck, but the hardest part, the blinds

wind steppe
#

uhhh challenger deep is doing something similar as well (hopefully with more readable code)

#

@mental nacelle

pastel kernel
#

this is my only problem

        if context.end_of_round and context.main_eval and not context.blueprint and G.GAME.blind.boss then
            card.ability.extra.xchips = card.ability.extra.xchips * card.ability.extra.xchips_mod
            card.ability.extra.interest = card.ability.extra.interest * card.ability.extra.dollar_mod
            card:juice_up(0.5, 0.5)
            play_sound('sisyphus_yesthatsit', 1, 0.5)
            return {
                message = "Yes, that's it!",
                sound = "sisyphus_yesthatsit",
                colour = G.C.GOLD
            }
        end
mental nacelle
#

hello

orchid dawn
#

can you help me? i really dont can :(

orchid dawn
mental nacelle
daring fern
wind steppe
mental nacelle
#

i mean the code is janky

orchid dawn
granite nymph
#

are you just saying yes to evertyhting

daring fern
mental nacelle
lament agate
#

do you actually need the card background for enhancement or just the enhancement itself

wind steppe
daring fern
orchid dawn
#

but, does it work with deck?

lament agate
orchid dawn
#

or somenthing challenges

mental nacelle
#

code block fail

mental nacelle
#

your deck would not work correctly without challenger deep installed

orchid dawn
#

i can use this in the my deck ?

granite nymph
frigid cargo
#
calculate = function(self, card, context)
        if context.selling_card or context.destroy_card then 
            card.ability.extra.xmult = card.ability.extra.xmult+card.ability.extra.xmult_gain
            return {
                message = localize('k_upgrade_ex'),
                colour = G.C.RED
            }
        elseif context.joker_main then 
            return {
                xmult = card.ability.extra.xmult
            }
        end
    end

why does the joker upgrade like 6 times whenever a hand it played

daring fern
mental nacelle
daring fern
orchid dawn
granite nymph
lament agate
#

well he's not wrong

orchid dawn
mental nacelle
frigid cargo
mental nacelle
#

i need to optimise chdp’s code someday