#💻・modding-dev

1 messages · Page 405 of 1

hybrid shadow
#

so like if context.setting_blind and context.blind == "Boss Blind" then?

#

i wanna have a joker that creates rare jokers when boss blind is selected

sturdy compass
#

I think just “Boss” is what you’d want

#

But yeah that syntax is correct

hybrid shadow
sturdy compass
#

Check how Wraith does it

#

Actually I think there’s documentation for that on the SMODS Utility Functions page for thr SMODS.create_card function

hybrid shadow
sturdy compass
#

That works too

hybrid shadow
#

smth im curious abt that i havent asked before is why do jokers have and not context.blueprint in some if statements (mainly ones that do mult gain)? is it to prevent blueprint from adding extra to itself, or is it to prevent blueprint from doubling the upgrade of jokers?

daring fern
#

No, actually the only reason would be to not show the message.

hybrid shadow
snow vale
#

how can i make so every played card counts as a wild card?

daring fern
snow vale
daring fern
cyan lagoon
daring fern
snow vale
cyan lagoon
daring fern
daring fern
snow vale
#

idk how to do quantum enhancements 😭

cyan lagoon
daring fern
snow vale
#

how do i enable?

daring fern
snow vale
#

okk

#

thanks

manic rune
cyan lagoon
#

aight

#

how can i stop context.individual triggering before the card?

daring fern
#

Also you can't calculate the effect of retriggers.

cyan lagoon
daring fern
cyan lagoon
#

like that?

snow vale
#

what's wrong here?

daring fern
daring fern
snow vale
daring fern
snow vale
daring fern
daring fern
snow vale
#

then what do i use?

daring fern
snow vale
#

:(

#

now it doesnt become flush for example

stiff quiver
#

how can i check a played card's enhgancement?

daring fern
stiff quiver
#

ok thanks!

#

i got this crash lua calculate = function(self,card,context) if context.repetition and context.cardarea == G.play then for _, playing_card in ipairs(context.full_hand) do if SMODS.has_enhancements(playing_card, "m_bonus") then return {repetitions = 1} end end end end,

thorn furnace
#

No idea what's wrong here
First image is the error, second is where it's detecting the error, third is the relevant code for the item i used that's causing the error

daring fern
thorn furnace
#

so it should just be one center

#

o

#

the thing that confuses me is rightmost is a card that has foil

#

so it does have enhancements

daring fern
thorn furnace
#

i might be too tired to be coding

#

same crash if I give the card steel

#

so doesn't seem to be related to not having an enhancement

daring fern
thorn furnace
#

i just wanna copy the enhancement of a card ;-;

undone slate
#

Hello, I don't think I can find a reference to this, but I'd like to know if it's possible to check within the joker cards which one has a rental tag.
I imagine it would be something like jokers.missing.rental

daring fern
undone slate
#

Thanks ;)

wicked leaf
#

how can I make an enhancement count as other enhancement?

#

I'm trying to find an example in other mods but I cant really find it

daring fern
rare torrent
#

so im new to modding, and a thought it this was a simple first joker to start (it wasn't), so i just wanted to make a simple joker that squares your multiplier (a little bit busted i know), the thing is i can't figure out how to multiply the multiplier by itself, it always keeps returning a nil value and defaults it to 1, probrably because calculate function calculates before even playing a hand

so yeah i would be very grateful if anybody got a solution for this, thanks in advance!

daring fern
rare torrent
#

really? let me try it

wicked leaf
#

As a joker effect

#

I want to make a joker count gold cards as steel cards

daring fern
wicked leaf
#

Isnt it disabled by default, which means that for most players it wont work?

daring fern
molten musk
#

any ideas for seal oriented jokers?

wicked leaf
#

any example around that can help me figure it out?

#

this is pretty much my first or second joker

rare torrent
rare torrent
#
-- author: omega
-- description: Adds jokers based on some of the cards of uNOPE
-- version: 1.0.0
-- compatibility: Steamod, Talisman

SMODS.Atlas{
    key = 'squared',
    path = 'squared.png',
    px = 71,
    py = 95
}

local squared_joker = SMODS.Joker{
    key = "squared",
    loc_txt = {
        name = "Squared",
        text = {"{C:red}Squares{C} your Multiplier"},
    },
    atlas = "squared",
    rarity = 3,
    cost = 32,
    unlocked = true,
    discovered = true,
    blueprint_compat = true,
    eternal_compat = true,
    perishable_compat = true,
    pools = { G.P_JOKER },

    return {emult = 2}
}```
daring fern
#

G.P_JOKER doesn't exist.

rare torrent
#

like this? calculate = function(self, card, context) return {emult = 2} end

daring fern
rare torrent
#

oh

#

YOOOOOO IT WORKS, thank you so much!

rare torrent
manic rune
daring fern
manic rune
#

yeah, what smtcom said

rare torrent
#

oh okay

rare torrent
manic rune
#

yeah you only need {} in which case

rare torrent
#

damm, again i only started modding yesterday💀

manic rune
#

fair

tepid sky
#

is there a way to put a ui on cards that are being played?

manic rune
#

create UIBox, then set the major to the card

bold sleet
#

Does anyone know how the fuck one controls the z layer of where a menu gets rendered?

#

i.e. render menus above cards that are not an overlay.

#

Similar to the debug menu?

manic rune
#

newly created ui should always take priority on the front, idk how to manipulate the order tho

bold sleet
#

Cards and other bs get rendered above any UI excet the overlay ones.

#

As far as I know.

#

(excluding the debug UI)

red flower
#

try setting draw_layer to 1 in the configs

pliant raft
#

Hellooo, sorry but may I ask how should the code look for a retexture mod for all the Jokers, seals, decks, enhancements, tarot/planet/spectral cards, tags, boosters, vouchers?
Plus I'd need a way to rename jokers, suits and change the color of the text for suits (like how hearts are in red but instead it'd need to be a different color)

I'm a mere artist and don't know how to code at all😭😭😭

All that is in the file is shown in the pic

tepid sky
#

been a while since ive modded at all

red flower
tepid sky
#

time to, reinstall the modding stuff :,)

daring fern
#

How would one draw a seal on a random spot on a card?

snow vale
snow vale
#

this aint working 💔

bold sleet
#

try comparing with strings instead of numbers, idk

snow vale
#

wdym?

bold sleet
#

For some reason card ranks are strings, I believe.

#

... c:get_id() == "6" ...

snow vale
#

well another joker ive works without strings

red flower
#

no they're not

bold sleet
#

then idk

#

I have seen then both in numerical and string form.

red flower
#

check_enhancement doesn't have scoring_hand im pretty sure

#

or at least it's not documented

wicked leaf
snow vale
red flower
tall wharf
#

first one

bold sleet
#

shouldn't it be a locked repeater

tall wharf
#

adequate

bold sleet
#

-# I think it would be more appropiate.

snow vale
tall wharf
#

you code it

snow vale
#

but first i wanna fix my blindfolded

wicked leaf
daring fern
bold sleet
#

what are 'quantum enhancements'?

wicked leaf
#

support for returning enhancements as other enhancements

bold sleet
#

wat?

red flower
bold sleet
#

yummers

snow vale
#

how can i edit the color of ts?

#

the mod badge thing

red flower
#

your mod's metadata

snow vale
#

eh

#

um

red flower
#

read the docs

snow vale
#

ok

hard mica
#

i did but its still there

wicked leaf
#

what are the keys for vanilla cards?

#

as in, where can I find them, mainly

daring fern
wicked leaf
tepid sky
tall wharf
#

swithc?

#

it's delayed mult

bold sleet
#

make it 4 ticks

#

when create x your shenanigans?

wicked leaf
#

my mod hates me

#

what do I do here

bold sleet
#

check file path and name.

#

can I see the codes responsible for loading your files?

wicked leaf
#

oh I see what I missed

bold sleet
#

you are missing a jokers folder inside items

#

items/jokers/inverse_jokers

#

btw. what is your mod meant to do?

#

What is your mod about?

wicked leaf
#

what's the order field for?

wicked leaf
daring fern
bold sleet
#

-# it doesn't interact with other mods yet, but uh... there is an API thing idk how you call it to aid in making silly alternates.

wicked leaf
bold sleet
#

Check your atlas definition thing.

#

And the file it is pointing towards.

#

Assume root is either the 1x or 2x folder.

wicked leaf
#

I think I need to make the 2x actually

bold sleet
#

You need both 1x and 2x for it to work.

#

idk why there are 2 versions, but eh.

wicked leaf
#

file in the cryptid files that exports stuff to 2x save me

bold sleet
#

i need

red flower
thorn furnace
#

In the card.lua in the lonely folder it seems to start mentioning a center object at line 268 so it checks out

red flower
#

can you send the entire crash log?

thorn furnace
#

Oki one sec

undone slate
#

I'm getting an expected } at line 11 but there is no open {} anywhere I've checked.
Does lovely read the comment lines or should I start counting from the first line of code?

red flower
undone slate
#

all the commas are there, may I send the code?

red flower
#

yeah

undone slate
#

also the line I'm getting the error on is local jokers = {

#

expect a lot of issues and wrong code

thorn furnace
#

comma missing after the mod name

#

i think?

red flower
undone slate
#

error at line 11

#

near the if

red flower
thorn furnace
thorn furnace
#

uhh
I'll give it a shot

wicked leaf
#

what am I missing

daring fern
thorn furnace
long sun
#

hiya! i'm adding the localisation for undiscovered Zodiac and Resource cards, but it's not appearing in game

#

(this is in Other)

red flower
wicked leaf
red flower
#

it returns a key-indexed table

long sun
#

(also, i'm not sure i've done this correctly)

thorn furnace
#

how would I go about returning the appropriate key

#

I was hoping it would be as simple as A:set_ability(SMODS.get_enhancements(B)[1]) SALADWENTBAD

red flower
#

i think next gives you the key

thorn furnace
#

i am so confused about what next does

red flower
#

it gives you the next key, value pair in a table

long sun
#

(unsure what i should do)

thorn furnace
unborn bay
#

it depends on what the table is

red flower
#

iirc

unborn bay
#

for general "arrays" it returns the number aka the index

#

for key-value pairs it returns a key

#

which can be a string

thorn furnace
#

i miss coding in assembly

red flower
daring fern
unborn bay
# red flower iirc

unless you specify two values in a single definition then yeah it's gonna return only the first one

#

which is the key

thorn furnace
long sun
red flower
daring fern
thorn furnace
long sun
#

ah yeah oops

#

lemme try that :>

thorn furnace
unborn bay
long sun
#

yay thanks! it's annoying that the soul is off by two pixels here, though ^^"

thorn furnace
unborn bay
#

sorry man you can only really gas up assembly in this economy if you're working with a game console from the 90s or if you're maximizing space

#

oh thats why

thorn furnace
#

well
not all the time
I don't do number theory anymore

unborn bay
#

ew

#

get your math degree away from me

thorn furnace
#

base 16 is way better of a base than base -ln(pi)/arcsin(6) or whatever

#

ngl

#

actually that cancels out a lot

thorn furnace
thorn furnace
native zinc
thorn furnace
#

sin(x) = 1/2i * (e^ix - e^-ix)
Solving for x is pretty easy and then you get arcsin

native zinc
#

oh right

#

so like uhh

#

-i ln(iz+√[1+z^2]) ?

#

sorry 1 - z^2

thorn furnace
#

you got that down fast

native zinc
#

smh how is this going to put chicken rice on my bedside table

thorn furnace
#

Just analytically continue the chicken rice from the store to your bedside table by continuously analytically continuing the chicken rice along the contour to your house

#

Silly

snow vale
#

are dependencies on the mod's metadata required?

red flower
#

no

snow vale
#

ok

plush depot
#

can someone help me know whats wrong with this code for the badge, it keeps doing this error report

#

wait i think its not formatted right

daring fern
plush depot
#

still no work

daring fern
plush depot
#

ive given up

red flower
#

lol

manic rune
#

what r u doing

#

i can prob help

daring fern
#

How would one put a custom info queue that can go on any joker under specific conditions?

#

Also badges?

glad osprey
#

anything that copies a joker

#

those will have the info queue for negative on them when there's a negative joker

glad osprey
wicked leaf
#

why doesnt it work?

daring fern
wicked leaf
#

ah.

hard mica
wicked leaf
#

I guess I need to add the rarity to a pool

scenic loom
#

How can I make it so that something gives money at the end of a round based on probability? Looking at golden joker in the steamodded examples, theres no calculate function and adding one and putting the money function in makes it do nothing

daring fern
red flower
#

in calc_dollar_bonus
return pseudorandom("seed") < G.GAME.probabilities.normal / odds and amount or nil

daring fern
red flower
thorn furnace
#

What would I do if I wanted a consumable that added flat chips or mult to the next hand's score

snow vale
#

is there a way to add an specific font to a consumeable title, or generally to anything?

daring fern
red flower
snow vale
#

and how?

snow vale
#

are there any docs?

red flower
red flower
snow vale
red flower
#

also no

snow vale
#

mhm

#

ok then

hard mica
daring fern
#

Why does this hard crash if the number of seals on a card is 3 or more?:

scenic loom
#

Is there a way to increase the card selection limit? The card doesn't need to be scored, just like so you can select 6 cards to discard or whatever

faint yacht
#

SMODS.change_play_limit(mod) for playing, SMODS.change_discard_limit(mod) for discarding.

keen totem
#

how would i go about getting a random poker hand like To Do List does (yes i know, vremade, but i dont get wtf is going on there)

keen totem
#

"i dont get what is going on there"

#

as in i dont know wtf any of that means or does

#

as in ive already checked that

#

as in that doesnt help me something

daring fern
red flower
#

it loops through all the hands to get the visible ones that are not the last selected and then gets a random one

scenic loom
daring fern
faint yacht
#

1 increases by 1, -1 decreases.

lament agate
#

pardon

#

where do you find the data for hanging chad again

manic rune
#

data?

lament agate
#

source

#

codee

scenic loom
manic rune
#

a sec

lament agate
faint yacht
scenic loom
faint yacht
#

And what's the said crash actually saying?

faint yacht
#

...which SMODS version are you on?

scenic loom
#

mb

keen totem
#
set_ability = function(self, card, initial, delay_sprites)
        local _poker_hands = {}
        for k, v in pairs(G.GAME.hands) do
            if v.visible and k ~= card.ability.extra.poker_hand then
                _poker_hands[#_poker_hands + 1] = k
            end
        end
        card.ability.extra.poker_hand = pseudorandom_element(_poker_hands,
            pseudoseed((card.area and card.area.config.type == 'title') and 'vremade_false_to_do' or 'vremade_to_do'))
    end

in the vremade for to do list, whats with the pseudoseed at the bottom and why does it have so many ands and ors instead of just being a single pseudoseed

glass crown
#

im trying to get a joker to trigger an effect upon any card (not jokers) being destroyed, what would be the best way to go about doing that? this is what i have attempted so far

    key = 'killerwisp',
    loc_txt = {
        name = 'Killer Wisp',
        text = {
            "{C:mult}+#2#{} Mult per",
            "card destroyed",
            "{C:inactive}(Currently {C:red}+#1#{C:inactive})"
        }
    },
    config = {extra = { mult = 0, addedmult = 6 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.mult, card.ability.extra.addedmult } }
    end,
    rarity = 1,
    atlas = 'votdjokers',
    pos = {x = 2, y = 0},
    cost = 4,
    calculate = function(self, card, context)
        if context.joker_main then
            return {
                mult_mod = card.ability.extra.mult,
                message = localize {type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } }
            }
        end

        if context.cards_destroyed and not context.blueprint then
            card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.addedmult
            return {
                message = 'Dismembered!',
                colour = G.C.MULT,
                card = card
            }
        end
    end
}```
#

sorry that that block of text is so huge i probably shouldve just done the relelvant part

red flower
manic rune
#

it would be possible to manipulate its rng otherwise 🤔

#

-# idk

#

im assuming thats what thunk went for

red flower
#

it shouldn't be but idk i don't understand the seed system all that well

keen totem
#

also how do i localize the poker hand it generates

lament agate
#

say, if i wanna retrigger four and seven, what do i type here

lament agate
snow vale
#

how can i destroy 1 selected card?

daring fern
# lament agate

You have to change the context to context.repetition and do return {repetitions = 1}

daring fern
keen totem
#

what rarity should this be? im really bad at balancing scaling jokers so idk

thorn furnace
#

When I'm creating a consumable type, what does shop_rate do?
Is more a higher chance or a lower chance of it showing up?

thorn furnace
#

oki

snow vale
#

uh what's wrong here

hallow forge
#

forgot your mod prefix

snow vale
#

o

#

yh

daring fern
lament agate
#

okay

#

hold on

#

i know theres something wrong with the loc vars and config

keen totem
#

why is it so blue

lament agate
#

also easier to read

daring fern
lament agate
#

sorry this is my third time modding

#

so the loc var and config is fine?

snow vale
daring fern
keen totem
hallow forge
#

i don't know what you mean by that

snow vale
#

c_ub_bullet?

#

oh

#

ok

lament agate
#

?

daring fern
dense vault
#

chat how would i make the description of my joker change based on the current deck selected? like i know you can use loc_vars but it's very limited and doesn't support adding new lines and stuff

lament agate
dense vault
#

wait nvm can i just use different keys i shouldve read the documentation better mb

latent raven
#

what is the context for first played hand (like dna?) cuz I cant find it in the documentation

#

I might also be blind

daring fern
onyx sonnet
latent raven
#

ah

#

thanks

pale holly
#

I'm trying to make my Joker upgrade only High Card, Pair and Three of a Kind, but the card will actually upgrade any hand i play, not sure why honestly, i used the context exemples in the Smods Wiki and the naming of the hands is also corect based of Balatro's code, is there something i missed ?

    if context.before then
    if next(context.poker_hands['High Card']) then
        return {
            message = 'Upgraded!',
            level_up = 3
        }
        end
    if next(context.poker_hands['Pair']) then
        return {
            message = 'Upgraded!',
            level_up = 3
        }
    end
    if next(context.poker_hands['Three of a Kind']) then
        return {
            message = 'Upgraded!',
            level_up = 3
        }
    end
    end```
onyx sonnet
#

all hands contain High Card

#

what you need to be checking is the actual hand

#

give me a second

pale holly
pale holly
daring fern
onyx sonnet
#

they beat me to it

pale holly
#

Oh i see, in the wiki with context.poker_hands, it was said as 'Here is another example for a Joker that increases the amount of mult it gives when you play a Flush', i think it just interpreted it wrong
Thanks a lot !

glass crown
#
        if context.joker_main then
            return {
                mult_mod = card.ability.extra.mult,
                message = localize {type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } }
            }
        end
        if context.cards_destroyed and not context.blueprint then
            card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.addedmult
            return {
                message = 'Dismembered!',
                colour = G.C.MULT,
                card = card
            }
        end

does anyone know why this isnt working exactly? im really really bad at programming, but it seems like by all means this should be working?

sturdy compass
#

What about it is not working?

glass crown
#

should've clarified that, sorry
it isn't scaling at all

#

when cards are destroyed, it doesnt do any of the things in the if context.cards_destroyed and not context.blueprint then segment

sturdy compass
#

I’m not sure if cards_destroyed is the correct context. Lemme double check

lament agate
sturdy compass
latent raven
#

Hi I need help again. I want the joker to randomize the first played hand cards suit each.
so if you play a flush of spades then the first card might turn into diamonds and the second turns into hearts and the third turns into clubs etc

daring fern
lament agate
sturdy compass
zenith sage
#

why are half the enhancements abilities and the other half effects

daring fern
# lament agate

I think you would just check if context.other_card:get_id() == 7 or context.other_card:get_id() == 4 in the main joker.

jovial gate
#

how can i use change_base correctly to change the suit of a card im confused and cant find the documentation of it

glass crown
daring fern
sturdy compass
#

Bro you are quick

daring fern
sturdy compass
glass crown
#

thank you!

jovial gate
daring fern
daring fern
#

Outside of the return.

daring fern
# lament agate

I meant the if that is checking if fours > 0 and sevens > 0

latent raven
daring fern
daring fern
# lament agate

I meant the entire if and its conditions except the return.

lament agate
#

?

daring fern
lament agate
#

also which var

latent raven
daring fern
daring fern
sturdy compass
daring fern
# lament agate ?

You need to add the context.repetition and context.cardarea == G.play back.

latent raven
sturdy compass
latent raven
#

like that

#

?

sturdy compass
#

no

latent raven
#

damn

sturdy compass
#

pseudorandom_element(SMODS.Suits, pseudoseed('mysuit')).key

latent raven
#

alright

#

and what should I do next?

sturdy compass
#

It should work

latent raven
#

it doesnt do anything

sturdy compass
#

Show the full code

latent raven
lament agate
#

@daring fern it doesnt retrigger for some reason

sturdy compass
latent raven
lament agate
#

the full code @daring fern

sturdy compass
#

yes it does?

daring fern
lament agate
#

oh fuck im stupid

#

hold on

sturdy compass
#

I'm positive it is not exclusive to that

obsidian pagoda
#

I do not know a 💩 about lua, and i want to make a texture pack replacing some of the collabs with my own textures. How can i do it?
I've already tried to make one from a template, but it didnt work.

wintry solar
latent raven
#

it still doesnt work :(

wintry solar
#

It’s just cardarea checks are kind of useless in most contexts for jokers

sturdy compass
latent raven
#

I did

#

should there be something in return?

sturdy compass
#

no

latent raven
#

it still doesnt work

#

current code

hard mica
daring fern
sturdy compass
#

I'm also unsure if context.other_card exists at this time either, so instead you might just wanna do context.scoring_hand[1] instead

latent raven
sturdy compass
#

try changing 1 back to 0 lol

#

Also you are starting a new run every time you test, right?

latent raven
#

yes

sturdy compass
#

ok good

latent raven
#

still nothing

sturdy compass
#

show again

latent raven
latent raven
#

so I replace the entire if context.after... with context.scoring_hand

sturdy compass
#

no

#

replace context.other_card with context.scoring_hand[1]

latent raven
#

still nothing

sturdy compass
#

bruh

#

try adding a print() after SMODS.change_base to make sure it's even running. If not, something's still wrong with your hands_played check

latent raven
#

like this?

sturdy compass
#

bro

#

On a new line

latent raven
#

ok my bad

sturdy compass
#

Put a string in the arguments too

#

smthn like print('The code worked!')

latent raven
#

ok there was an output

sturdy compass
#

hmm

#

then something's up with the change_base

snow vale
#

how can i knonw inside context.repetition if a card is enhanced?

onyx sonnet
#

is there a way to test if your in_pool condition is actually working without rerolling forever?

daring fern
thorn furnace
#

how would I go about setting the sell value of a consumable?

sturdy compass
#

card.cost = value

#

wait nope

daring fern
thorn furnace
#

is there a version that works when I'm defining the consumable

sturdy compass
#

I forgor they were two different values lol

thorn furnace
thorn furnace
#

unfortunate

onyx sonnet
#

can someone tell me if this in_pool is incorrect?

high sinew
#

If i wanna have my seal only create a card when it is discarded like purple and not make two if two cards are how can i do that? It rn creates two cards if u discard more than one with one having the seal

onyx sonnet
high sinew
#

what is the thing for it?

onyx sonnet
#

context.other_card.seal == 'whatever your seal name is'

daring fern
high sinew
#

gotcha makes sense

onyx sonnet
#

ah

#

is ability for the values of the seal?

daring fern
#

Also it's modprefix_key not the name.

daring fern
onyx sonnet
#

noted

high sinew
onyx sonnet
daring fern
onyx sonnet
#

wow, i never noticed

#

about the consumable types i mean

#

the rarely was written with the understanding that atlases were exempt

wintry solar
onyx sonnet
wintry solar
#

Atlases do require mod prefixes, they’re just auto added in object creation if they’re missing

high sinew
#

just added the card.seal but still is outputting two

wintry solar
high sinew
wintry solar
#

if context.discard and context.other_card == card then iirc

high sinew
#

mmmm

#

such a good call

#

coffee hasnt fully set in my mind cant think like that bro 😅

wintry solar
#

No worries, I know an awful lot about calculation code

high sinew
storm roost
#

Hello, I recently looked into modding balatro and I watched some videos and tried to follow along with what the videos were saying, but I couldn’t get it to work. If someone here would be so lovely to help me mod it that would be very appreciated

sturdy compass
storm roost
#

Thank you, I’ve watched some videos but the folders it mentions are not in the same place. I will try to use the guide you provided

floral narwhal
#

Hello im new too (i was new) , my way to understanding balatro modding was scanning a lot of balatro mods. you can try its very useful.

bold sleet
#

When I first started I tried to make some jokers, using the example repo as reference.

snow vale
#

how do i make it so it gives me 1$?

daring fern
snow vale
#

oh

#

ok

bold sleet
#

ease_dollars(1)

#

I'd say it should not return.

snow vale
#

it works

bold sleet
#

ah

#

then I shut up.

#

I though calculate only triggered once and when returning it would only work for the first scored card.

#

scored and matching.

storm roost
bold sleet
#

oh

#

I can try to help with that in a VC.

floral narwhal
#

Oh ok

snow vale
#

then how do i do it?

#

so it counts every 10

bold sleet
#

instead of returning, try ease_dollars(1)

snow vale
#

ok

bold sleet
#
-- ...
if c:get_id() == 10 then
  ease_dollars(1)
end
-- ...
snow vale
bold sleet
#

-# again, I am up to help you getting started.

plush depot
#

guys im out of ideas can someone help me idea

bold sleet
#

or use the mod loader

#

It does most stuff for you.

snow vale
bold sleet
floral narwhal
#

why when i play this hand type only 7 scores?

plush depot
snow vale
#

destroying cards is useful

plush depot
#

oh i thought u meant like any scoring card can destroy the joker

snow vale
#

no

#

i mean

#

1 in 4 each scoring card for that scoring card to be destroyed

plush depot
#

ah

bold sleet
# red flower what

Because uh... yeah. Shit like rank, suit, editions, seals, etc are just wherever the fuck.

#

I have a very horrid memory for stuff like that.

red flower
#

i mean you can literally make your own

#

like 1 line of code for each function

snow vale
#

how can i make it so if ive selected 2 it wont let me?

bold sleet
#

i did the function already because uh... ye

daring fern
red flower
bold sleet
#

oh well

buoyant crag
#

is it possible to have a message appear above a card without returning, like in an event manager function?

bold sleet
#

card_eval_status_text(card, 'extra', nil, nil, nil, { message = "Upgrade!" })?

daring fern
bold sleet
buoyant crag
buoyant crag
#

ok perfect, thats what i need

floral narwhal
plush depot
#

can someone help understand what this means

#

for editions

snow vale
#

can someone send me the code for arrowhead?

normal crest
normal crest
plush depot
#

where would it go in the code

#

(i hope this code is right)

normal crest
#

if you're not using a localization file then put it inside the loc_txt of your edition

#

it's loc_txt not loc_text

plush depot
#

oops

#

thanks for that correction

#

but i just put it in the loc_txt?

normal crest
#

yes

#

label = "whatever"

plush depot
#

ok

#

does shader go somewhere else?

normal crest
#

you put it in Atlas, not in Edition

#

it's meant to be in edition

plush depot
#

ah

#

im assuming this is saying "make the edition work idiot"

normal crest
#

That's saying you have something wrong with your atlas file

plush depot
#

"make it do something"

#

oh jeez

normal crest
#

Make sure it's within assets/1x and assets/2x

plush depot
#

i havent made the assets yet do i have to do that rq

normal crest
#

well if you want an atlas you need to have a file

plush depot
#

ok

normal crest
#

you don't need an atlas for an edition tho

plush depot
#

im beginner i figuring thing out

#

so i delete atlas???

#

or no

normal crest
#

if you're only making an edition yes

plush depot
#

wdym "only"

chrome widget
#

I thought the uv value that vanilla calculates in its shaders was supposed to cover only viewing one sprite of an atlas? Or am I misunderstanding what that means?

normal crest
plush depot
#

no i have 3 jokers along with it

normal crest
#

then, if you want your jokers to have custom sprites you need an atlas

rare torrent
#

quick question how do i make the description text with red background and white text?

chrome widget
#

Do {X:mult,C:white}{} for the specific xmult example. the X: tag covers the background color

daring fern
plush depot
#

chatgpt aint doing it bro

rare torrent
#

ok thank you guys

normal crest
normal crest
#

Replace <text here> with your text

plush depot
#

i have 3 jokers and am making an edition, i keep the atlas for the edition or no?

normal crest
#

editions don't need an atlas

#

jokers do

plush depot
#

so i delete it from the editions

#

edition

#

whatever

chrome widget
chrome widget
#

You seemingly put it in the Atlas call which is not how that works

untold vigil
#

Is this fine? So it destroys itself after 3 rounds and creates another joker

normal crest
plush depot
#

it sorta worked

#

i dont have the texture for it yet but it says error

normal crest
#

Did you put the label

chrome widget
#

You need to have a label for the edition

plush depot
#

it does say label = Stock in my code

normal crest
#

you likely put it in the wrong spot then

plush depot
#

in loc_txt

chrome widget
#

Yeah that's in the wrong spot

normal crest
#

you put it inside text yeah

plush depot
#

o jeez

normal crest
#

put it after the closing bracket of text

#

or after name

#

whichever you prefer

#

also it needs to be a string

#

So "Stock"

plush depot
#

anything else

#

its now under name and has quotations

#

it works

normal crest
#

remove the path, px and py stuff from the edition

#

that's unnecessary

plush depot
pliant raft
#

Ahem, sorry to interrupt but I wanted to ask why does the game uses two same sets of textures? It seems like in game it's only x1 but why does x2 exist?

plush depot
#

scaling stuff i think

chrome widget
#

It's something to do with texture scaling

#

It's kind of superfluous but it's just unfortunately how the game is setup. It helps it look a little crisper at higher resolutions basically

bold sleet
#

I see...

#

still sucks

plush depot
#

basically just make a 142x190 and then go to some website that resizes pictures and put it in there as 71x95

#

that worked for me

#

ok the last thing i need to do for my edition is how do i get the texture

chrome widget
#

I make all my sprites at 71x95 (or whatever the base res is), and then basically every image editing software has nearest neighbor scaling

#

Editions don't use textures

normal crest
plush depot
#

how do i do it

#

pls tell 🙏

chrome widget
#

I have no idea what you're asking is the thing

plush depot
#

uh

#

hm

chrome widget
#

We've just established they don't use textures, so whats the question of what you want?

normal crest
#

could be wrong

plush depot
#

how do i make it look like the foil or whatever

chrome widget
#

Write a shader

plush depot
#

make it look like it has texture

chrome widget
#

Which is not a beginner friendly task

plush depot
chrome widget
#

You'll have to look at the examples given by SMODS

plush depot
chrome widget
normal crest
plush depot
chrome widget
#

Basically, shaders are calculated on your GPU. When drawing something to the screen, it does some math on the positions of the vertices of the object and on the colors of each individual screen pixel

#

I'm currently floundering around a relatively advanced shader rn

normal crest
#

@red flower just lost my 50/50 to fu xuan

plush depot
#

like a word doc or

chrome widget
#

technically it's just a specifically formatted text file, but that's what basically any code file is

#

Here's also an overview of shaders in love2D

#

Which are a specific implementation of GLSL (open GL shader languge)

plush depot
#

wait but shader = false

chrome widget
#

Yeah, that means for right now your edition just doesn't display a shader

plush depot
#

ah

#

ok

#

what code language is the shaders in is it lua or glsl

faint yacht
#

Shaders GLSL, similiar to Minecraft shaders.

plush depot
#

what do i replace

normal crest
#

the thing right under that comment

#

you'd change "ionized" for your shader name

plush depot
#

stock

normal crest
#

that comment refers to this line extern PRECISION vec2 ionized;

chrome widget
#

you also don't actually need one if you aren't goingto use it

normal crest
#

presumably they want to make a shader

#

idk

chrome widget
#

No I mean

#

You can def make a shader without that specific variable

#

And you can pass in variables as you wish using the shader definition as well

#

You aren't limited to that one

plush depot
#

but from my understanding, if u want it to look like something it must be a shader

normal crest
#

but that variable has specific information about the card ingame

chrome widget
#

I really do enjoy being misunderstood. Have fun

plush depot
#

im just gonna give up and have someone volunteerly do it for me if they want to

normal crest
#

it's okay, I've reached the acceptance state, it's not the worst case scenario

#

so I'm satisfied

sonic cedar
#

is this a good way to put it like does it make snes
(this is the readme)

#

sense

#

not

#

super mario world

tall wharf
#

how do i take over a consumable's use functionm

sonic cedar
#

isnt it literally take_ownership

tall wharf
#

more precisely how do i get the original function

sonic cedar
#

oh i just look at the dump and then recreate

#

like here how i did with wheel (minus the ectoplasm and hex because the key will focus on the wheel)

#

(og dump function for comparison)

normal crest
tall wharf
#

😭

sonic cedar
#

yeah thats why i had to like splice things 😭

#

nix all the ecto-hex stuff

normal crest
#

so yeah, your best bet to get the "original function" is to copy the relevant part from the source

#

(which can bring cross-mod issues if any other mod has a lovely patch affecting one of them)

sonic cedar
#

(also true)

#

oh my god i didnt put that in the readme i should do that

normal crest
#

i don't know everything you've added to the original but it might be better to go that route

tall wharf
#

true

red flower
#

take_ownership seems very conflictive in general

untold vigil
#

Is this fine to autodestroy and create another joker?

red flower
#

like I've seen multiple people wanting to affect lucky chances

primal robin
sonic cedar
rapid stag
#

i just realised something

i want to, on startup, randomly move the location of the quit button to the options menu. muiminSmug but i'm not sure how to implement that outside of the randomness cirDerp how can i hide the default quit buttons and put a new one in the options menu?

stiff quiver
#

@thorny yacht

primal robin
#

We did it again

red flower
#

poor Mods

normal crest
#

that wasn't even a role mention

violet oasis
#

Is there an equivalent to G.jokers.cards[i].config.center.key == "j_joker", but that works for a ObjectType I created? Say I made a "Birds" ObjectType and populated the pool with a few jokers, how would I go about checking if I have a joker that is in the "Birds" pool?

stiff quiver
#

yeah i shouldnt have pinged them sorry

red flower
#

oh god

primal robin
#

2 in a row????

violet oasis
#

damn so fast

rapid stag
#

BACK TO BACK?!

primal robin
#

No way

red flower
#

<@&1133519078540185692>

sonic cedar
#

i have the sudden urge to click a steam link.,,,,

stiff quiver
#

i made this to spawn 6 kings of spades and six kings of hearts but its giving me random cards, whats wrong? lua for i=1,12 do G.E_MANAGER:add_event(Event({ func = function() local _rank = "13" local _suit = "S" if i < 7 then local _suit = "S" else local _suit = "H" end local _card = create_playing_card({ front = G.P_CARDS[_suit..'_'.._rank], center = G.P_CENTERS.c_base}, G.deck, nil, nil, {G.C.SECONDARY_SET.Enhanced}) return true end}))

untold vigil
#

man

polar tulip
#

Begone

untold vigil
primal robin
#

Messages still here

stiff quiver
#

oh yeah i forgot about that, my bad, thanks

sonic cedar
normal crest
#

is the scam message still there for you guys

sonic cedar
#

yeah

primal robin
#

Yes

sonic cedar
#

why
is it a bug

normal crest
#

they banned them without deleting messages

#

i guess

primal robin
#

Some mod ban user without checking a box "deete all user's messages"

sonic cedar
#

smh

#

hooray

tall wharf
#

hewwo

sonic cedar
#

hiiii aiko

tall wharf
#

ii tthink i didi t

primal robin
#

You did it?

tall wharf
clever rose
#

what is the variable that stores how much money you have?

tall wharf
#

G.GAME.dollars ?

clever rose
#

ok thanks

rare torrent
#

how do i make it calculate this when the first number card in played hand is scored? basically like the photograph joker but instead of mult it gets the first number card digit and uses it to get a number based on the order of pi calculate = function(self, card, context) if context.joker_main and context.full_hand and #context.full_hand > 0 then for i, c in ipairs(context.full_hand) do local rank = c:get_id() if rank >= 2 and rank <= 10 then local pi_val = pi_digits[rank] card_eval_status_text(card, 'extra', nil, nil, nil, { message = "+" .. tostring(pi_val) .. " Mult" }) return { mult_mod = pi_val } end end end end
right now it only calculates it at the end when all the jokers are played

primal robin
#

THREE????

sonic cedar
#

bruh

primal robin
#

Impossible

sonic cedar
#

ohhh moderators gif

primal robin
#

Anyway

sonic cedar
#

i paused it the moment i saw you crank the screenshake

#

im gonna get you

primal robin
#

Even with this kind of acceleration look like game works normally

normal crest
#

also use mult instead of mult_mod in the return if you're not including a message

tight notch
#

does anyone know how to enable these "optional features"?

normal crest
#

smt like this

rapid stag
normal crest
#

preferably do that in your entry file, and you can just refer to your own mod as SMODS.current_mod

sonic cedar
#

i did it for these four ThumbsUpLol

normal crest
#

also it can be a function that returns a table or just a table

#

up to preference i guess, idk why both are allowed

rapid stag
normal crest
#

If you do that outside the loading stage yes

#

but this is something you should do during the loading stage of your mod

sonic cedar
zenith sage
#

what is the "entry file"

rapid stag
#

your main mod lua file

normal crest
#

the lua file that gets executed in your mod

sonic cedar
#

[The Big One]

tight notch
sonic cedar
#

yeah

tight notch
#

oh ok

sonic cedar
#

the thing you typically load subfiles from
i wonder if there's a better way to do this*

*with proper ordering

normal crest
#

i'd recommend putting it in there if you're unsure

zenith sage
tight notch
civic elm
#

I'm new to coding, so can someone help me understand why this either spawns a random Legendary or crashes instead of working?

tight notch
#

it seems to work fine

sonic cedar
#

assert is fine

tight notch
#

also do I use retrigger check or retrigger for retriggers

normal crest
#

the issue here, if I had to guess, is that in the vanilla functions the rarity is a number and not a strng

#

not mentioned in the wiki but for rarity you can pass "Common", "Uncommon" or "Rare" if you want your code to be more legible

tight notch
#

i see that some mods use "retrigger_joker_check and not retrigger_joker"

civic elm
# normal crest

Where would I put the editions and seals or other stuff, since its blank format is "SMODS.add_card(t)"? In the parenthesises?

tight notch
#

so is that what I should use

normal crest
civic elm
#

Correct.

normal crest
#

SMODS.add_card { key = 'j_oops', stickers = { 'eternal' } }

#

is all you'd need

civic elm
#

Thank you!

urban wasp
#

is there any way to make this joker not crash whilst still making the message color my rarity color?

return {
    message = "+" .. lenient_bignum(card.ability.extra.create) .. " Trash Jokers",
    colour = "crp_trash",
}
#

it currently really doesn't like when i do this

normal crest
#

cus colour is not meant to be a string

urban wasp
#

then how do i fix this? i want the bg to be the same as my rarity color, trash

normal crest
#

I think what you want to do is colour = G.C.RARITY.crp_trash but i'm not 100% sure

faint yacht
normal crest
#

assuming crp is your mod prefix

normal crest
faint yacht
#

A valid point, just throwing my 2 bites out there.

urban wasp
sonic cedar
#

jesse story mode gif

normal crest
faint yacht
#

That... and my crossmod loading is pretty much the same, although the conditions can be confusing to some.

urban wasp
normal crest
#

can you put eval G.C.RARITY in the console

#

just to see what itactually has

sonic cedar
urban wasp
#

uhh

#

crp_trash is in the list

normal crest
#

huh, well maybe your crash wasn't the color thing then

#

what was the crash exactly

urban wasp
#

again, it was a hard crash

#

just died

normal crest
#

no crash log?

urban wasp
#

nope

civic elm
normal crest
urban wasp
urban wasp
normal crest
#

cus it's inside an event

#

if you don't, the event will just repeat until it returns true (which in your case would repeat forever)

formal parrot
#

Can i ass shaders to tarot cards without it being an edition ?

urban wasp
red flower
formal parrot
normal crest
red flower
urban wasp
normal crest
urban wasp
#

just lists out my mod's stuff

normal crest
#

okay that makes no sense, why would smods put your entire rarity into the color table

#

regardless it still looks like it has the color indexes

urban wasp
#

this is the code for the rarity, if it's my fault

local trash_gradient = SMODS.Gradient({
    key="trash",
    colours = {
        HEX("989898"),
        HEX("272727")
    },
    cycle = 5
})
...
SMODS.Rarity({
    key = "trash",
    badge_colour = trash_gradient,
    default_weight = 0.005,
    pools = { ["Joker"] = true },
    get_weight = function(self, weight, object_type)
        return weight
    end
})
normal crest
#

Oh

#

try colour = trash_gradient maybe?

urban wasp
urban wasp
normal crest
#

to my knowledge yes, but it seems my knowledge is lacking now lol

urban wasp
#

this just gives the default orange bg

return {
    message = "+" .. lenient_bignum(card.ability.extra.create) .. " Trash Jokers",
    colour = trash_gradient,
}
normal crest
#

I mean a gradient is constantly changing color so maybe you hit a moment when it was orange?

red flower
#

maybe return doesn't take gradients

normal crest
#

Idk anymore

normal crest
urban wasp
urban wasp
#

maybe it has to do with the fact that my rarity.lua (where trash_gradient is defined) is loaded after joker.lua (where the joker that creates trash jokers is defined)?

#

i'm not sure

red flower
#

maybe try SMODS.Gradients.prefix_key

normal crest
#

well that'd do it

urban wasp
normal crest
urban wasp
#

yeah that tracks

normal crest
#

it won't matter if you load one first or the other

urban wasp
normal crest
#

but then it won't exist in your rarity file

#

cus it's local

urban wasp
#

well no like

normal crest
#

you would have to make it a global variable

urban wasp
#

copying it over

#

not moving it

normal crest
#

crp_trash_gradient = SMODS.Gradientetc etc

#

without the local keyword

#

I added your mod prefix to the variable name cus that's good practice when making global stuff

urban wasp
normal crest
#

yeah, and make sure to change where you previously used the old name