#đŸ’»ăƒ»modding-dev

1 messages · Page 289 of 1

sturdy compass
#

Cuz you probably haven't done the init_game_object hook and I do not wanna explain that myself rn

last sentinel
#

the apply never runs either?? yeesh

sturdy compass
last sentinel
#

but this does??

#

maybe im using the wrong type of comma or something, slipped a zero instead of an o.

#

gotta be something dumb but i have no hair left to pull out over this

tall wharf
#

test A

long acorn
#

if ive known that shit existed in the first place oh my god

sorry for sounding like a chimp with a laptop rn

long acorn
#

i give up

rugged pier
#

i could create wonders with python but lua....

long acorn
#

for some reason it reads the joker itself as nil

rugged pier
long acorn
#

this is in main (straight up just copied from the castle mod)

daring fern
daring fern
long acorn
#

almost*

#

(also the loc vars are out of order oops lol)

daring fern
long acorn
#

cause i cant find rebate to base it off

daring fern
placid star
#

how could I use custom text colours? e.g. {C:mult} but as a custom hex colour?

long acorn
#

so just this

#

cool

reef belfry
#

GOD i love packs

daring fern
# long acorn so just this

No, you would set G.GAME.current_round.jokermostwanted.id to target_card.base.id then check if context.other_card:get_id() == G.GAME.current_round.jokermostwanted.id

placid star
# reef belfry GOD i love packs

hmm idk i think using ‎ ‎ ‎ ‎‎ ‎ ‎ ‎ ‎ ‎ ‎ packs can ruin early econ... :/

long acorn
#

cool that brought back the crash lol

daring fern
long acorn
#

but in line 28 now

shell timber
#

holy shit Pack Reverie

daring fern
long acorn
#

return {vars = {center.ability.extra.mult_gain, center.ability.extra.mult, localize(G.GAME.current_round.jokermostwanted.rank, 'ranks')}}

#

wait it just fixed itself what

#

now im back to the rank just being nil

daring fern
long acorn
#

idk actually
but i changed it back to the actual joker id

placid star
#

is there any tutorials for creating new consumable cards (e.g. sprctrals and tarots)?

long acorn
#

its G.GAME.current_round.jokermostwanted.rank = jokermostwanted.base.value now

#

still nil when it was mail_card tho

long acorn
#

yeah this one line is the last problem area remainingg

shell timber
#

why is it so far to the right

zealous glen
#

😭

shell timber
#

oh yeah they have that

tall wharf
#

so close 💔

placid star
#

what is the code to be able to destroy a joker and create one?

zealous glen
reef belfry
#

okay...

shell timber
#

which is fine if just one mod does it but it ends up scaling horribly

long acorn
#

where does castle pull the base suit?

tall wharf
#

why does this only draw one card

zealous glen
#

Idk maybe it’s due to event timing?

#

It doesn’t detect the “correct” amount of space?

zealous glen
tall wharf
#

ah

#

i think i know why

#

thank you

zealous glen
#

And honestly I think it’s justifiable

#

So if you’re trying to use the vanilla variable maybe it just doesn’t exist

#

Again,

#

Check out Castle in the example mods

long acorn
#

that is from the example mod

zealous glen
#

What is the problem then?

long acorn
#

its not reading a base value for some reason

tall wharf
zealous glen
tall wharf
#

i had tableau cards limit set to 1

long acorn
tall wharf
#

i guess I'm setting default to 52

peak tiger
#

How do I create a random tarot card?

zealous glen
# long acorn maybe idk

Try printing the rank to see if it’s correct, then double check your code defining the rank to make sure it’s correct

#

Maybe print there too

zealous glen
tall wharf
#

awesomesauce

long acorn
#

ok it is the base value fucking up for some reason

tall wharf
#

did you add game object variable

long acorn
rugged pier
#
SMODS.Consumable {
    set = 'Tarot',
    key = 'thug',
    --atlas = 'scadrial',
    pos = { x = 6, y = 2 },
    config = {
        min_highlighted = 1,
        max_highlighted = 2
    },
    discovered = true,
    unlocked = true,
    loc_vars = function(self, info_queue, card)
        return {
            vars = { 
                card.ability.max_highlighted
            }
        },
    can_use = function(self, card)
        if #G.hand.highlighted < card.ability.max_highlighted or #G.hand.highlighted > card.ability.min_highlighted then
            return false
        end
        return true
    end,
    use = function(self, card)
        for k, v in ipairs(G.hand.highlighted) do
            v:set_ability(G.P_CENTERS.m_csmr_pewterdrag, nil, true)
    end,
}

what is my error in this code? the importing of this file into my mod fails

#

--Thug: Enhances 2 cards to Pewter Drag Cards
this is what its trying to do

reef belfry
#

its sjust looking at me like its judging me for my mistake

tall wharf
#

thank you minecraft

manic rune
#

wheres the font tool in aesprite

#

gah

#

aseprite*

#

i might be dum

hushed field
#

text tool?

#

t

#

as in press t

manic rune
#

oh

#

:3

placid star
#

so uh guys? I'm trying to make a consumable that will generate a 'special' joker (special is a custom rarity i defined) but I can't get it to generate, I copied the code from riff raff and modified it a lil but it still doesn't work, any ideas?

foggy carbon
#

I'd suggest copying from Soul instead

placid star
#

ahh okay ty I'll try that!

placid star
zealous glen
#

As I said I’m pretty sure you need a table

placid star
#

where the sigma do i put the table 💔💔

daring fern
#

How does one draw a image on a card?

spring lantern
#

as in how to make a sprite for a card?

#

cards are usually 71 pixels wide and 95 pixels tall i believe

daring fern
spring lantern
#

i'm pretty sure seals also use the atlas system tho

primal robin
#

It's joover RUN

tall wharf
#

fuck this shit

daring fern
#

This draws a seal where it usually would be, but I want to have a seal be down by about 29 pixels.

primal robin
primal robin
#

No way

shell timber
#

oh yeah isn't that the one time local thunk is used in the entire codebase

tall wharf
#

why is it fucked up

spring lantern
tall wharf
#

i made debuff seal lmao

spring lantern
#

that would probably not have very good compatibility with mods though but it's a start

reef belfry
#

does vol in SMODS.sound work

crisp coral
#

yes

long acorn
zealous glen
spring lantern
#

no clue, probably an unused sprite

zealous glen
#

Or you can make the sprite itself be positioned differently

daring fern
zealous glen
#

the ones that transform the x and y coordinates

reef belfry
spring lantern
#

hermit but 1 in 4 chance to get stoned? seems good to me

#

(also don't need to have money to get 20 bucks so it could save your econ)

#

(also great concept i laffed)

olive saddle
#

I want to make a "sub-mod" ie a mod that relies on another mod to work, how do I do that?

spring lantern
#

first of all you add the mod to the dependencies on your mod's json file

#

and then just make your mod

#

profit

#

:3

daring fern
#

I tried showing just the second seal it looked like this, this is a gold seal.

#

Code for reference.

spring lantern
#

the fabled ghost seal

slender cape
#

is anyone here familiar with malverk

spring lantern
#

so uh, here's a dumb idea i had yesterday, anyone familiar with roffle loreâ„ąïž wanna help out? :3

daring fern
#

Progress.

heavy hare
#

how do i update the definition of a UIBox?
i'm removing a sprite and wanting to shrink the size of the grouping box to fit around the sprites that are there

modern kindle
heavy hare
#

i'm using config.object:remove to remove the sprite, but i want to edit the UIBox's definition

#

this is what it should look like when the other sprites are removed, but nothing i've done to change the UIBox's definition seems to go through

daring fern
#

How do I fix this issue where the bottom seal thinks it's still where it usually would be.

spring lantern
manic rune
reef belfry
#

Yeah

#

That one episode where Cartman falls down the stairs

manic rune
#

sweet

spring lantern
#

dude that's my favorite episode from season 20 of the boondocks!

hushed field
reef belfry
#

I wasnt really going for a specific look

#

But for some reason i associated gold with chance

olive saddle
reef belfry
#

And the actual consumable art is just obscure references from internet media

#

And i base the ability/function on the actual bit from said media

spring lantern
#

(inside dependencies you just place whatever mods your mod depends on)

hushed field
olive saddle
#

as in in the dependencies I write in the ID of the mod?

reef belfry
#

But i think itd hinder my creativity in terms of making consumables

#

Since im basing everything on pre existing media

spring lantern
#

probably explains it better than i ever could

hushed field
# reef belfry Since im basing everything on pre existing media

I mean, I'm probably biased considering my mod has each joker be a movie reference, and each new consumable is a type of food, but I do think it can be really helpful, creativity-wise, to have a theme to adhere to. Both in making things feel consistent, and helping figure out how to approach new effects

reef belfry
#

Hmmm

#

Ill see what i can do

quartz ravine
#

morning folks

daring fern
#

Is it possible to put a sprite from an atlas on a card like a seal?

hushed field
#

Yes. What are you trying to do?

daring fern
hushed field
daring fern
#

It only visually moves.

hushed field
#

oh what do you mean moves?

daring fern
hushed field
#

oh yeah, you'd have to see how the movement is applied and offset what it sees as the centre of the sprite

#

it's 'moving correctly', but you have to remember that while the only non-transparent part of the sprite is the seal, the seal sprite itself is the same size as a card

#

I'd have assumed seals wouldn't move on their own, and just be a child sprite of the main card object, but I guess that's not the case

placid star
#

how would you check the rarity of a joker? e.g. in the context of [G.jokers.cards[i]]

daring fern
placid star
#

tyyy

daring fern
hushed field
#

I'm not sure, you'll have to dig a bit more into how the sprites are set up. Sorry I can't be a better help there

hushed field
#

that'll be the sprite's placement. I'm not sure how balatro handles the centre for its sprite movement, though

zealous glen
#

That way it automatically tracks the card correctly

daring fern
quartz ravine
#

Yessss

zealous glen
#

something like this

    set_sprites = function(self, card, front)
        if self.discovered or card.bypass_discovery_center then
            card.children.floating_sprite_vic_belt = Sprite(card.T.x, card.T.y, card.T.w, card.T.h,
                G.ASSET_ATLAS[card.config.center.atlas], {
                    x = 0,
                    y = 2
                })
            card.children.floating_sprite_vic_belt.role.draw_major = card
            card.children.floating_sprite_vic_belt.states.hover.can = false
            card.children.floating_sprite_vic_belt.states.click.can = false
        end
    end
quartz ravine
#

I have this concept of Grass cards, which are like a stone card that start at +0 chips. However they level up when held in your hand

Currently it's an enhancement but I am playing with this idea of it also enforcing a custom edition, so I can pass that accrued +chips to the shader. The idea is they will start brown and get greener and more vibrant as they are held longer

hushed field
#

you can set up shaders on the enhancement itself, no?

spark pumice
#

Oh I see ty! So- When do I use not context.blueprint? Isn’t the blueprint only going to use the code in the if context.blueprint part?

quartz ravine
#

I have heard this is possible @hushed field , but I couldn't figure it out. I do know how to get this working using an edition though.

daring fern
spark pumice
#

Oh okay! Ty!

quartz ravine
#

Nice parappa the rapper profile pic!

zealous glen
thin anchor
quartz ravine
#

this is weird! For some reason this is retriggering held cards after the round is over

      if context.cardarea == G.play and context.repetition and context.other_card and context.other_card.ability and context.other_card.ability.name == "Grass Card" and not context.after then
            return {
                message = localize('k_again_ex'),
                repetitions = card.ability.extra,
                card = card
            }
            --context.individual and context.cardarea == G.hand and not context.after
        elseif context.individual and context.cardarea == G.hand and context.other_card.ability and context.other_card.ability.name == 'Grass Card' and not context.after then
            sendInfoMessage("1849, new method for held grass", self.key)

            return {
                message = localize('k_again_ex'),
                repetitions = card.ability.extra,
                card = heldCard
            }
        elseif context.joker_main and context.repetition and not context.after then
            sendInfoMessage(" checking for held grass", self.key)
            for _, heldCard in ipairs(G.hand.cards) do
                local cardAbility = heldCard.ability.name or "nil"
                if cardAbility == "Grass Card" then
                    sendInfoMessage(heldCard.base.id .. " has ability of " .. cardAbility)
                    return {
                        message = localize('k_again_ex'),
                        repetitions = card.ability.extra,
                        card = heldCard
                    }
                end
            end
        end

I thought my and not context.after would keep me from firing in that case

quartz ravine
daring fern
gentle rain
spark pumice
#

Ahh ok ok ty

zealous glen
#

this is also how the game moves soul sprites

#

or all sprites really

daring fern
hushed field
#

Does SMODS.Jokers contain every joker, or just ones added by mods?

zealous glen
#

nor the center

#

usually in SMODS, self is the Center

reef belfry
daring fern
thin anchor
#

good enough

wintry arch
#

not sure if this is quite the right channel to ask this but,

#

has anyone done an exhaustive search for seeds similar to the all 10 of spades erratic seed?

daring fern
red flower
#

im far past normal calculate contexts

thin anchor
#

what is that.

#

im scared

red flower
#

more complicated context checks for my effects

thin anchor
#

i see

red flower
#

also i make like 100 cards at a time so i need helper functions or i die

daring fern
minor furnace
#

that's a lot of seeds

red flower
#

not even naneinf

minor furnace
#

so true

wintry arch
#

might take a bit but you could find like a solid 0.001% of em

native zinc
#

rahhhh github public

minor furnace
# minor furnace that's a lot of seeds

you'd also need to define a threshold for what deck you think is "interesting" to store the seeds, because there's no way you're storing every single one of those decks

glad osprey
#

how make card area

wintry arch
#

i mean like. how do minecraft seed hunters do it

glad osprey
minor furnace
#

also, I think this means there are significantly fewer seeds than there are theoretically possible combinations for the erratic deck?

glad osprey
#

wait shit wrong end

wintry arch
#

whag

glad osprey
#

that's how you find coords based on the seed not vice versa

wintry arch
minor furnace
native zinc
#

consider the 52 cards and the 52 choices...

#

that's a lot

wintry arch
#

it's not 52^52

minor furnace
#

yeah you have to factor out permutations, but even still

native zinc
#

it's still greater than 52! iirc

wintry arch
#

yes yes, big number

minor furnace
limber blaze
#

is it actually a bug or did there just so happen to be a seed where you get all 10 of spades i never knew that

#

like wacky uncommon stuff happens all the time when you have access to this many seeds its not unfathomably although it definitely looks like a bug

native zinc
limber blaze
#

probably a bug then

#

its definitely a possibility that you just get lucky enough to get a seed like that naturally but when theres multiple occurences of something that common its probably a bug

brazen kite
native zinc
minor furnace
#

I didn't realize there was more than one 10 of spades decks

brazen kite
#

i think

native zinc
#

there's 2 famous ones*

brazen kite
#

yeah

native zinc
#

one is the first one the other just has like

#

oops, all holos

#

so you see people running either the first one or oops all holos all 10 of spades

#

but there's quite a decent more that start of 10 of spades

#

im pretty sure some seeds fuck up booster packs to be all 10 of spades too

#

balatro really likes 10 of spades

minor furnace
#

if only it was the Ace instead

brazen kite
#

fjeirbrndkdi i used Back.trigger_effect and console said it’s deprecated but when i switch to calculate it literally doesnt do anything

native zinc
#

idk i modded a joker in just so i can play ten of spades seeds with ridiculous output

minor furnace
#

realizing I haven't updated my smods in a few weeks, should probably do that now

native zinc
#

if you're already playing exploited seeded then you can also cheat by doing this /j

minor furnace
daring fern
#

Is there a way to retrigger a joker without returning?

reef belfry
#

Whats a good compromise when the text isnt symmetric

#

Its off by 1 pixel and its making me mad

minor furnace
#

just like the rest of us

glad osprey
#

or thin A

minor furnace
#

you can either have symmetric text, or consistent font sizes, but not both

glad osprey
#

or Soda Can

lament sparrow
#

Do we have access to the lua for the base jokers?

hushed field
#

the entire source code is accessible

lament sparrow
#

Huh. Maybe I missed it, but I couldn't it

hushed field
#

have you played with mods before? In that case, you can see the patched code in the lovely folder

lament sparrow
#

I have played with mods before. I was assuming it was within the game files

faint yacht
#

Open the main executable as an archive. 🍞

hushed field
#

the lovely dump is the source code patched with smods, which if you're interested in making your own mod is often slightly more useful to look at. The main source code is accessible if you own the game on steam and enter the executable as an archive

lament sparrow
#

I see. If the lovely dump has it, it'll be easier for me to just look at that

limber blaze
#

the lovely dump will have more accurate line numbers for errors too

daring fern
rugged pier
#

Just doesn’t recognize my SMODS

#

And it’s just really annoying

rugged pier
daring fern
rugged pier
#

Cause I have it in my workspace

daring fern
brazen kite
rugged pier
gilded narwhal
#

hey guys how would i distinguish if a playing card is added from a standard pack or not

rugged pier
long urchin
#

interesting ::::)

#

wink wonk

lament sparrow
limber blaze
#

game defines a lot of specific cards

#

G.P_CENTERS is where a lot of definitions will be

#

but in terms of actual calculations im unsure

lament sparrow
#

The reason why I'm asking is because I would like to see how Bootstraps is coded

placid star
#

any ideas why my game crashes on boot? i am certain it is this consumable because it started crashing after I changed a couple things in it (i cant remeber what i changed tbh :( )

hushed field
hushed field
stark geode
#

Wait how do you control how often your custom rarity shows up in the shop

placid star
#

Okay so my can_use works as intended! but on use my game will crash with this error :/, can anyone suggest any fixes?

remote sequoia
#

Is there a reasonable way to make a blue seal either not (attempt to) make anything or make it give a specific card? I have a hand type with no associated planet card (playing this Joker-related hand automatically wins the blind so there is no scaling it up) and having a blue seal crashes the game trying to make the non-existing planet. I'd happily give a pluto if needed, otherwise just preventing it from trying works too.

placid star
remote sequoia
#

actually, looks like our issues are similar @placid star. Maybe try making sure the joker was created before calling add_to_deck with it?

runic pecan
#

Hmmm, seems like I've missed something.

#

Code shots incoming

placid star
runic pecan
placid star
runic pecan
#

Huh, I thought pools was optional.

placid star
#

it might be, but thats the only thing i can think for for that error :/

stark geode
#

Hey anyone know where the voucher sorce code is

#

I want to look at observatory

runic pecan
hardy viper
stark geode
hardy viper
#

not a clue let me look rq

remote sequoia
placid star
#

hm ill give it a try and get back to you!

hardy viper
#

G.jokers

blazing cairn
#

yall know how to fix the "attempt to index field "other_card' (a nil value]" issue

#

idk im dumb

stark geode
#

It there a context for when a consumable is created

sturdy compass
remote sequoia
placid star
#

this is the entire code of my card after i changed the key to awake, im ngl i thought that part was for what you want to generate

remote sequoia
#

It is, I'm asking is the card you want to create actually refered to as jjok_special?

placid star
#

ohhh, no the rarity is... ill try it with the key of a specific card tho

remote sequoia
#

Yeah, you're creating a specific card with create_card

placid star
#

ah

#

i tried this and yes 'yuta' is a joker's key but still, the same error

remote sequoia
#

you likely need the joker and your mod's signifiers. assuming your mod's is jjok, try 'j_jjok_yuta'

sturdy compass
#

@placid star custom joker keys should follow the format j_[mod prefix]_[key]. For example, one of my jokers with a mod prefix ‘mxms’ looks like j_mxms_chef

#

This isn’t how it should be defined when making the Joker, but how it should be used

placid star
#

holy shit tysm guys the prefix worked!

#

can i generate a random joker of a custom rarity with create_card or do i need to use another function?

sturdy compass
#

You should try SMODS.add_card instead. It’s a lot cleaner, does more for you, and has more options

placid star
#

oh yeah, isnt that the one that doesnt need the emplace and add_to_deck?

sturdy compass
#

By “does more for you” I mean it creates the card, adds it to your deck, and emplaces it all in one fell swoop

placid star
rapid stag
#

who knows anything about adding sprites to the title screen/main menu? in particular, i have an idea for something between the main menu buttons that occasionally and briefly pops out from them before returning, for a small bit

sturdy compass
#

I’m fairly certain you can do pools too, I’m just less educated on that. I know one of my cards does it I just forget how

placid star
#

ah, so for custom rarity generation you would do rarity = '[prefix]_[rarity_key]'?

sturdy compass
#

Yep!

#

I think

#

Not too sure how rarity keys are indexed so you may have to do some experimenting

#

I would assume that is correct tho

placid star
#

okay! thank you so much! you've been such a good help i cant thank you enough <3

sturdy compass
#

Any time

#

Ig that’s what months of doing this gets ya: decent knowledge on how to help others lol

stark geode
sturdy compass
#

I believe it’s [card object].ability.set

placid star
#

omg so ive tried it with add_card and create_card, with emplace and add_to_deck yet they both crash with that error

#

yet when its only create_card, it draws the joker on screen, makes it draggable but it doesnt function as a joker

hushed field
#

you'll wanna do that yourself still, using :emplace

placid star
#

but when i emplace it, my game crashes, same with add_card

hushed field
sturdy compass
#

This is a shot in the dark but try giving the local card variable a different name

#

Call it like “new_card” or smthn

hushed field
#

Also, never use a local named card in your calculate function. It won't majorly break anything, most of the time, but it'll often create some confusion or bugs when you're testing and fixing things

ivory coral
sturdy compass
#

Same crash log?

placid star
#

yep excact same

ivory coral
sturdy compass
#

I just looked at the definition of your use function and that doesn’t look set up quite right. The variables should be (self, card, area, copier). It’s another shot in the dark but it’s good to fix that

wintry solar
ivory coral
sturdy compass
#

Thought so. At the very least it reduces further confusion

placid star
#

i could update and link the github if that would help?

sturdy compass
#

Nah you don’t have to

#

I would like to see an updated version of the code and the crash log again tho

sturdy compass
#

G.jokers:emplace instead maybe?

placid star
#

yeah i think this is what the error is referring to

sturdy compass
#

I’ve gtg for a time unfortunately but if it still isn’t solved by the time I come back I’ll jump back into the fray lol

placid star
#

TYSM

sturdy compass
#

LMAO

#

Huge

placid star
#

I NEED TO AN EXTRA DOT

#

i hate coding fr

#

. -> :

sturdy compass
#

Yeah Lua does object function calls with colons and not dots

placid star
#

u the goat fr tho tysm <33

sturdy compass
#

U got it

placid star
sturdy compass
#

I think I will in a couple of hours

placid star
#

sounds good!

stark geode
#

SMODS.Joker{
    key= "perkeoTemplate",
    calculate = function (self,card,context)
        if context.card_added and context.card.edition == 'e_negative'  and context.card.ability.set =='consumeables' then
            return {
                message = "test",
                colour = G.C.MULT
            }
        end
    end 
}

so this should trigger when a negative consumable is made?

#

right

frosty dock
#

context.card.ability.consumeable for the consumable check iirc

#

the set will be something like Tarot, Planet etc.

stark geode
frosty dock
stark geode
#

what in the

frosty dock
#

it's all fake

iron mantle
#

These patches don't seem to work anymore, would you happen to have updated versions or know what smods version these were made for?

chrome widget
#

I've since updated my own and had to address a few patch changes, lemme look

faint yacht
#

...weird, trying to delete all playing cards but of one rank is only deleting half of the deck...

for i = 1, #G.playing_cards do
  if G.playing_cards[i] and G.playing_cards[i].base.id ~= 3 then G.playing_cards[i]:remove() end
end
hushed field
iron mantle
placid star
#

anyone know the function for deleting a joker?

hushed field
#

<@&1133519078540185692>

stark geode
#

Thanks mods

chrome widget
#

Not much has changed about them, so it's possible you might just be encountering a bug, but I can confirm that they both work

iron mantle
#

Thanks 🙏

modern kindle
#

Gonna steal all ur patches winter

chrome widget
#

If they aren't working, I can guide you through it CattoBlush

chrome widget
modern kindle
#

That's okay I've decided your mod is my mod which means it's my quantum edition patch now

chrome widget
#

Ah fuck

modern kindle
#

😎

#

Also winter i will probably desire your assistance soon
I am out and about currently though

chrome widget
#

You got it!!

gentle rain
#

is there any documentation for shaders

placid star
#

can context.destroy_card be used to destroy jokers?

hushed field
#

Nope, destroy card only iterates over cards

#

I'm not sure if there currently is an smods context for joker destruction

placid star
#

hm so what would be used to destroy a joker?

iron mantle
chrome widget
#

That's an SMODS issue, since it's coming from an SMODS patch

#

Let me see the code you're using for the context

hushed field
placid star
#

ty ill take a look at that!

iron mantle
#

I dont' even have proper code rn cuz I just wanna make sure the context works as I need it to

#

the other two prints are holdovers from what I had previously lol

#

but yea the print("card added") does not proc whatsoever be it from shop buy or debug generation

chrome widget
#

Okay, let me give it a spin

placid star
#

@hushed field ive seen a pseudorandom function used before but im not too sure how to use it and I can't find it on the wiki... can u maybe point me in the right direction?

chrome widget
iron mantle
#

regular print statments, I didn't even know smods had debug messages lol

chrome widget
#

That's probably why you aren't seeing anything

#

I don't think they work as expected

#

But for your purposes, here's a video demo. I used that exact condition on my Sexy Joker, and you can see my use of Wraith results in output

remote sequoia
#

Regular prints do work as far as I've seen

#

They show up as info messages

iron mantle
chrome widget
#

Oh, well, normal prints work too

iron mantle
#

Yea the debugmessages don't work either

chrome widget
#

So something else weird is going on

#

What's the situation in which you're using it

hushed field
# placid star <@136103704750194690> ive seen a `pseudorandom` function used before but im not ...

pseudorandom creates a number between 0 and 1. You give a seed to it so that it's consistent with your current game's seed. To see if a chance happens, you compare it with your current chance, turned into a number between 0 and 1. If the random number is smaller than your chance, the effect happens. When you write that down, it becomes (depending on the implementation)
if pseudorandom("uniqueseed") < G.GAME.probabilities.normal / card.ability.extra.chance then

G.GAME.probabilities.normal is always 1, unless a joker changes the odds (in vanilla, that's only Oops). So, let's say you have a joker with a chance of 4, it'll default to 1/4. In numbers, it'll look like this
if pseudorandom("uniqueseed") < 0.25 then

so you can see, if the random number generator creates a 0.3, it's bigger and the event will not happen. If it creates a 0.111111 it will happen.

If you want a chance on your joker that's for example 3 in 16, then you wanna add an additional variable to your joker and multiply that, resulting in
if pseudorandom("uniqueseed") < G.GAME.probabilities.normal *card.ability.extra.current_chance / card.ability.extra.total_chance then

Do keep in mind that the names I'm setting for the variables here, in card.ability.extra, are just random, you can use whatever you want.

iron mantle
#

Basically I just want to be able to detect when a joker is added so that I can check for a synergy thing, I was able to successfully implement the intended functionality for the shop buy using the buying_card context but that doesn't account for the judgement generation. Meanwhile card_added does, but that context for some reason occurs before it actually adds the joker to the jokers array, which means I can't affect the newly added card using that context. So I went digging and found your patch which from what I've seen should hopefully bypass that issue since it directly hooks into the emplacing process

chrome widget
#

No I mean what's the full code around it

#

Are you using it correctly in calculate?

#

If you send me the full file I'd be happy to debug

faint yacht
placid star
hushed field
placid star
#

ohh, should i switch it to element from what i have?

placid star
#

how do we feel about this sprite? also, how would i go about making a custom text colour? kinda like how theres C:mult, could i make my own one?

iron mantle
chrome widget
#

Just the Lua file is fine I think!!

iron mantle
chrome widget
#

Yeah, sorry it didn't end up a simple drag and drop!!

stiff locust
#

how do I change the scale of a card

bold sleet
#

Hello. Question: How do you pass parameters with this thing?

chrome widget
#

@iron mantle I tested your The Thing card, and it works as expected!

#

I didn't also implement the custom rarities, but it does hit the first block and use the joker_created context just fine

weak brook
#

anyone know where the value for a cards position in its cardarea is stored? like if its the first card in my hand where can i find the value of 1 for that?

chrome widget
#

should be in card.rank

#

Confusingly named, I know

#

assuming it also has a cardarea, ofc

weak brook
#

yeah i was about to say

#

thanks

chrome widget
#

But the align_cards function sets that value when it sorts the cardarea table

#

Where rank is necessarily the position in the array, k in ipairs

weak brook
#

are you saying that the rank value isnt always accurate to its position?

chrome widget
#

it should always be accurate up to the last frame

weak brook
#

ok thats good

chrome widget
#

align_cards is called every frame, sorts them based on transform position, and then sets rank equal to their current index position

#

Unless some weird stuff happens, it should give you accurate info

placid star
#

does anyone know where/what the vanila soul key is? i need to take ownership of it but i cant find it in card.lua :/

gilded narwhal
#

guys where are loc_vars for planet cards

placid star
daring fern
gilded narwhal
#

like the reference for all of these

placid star
#

does anyone know if this will increase the chance of getting a soul in any given arcana?

placid star
#

okay i havent seen it so far in any arcana but i got it from the first spectral i opened...

daring fern
gilded narwhal
daring fern
rapid stag
#

how can i randomly pick a whole integer within a set range using pseudorandom() cirThink the way chance is done for everything in the game seems to entirely rely on real numbers

#

am i able to just truncate

#

...i guess i could do from element and do it that way but it feels bleh

daring fern
rapid stag
sturdy compass
rapid stag
#

my intuition was that it makes the randomness dependant on the run seed

sturdy compass
#

Also hi I'm back

placid star
#

anyone know how to make that kinda soul 'animation' on another spectral card?

tall wharf
rapid stag
#

since when you do a seeded run, if you hit R, it restarts with the same seed, so the same pseudorandom() events will have the same outcome

sturdy compass
#

Basically it's all handled internally as long as you have that defined

placid star
sturdy compass
#

Oh like the jiggle animation?

placid star
#

yeah that one!

sturdy compass
#

lemme take a dive into that rq

placid star
#

the one that makes it look like something is trying to break out đŸ€€

placid star
tall wharf
sturdy compass
#

My guess is all cards aren't checked for what side is up on restart?

tall wharf
#

no clue why sometimes it's flipped

#

huh

tall wharf
sturdy compass
placid star
#

aw thats a shame, ty for looking tho!

sturdy compass
#

The only thing that I could find that looks like what you might want is this

SMODS.DrawStep {
    key = 'soul',
    order = 50,
    func = function(self)
        if self.ability.name == 'The Soul' and (self.config.center.discovered or self.bypass_discovery_center) then
            local scale_mod = 0.05 + 0.05*math.sin(1.8*G.TIMERS.REAL) + 0.07*math.sin((G.TIMERS.REAL - math.floor(G.TIMERS.REAL))*math.pi*14)*(1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL)))^3
            local rotate_mod = 0.1*math.sin(1.219*G.TIMERS.REAL) + 0.07*math.sin((G.TIMERS.REAL)*math.pi*5)*(1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL)))^2

            G.shared_soul.role.draw_major = self
            G.shared_soul:draw_shader('dissolve',0, nil, nil, self.children.center,scale_mod, rotate_mod,nil, 0.1 + 0.03*math.sin(1.8*G.TIMERS.REAL),nil, 0.6)
            G.shared_soul:draw_shader('dissolve', nil, nil, nil, self.children.center, scale_mod, rotate_mod)
        end
    end,
    conditions = { vortex = false, facing = 'front' },
}
#

And I have no idea what to make of it 😭

placid star
#

WHY IS THERE EXPONENTS

tall wharf
#

different beating phase

placid star
#

ill play around with it, see what happens, i have no idea where it would even go in my code tho lmao

zealous glen
sturdy compass
placid star
sturdy compass
#

it would be 'c_jjok_awake'

placid star
#

ah okay, ill play around with the DrawStep you found and let you know!

sturdy compass
dapper sun
#

what's a good way to test my jokers without constantly holding r and hoping for a specific shop?

sturdy compass
#

Do you have debugplus?

dapper sun
#

yes

sturdy compass
#

In collections, hover over the card and press ctrl + 3 to spawn it in your hand

tall wharf
#

yea

#

damn it astra youre faster

sturdy compass
tall wharf
#

i broke my glasses

sturdy compass
#

damb

dapper sun
#

ty

sturdy compass
#

np

long urchin
#

Does anyone know why this is happening?

SMODS.Atlas {
    key = "roffers",
    path = "Jokers.png",
    px = 71,
    py = 95,
}

-- load common util funcs
assert(SMODS.load_file("globals.lua"))()

-- load all individual jokers
local subdir = "cards"
local cards = NFS.getDirectoryItems(SMODS.current_mod.path .. subdir)
for _, filename in pairs(cards) do
    assert(SMODS.load_file(subdir .. "/" .. filename))()
end
zealous glen
tall wharf
#

G.CONTROLLER.hovering.target

#

😭

zealous glen
#

You don’t need NFS

long urchin
#

ah, i didnt know

zealous glen
long urchin
#

i just used neatojokers as a base lol

silk scaffold
#

on a scale of 1-10, how difficult do yall think making a wild card for numbered cards would be?

long urchin
#

whats the function?

silk scaffold
#

2-10s count as all numbered ranks

zealous glen
placid star
#

@sturdy compass can i screen share to you in dm? the result is just so funny

sturdy compass
#

Yeah I'm free lol

spring lantern
silk scaffold
# zealous glen 11

Figured bc you would have to implement functionality to all jokers within the game that use a numbered card, then as well played hands, then as well the modded jokers

zealous glen
tall wharf
silk scaffold
long urchin
silk scaffold
long urchin
#

jesus christ aiko youre making solitaire???

abstract ridge
#

I was wondering if anyone here has any experience with creating multi-line text inputs? I'm looking for something that works like a HTML textarea tag

spring lantern
#

so it would seem

zealous glen
sturdy compass
spring lantern
#

😭

abstract ridge
zealous glen
tall wharf
long urchin
#

yeahh...

spring lantern
#

guess you have to check if the filename isn't that

zealous glen
#

Has anyone here transformed consumables into other consumables?

#

Or does anyone knows a mod that does it?

long urchin
#

i know how to turn jokers into other jokers, i feel like itd be the same thing since everything uses keys

abstract ridge
long urchin
#

i legit copied the neato jokers code idk whats wrong here :?

tall wharf
long urchin
#

theyre like little worms

dapper sun
#

how do i change a joker's description text depending on a variable's value?

spring lantern
long urchin
daring fern
dapper sun
#

not what i meant

long urchin
#

then what did you mean

spring lantern
#

i mean that's how you change text in a card description

#

you can pass a string of text as the variable

long urchin
spring lantern
#

no idea

#

mac is weird idk

#

might as well just check for that .DS_Store file and skip it

dapper sun
#

i meant my thing says

long urchin
dapper sun
# dapper sun i meant my thing says
    "If {C:attention}first hand{} of round",
    "has {C:attention}#1#{} card, destroy it",
    "and gain {X:mult,C:white}X#2#{} Mult",
    "{C:inactive}(Currently {X:mult,C:white}X#3#{C:inactive} Mult)"
}```and i wanna make it change if it has more than 1 card
dapper sun
#

ok

spring lantern
#

something like if filename ~= '.DS_Store' then

zealous glen
#

Or you use main_end

long urchin
#

elle, the thing wont say '1' because its #1#

#

its just saying the 1st variable

dapper sun
#

i know, i'm adding support for the glitched effect from cryptid

#

so it can change the value to a different amount of cards

zealous glen
zealous glen
dapper sun
#

how

tired skiff
#

any idea why this is not adding a voucher?

dapper sun
#

bc it still says 2.6 card

zealous glen
mellow sable
#

it should be automatic if it's in the ability table

dapper sun
#

ability table?

tall wharf
long urchin
#

looks more right i think

spring lantern
#

the invisible cards

long urchin
#

but whys it all visible

#

shouldnt they be flipd

stark geode
#
SMODS.Joker{
    key= "perkeo_template",
    calculate = function (self,card,context)
        if context.card_added and context.card.edition == 'e_negative'  and context.card.ability.consumeables then
            print("triggered")
            return {
                message = "test",
                colour = G.C.MULT
            }
        end
    end 
}

so im trying to make it detect when a negaive consumeable is created

mellow sable
stark geode
#

i feel like im doing somthing wierd

dapper sun
#

yea it is

stark geode
dapper sun
tall wharf
#

G.CONTROLLER.hovering.target

#

self reminder

tired skiff
tall wharf
long urchin
long urchin
dapper sun
#

gimme a sec

tall wharf
#

we are back to square one

dapper sun
spring lantern
long urchin
#

yea

spring lantern
#

same thing?

#

that's weird

dapper sun
long urchin
# dapper sun

oh in the code you can round it using math.floor(variable+0.5)

dapper sun
#

if the card isn't exactly 1 i wanna change it to has #1# cards, destroy them

violet sparrow
#

hi im trying to make my first enhancement and the 2.5x mult part is working correctly, but the destroying itself when not in the hand is not. could someone help me out with it?

dapper sun
long urchin
#

sorry youre kinda

#

presenting things in a really confusing way

dapper sun
#

how

long urchin
dapper sun
#

i don't want it to be immutable????

#

i just want the description to change so it stays grammatically accurate

long urchin
#

yeah delirium gave me a patch that does basically this, i dont know where it is but they know how to dynamically change loc_txt

dapper sun
#

i know

spring lantern
long urchin
#

nickname api

vale lake
#

that only works for unmodded Jokers

dapper sun
#

i give up

long urchin
#

ah

dapper sun
#

i'll just reword it so it doesn't use a number for the card amount

spring lantern
#

you can also use loc keys with this

#

if that's the issue

long urchin
# dapper sun i give up

elle, youre trying to check what the #1# variable is and then if its not 1 it says cards instead of card right?

vale lake
#

wait is the issue trying to make "1 cards" become "1 card"?

dapper sun
#

no

spring lantern
#

2 card -> 2 cards

dapper sun
#

the issue is i wanna reword not just that but also change the end to and gain {X:mult,C:white}X#2#{} mult each

#

but, again, i give up

#

has a single card

#

now i don't need to make it a variable that can be glitched

spring lantern
#

i mean you could've also done another var field where if card == 1 you pass '' and otherwise pass 'each'

long urchin
#

alright well

spring lantern
#

so you got the exact same crash when you tried filtering the files like i said?

#

because then i am also completely stumped with this

long urchin
#

yeah

spring lantern
#

i can try just copying the code on my end and seeing if i get the same issue

#

although i'm on windows

long urchin
#

alright ill undo it and send it as a zip

last sentinel
#

anyone know why the calculate function in a custom deck wouldn't be calling? print statement immediately after the definition and it never runs. deck shows up fine in game though

signal slate
#

Speaking of calculate functions, Does anyone know how to do two, like say you add multiplier and than you balance it out

tall wharf
spring lantern
#

beautiful

stark geode
#

cinema

sturdy compass
#

huge

long urchin
#

so i tried putting it into a mod that i knew worked and changing the atlas and it doesnt work, so i think that means the joker itself is fucked. Does anyone know why?

rapid stag
tall wharf
daring fern
long urchin
#

hey do you know why i might be having my problem?

primal robin
stark geode
#

how do i check the type of card being created

#

in the context of added card

tall wharf
#

can i just use collide

tall wharf
#

when i move card somewhere

#

i want to move the card to the area the card is over

zealous glen
spring lantern
#

yo thoughts

stark geode
zealous glen
stark geode
spring lantern
stark geode
#

wait did i say joker

#

i mean jimbo

zealous glen
#

it is named joker

spring lantern
#

that's his deadname

zealous glen
#

that's just his name

#

Jimbo is his title

#

like his job

spring lantern
#

ah i see

stark geode
#

what am i doing wrong here

spring lantern
#

remind me how to do the wiggly text in a card desc

#

i forgor

stark geode
#

i feel bad when i cant help peopl

#

but idk anything about that yet

spring lantern
#

yea there u go thx

sturdy compass
stark geode
#

thats the key

sturdy compass
#

Ah then you're missing a mod key on the localization

#

If Perkeo is your mod key, remove that from the card's key

stark geode
#

yk

#

if i could actuall pay attention

sturdy compass
#

LMAO

stark geode
#

they mods key is _Perkolator

sturdy compass
#

then the localization key would be j_Perkolator_Perkeo_Template

stark geode
#

there we go

#

so ive got it increasing mult when neg consumeabels are added

#

now i need it to actually score

sturdy compass
#

Glad it worked PogBalla

scarlet spire
#

I love accidentally specifying my tag as a deck

old bane
#

abundance tag deck

tall wharf
stark geode
#

bruhhhhh

#

it was jus working

#

😭

scarlet spire
#

okay i'm a bit confused, how does the context.type system for tags work? is there a list of these?

hushed field
#

There's no list, but all the tags in the code are pretty limited in where they're set up. You can search all for them, and see which tag contexts exist

scarlet spire
#

wow, that's really limited

#

hmm

quartz ravine
#

Wow this is cool!

How do people do this?

modern kindle
scarlet spire
#

ah wait it doesn't seem too complicated to add your own tag contexts

quartz ravine
#

I am playtesting an idea, I have some jokers that heavily reward hands that are based on the total value of your cards. For instance, this joker

I added a new hand, it requires your hand be a multiple of 13. Anyway I was wondering...if this too hard?

modern kindle
#

if its not a hidden hand probably not
i have a hand and a card for blackjack values

quartz ravine
#

It is a hidden hand

#

has anyone implemented a planet card for their own custom hand?

modern kindle
#

i have yea, whats your query regarding em?

last sentinel
#

Does anyone have an example of a mod successfully using a calculate function in their custom deck that was made after trigger_effect was depreciated? I'm having a hard time finding one

inland charm
#

I have a question for you modder people. Is there any way to make a joker modify cards as soon as they're added to the deck. I'm trying to make a mod and want a joker that converts all cards added to the deck to a suit. So far I basically have a joker set up to just give a ❀ message whenever a card is added.

faint yacht
#

One of my upcoming decks has a calculate function... you just add it in and use.

tall wharf
#

i give up for today

gilded narwhal
#

why is this happening

minor furnace
#

if you look in card.lua for what Hologram does

gilded narwhal
primal robin
inland charm
quartz ravine
#

Every single day I regret first learning programming with a case-insensitive language

inland charm
#

And just kinda figure it out

tall wharf
quartz ravine
quartz ravine
modern kindle
#

wonderful job =]

#

if you havent figured it out you can also make the cards not show up until theyve revealed the hand

gilded narwhal
minor furnace
dapper sun
#

how do i add colours?

quartz ravine
# modern kindle wonderful job =]

Actually I was wrong 😩

I keep getting crashes related to unable to find colors, when I mouse over this card. Do planets do something odd related to reporting colors?

        object_type = "Consumable",
        set = "Planet",
        name = "Meteor",
        key = "Meteor",
        pos = { x = 1, y = 1 },
        config = { hand_types = { "Cosmo Canyon" } },
        loc_txt = {
            name = "Cosmo Canyon",
            text = {
                "{S:0.8}({S:0.8,V:1}lvl.#1#{S:0.8}){} Level up",
                "{C:attention}#2#",
                "{C:mult}+#3#{} Mult and",
                "{C:chips}+#4#{} chips",
            },
        },
        cost = 4,
        atlas = "FoxModMisc",
        order = 3,
        can_use = function(self, card)
            return true
        end,
        loc_vars = function(self, info_queue, center)            
            return {
                vars = {
                    "Cosmo Canyon",
                    G.GAME.hands["Fox_cosmocanyon"].level
                },
            }
        end,```
inland charm
#

I'll try it. Thank you!

minor furnace
reef belfry
#

Do these look Or ?

modern kindle
#

as a ref point

quartz ravine
#

Flush Six!?!

minor furnace
#

ascendant?

quartz ravine
#

You are really cooking. By the way, I love your art

minor furnace
#

consider the following: Flush N, for any number of playable cards

modern kindle
minor furnace
#

imagine having an artist

#

could not be me 😔

quartz ravine
modern kindle
#

without an artist you get the bottom stuff lmao

graceful magnet
#

I'm frankly baffled this doesn't work

gilded narwhal
#

Oh the art isn't mine

#

But thank you anyway

reef belfry
#

Lets enslave artists

#

Except me

modern kindle
#

artists? yea right, more like

fartists
or something

minor furnace
graceful magnet
quartz ravine
#

Hey I tried doing handdrawn art and then making it into pixel art. Did not go well.

#

Frankly I recommend everyone to just marry an amazing multi-format artist

quartz ravine
paper zealot
# reef belfry Do these look Or ?

The top of the can could use some manual fix-up to clarify some missing pixel detail, and the curve of the can base is a little blocky on the left side, but i really dig the effect you're going for

modern kindle
modern kindle
minor furnace
quartz ravine
#

It is any hand that is divisble by thirteen. I have a jonkler that retriggers cards for that hand when played. Guess who it is?

minor furnace
#

oh interesting

#

yeah I've got no clue

quartz ravine
#

Hey @modern kindle , how do you make the planet card actually level up the linked hand? Do you need to reference your hand with the prefix?

minor furnace
modern kindle
#

yep there it is

quartz ravine
#

RedXIII retriggers each card in a played Cosmo Canyon. If you do decide to stack your deck towards the hand, especially with gold tag cards...it goes well

modern kindle
#

config = { hand_type = "dilatro_flush_six_hand" },

as example, dilatro is my prefix

quartz ravine
#

oooohh, you do have to use your Mod prefix. In my case it should be 'fox_cosmocanyon'

manic rune
graceful magnet
#

base.id doesn't work, get_id() doesn't work, base.value doesn't work

manic rune
#

did u try without the pseudorandom?

minor furnace
manic rune
minor furnace
#

ah

#

ohh for hiker and such

graceful magnet
inland charm
#

Ok here's where I'm at rn lol

manic rune
#

weird

inland charm
#

Don't mind the scribble on the one part, that's just because I put my full legal name as who the mod was by lmao

minor furnace
inland charm
#

Idk

minor furnace
#

I guess it doesn't

hushed field
#

Full name being Madd Max 3: Beyond Thunderdome of course

minor furnace
#

what on earth does context.cards do then

inland charm
#

I know hologram only cares about how many are added not the actual kinds of cards themselves

manic rune
inland charm
#

So idk

#

There may be a reason I couldn't find a mod that did what I'm trying to do

graceful magnet
manic rune
#

weird

#

did u try a new run

modern kindle
#

hi bepis

graceful magnet
hushed field
# inland charm So idk

It's a boolean because you're using pairs, but the table doesn't have keys. Try ipairs

manic rune
#

hi dilly

inland charm
#

I tried ipairs

minor furnace
#

slap a print(context.cards) in there instead of the loop

hushed field
minor furnace
#

context.cards might just be a boolean vector with a length of the number of cards added

graceful magnet
#

speaking of that other chance Joker that doesn't work

I'm not seeing any damn Spectral cards

dapper sun
#

how do i make custom C: colours?

quartz ravine
inland charm
inland charm
#

With ipairs instead of pairs

hushed field
#

Huh, I guess cards passes on bools. It's a new context so I haven't used it before, I'm not sure how it's set up

#

No wait, I think I'm confusing contexts

#

Oh, yeah, it explicitly calls this out on the wiki

#
{
    cardarea = G.jokers, -- G.hand, (G.deck and G.discard optionally enabled)
    playing_card_added = true,
    cards = cards -- the cards being added (sometimes is true when used from vanilla items)
}```
wintry solar
#

it shouldnt ever pass a boolean anyymore

minor furnace
#

that's one way to do it at least

inland charm
#

So does context.card not give the actual card that was added?

#

Am I understanding correctly or nah

dapper sun
#

i'm not doing it inside a specific joker

minor furnace
#

where do you want to call the color then?

quartz ravine
#

Just wanted to share that @modern kindle is a total boss and helped me out. Now my RedXIII joker can be happy

graceful magnet
dapper sun
#

nvmd i got it from looking through discord search

#
loc_colour('red')
G.ARGS.LOC_COLOURS['elle'] = HEX('FF53A9')```
paper zealot
#

The base looks better, though the missing pixels in the curve around the rim at the top still make it obvious that it's a downscaled sprite. Try making a consistent ellipse around the top, then try recolouring that ellipse to give the impression of lighting

paper zealot
paper zealot
#

If you're in an environment where the text is being parsed for style modifier codes, then it'll also check loc_vars.colours too, and that way gives you more freedom and avoids cluttering up the contents of LOC_COLOURS

dapper sun
#

ok

#

but

#

again, i'm not doing this inside a joker

#

so there isn't a loc_vars

minor furnace
#

where are you doing this?

graceful magnet
dapper sun
manic rune
#

is it the only mod ur running rn

graceful magnet
#

I am TWEAKING you cannot tell me THIS doesn't work

graceful magnet
minor furnace
dapper sun
paper zealot
dapper sun
manic rune
paper zealot
# dapper sun

I feel like you couldn't have given less context with this if you'd tried

rapid stag
#

question, does calculate() natively by vanilla, support a way of doing xchips via the returned table?

graceful magnet
manic rune
#

thats old

#

update ur smods

dapper sun
#

that code's not inside any other class or function

stark geode
#
SMODS.Joker{
    key= "Perkeo_Template",
    config = { extra = { Xmult = 0, Xmult_mod = 1.5 } },
    loc_vars = function(self,info_queue,card)
        return { vars = { card.ability.extra.xmult} }
    end,
    calculate = function (self,card,context)

        if context.card_added  and context.card.ability.consumeable and context.card.edition and not context.blueprint then
            if context.card.edition.type == 'negative' then
            card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_mod
            return {
                message = "test",
                colour = G.C.MULT
            }
            end
        end
        if context.individual and context.cardarea == G.play then
            return {
                message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.Xmult } },
                Xmult_mod = card.ability.extra.Xmult
            }
        end
    end 
}
minor furnace
manic rune
dapper sun
manic rune
#

oh and also

#

loc vars is wrong

graceful magnet
stark geode
#

but also

#

thats dumb

manic rune
minor furnace
# dapper sun

is this something you really needed to create a function for in the first place?

graceful magnet
paper zealot
# dapper sun

Yep, use {V:1} and provide the colour within vars.colours in the Joker's loc_vars function

dapper sun
#

i don't wanna have to add to loc_vars on every joker

minor furnace
#

you should add loc_vars on every joker

dapper sun
#

i said add to

minor furnace
#

how many jokers are we talking here

dapper sun
#

3 rn but i plan to add more

#

i'm futureproofing

graceful magnet
# graceful magnet Ha ha! *No*
    key = 'catgirl',
    loc_txt = {
        name = "Catgirl",
        text = {
            "Scored {C:attention}3s{} have a {C:green}#3# in #1#{}",
            "chance to score {C:mult}+30{} Mult, and a",
            "{C:green}#3# in #2#{} chance to earn {C:money}$30{}"
        }
    },
    rarity = 2,
    discovered = true,
    cost = 8,
    blueprint_compat = true,
    eternal_compat = true,
    perishable_compat = true,
    atlas = "jokers2",
    pos = { x = 4, y = 1 },
    config = { extra = { multOdds = 3, munOdds = 9 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.multOdds, card.ability.extra.munOdds, (G.GAME.probabilities.normal or 1) } }
    end,
    
    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play then
            local multHit = 0
            local moneyHit = 0
            if (pseudoseed("catgirl") < G.GAME.probabilities.normal / card.ability.extra.multOdds) then
                multHit = 1
            end
            if (pseudoseed("catgirl") < G.GAME.probabilities.normal / card.ability.extra.munOdds) then
                moneyHit = 1
            end
            if context.other_card:get_id() == 3 then
                return {
                    mult = 30 * multHit,
                    dollars = 30 * moneyHit
                }
            end
        end
    end
}```
I genuinely can't see what I'm doing wrong, stripping this down to the base of "if 3, add mult" isn't working either and I can't bash my head forever
tepid crow
#

but a function seems more futureproof tbh

dapper sun
#

a var does make sense yea i'll do that

minor furnace
paper zealot
dapper sun
#

ok

paper zealot
#

SMODS does add the colours of all custom Consumable types, Rarities and Suits to LOC_COLOURS, so it's not unprecedented - it's just not a standard approach, and {V:} is the more common solution

minor furnace
tepid crow
graceful magnet
gilded narwhal
minor furnace
gilded narwhal
#

well normally mercury isn't supposed to give +30 chips

#

Or +45 chips and -1 mult

minor furnace
#

oh wait yeah I see that now

graceful magnet
minor furnace
#

smods version?

graceful magnet
minor furnace
#

or possibly conflicting mods

graceful magnet
#

no other gameplay mods

tepid crow
#

it's basically your code copy-pasted and slightly edited to allow it to run on my machine

SMODS.Joker{
    key = 'catgirl',
    loc_txt = {
        name = "Catgirl",
        text = {
            "Scored {C:attention}3s{} have a {C:green}#3# in #1#{}",
            "chance to score {C:mult}+30{} Mult, and a",
            "{C:green}#3# in #2#{} chance to earn {C:money}$30{}"
        }
    },
    rarity = 2,
    discovered = true,
    cost = 8,
    blueprint_compat = true,
    eternal_compat = true,
    perishable_compat = true,
    pos = { x = 4, y = 1 },
    config = { extra = { multOdds = 3, munOdds = 9 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.multOdds, card.ability.extra.munOdds, (G.GAME.probabilities.normal or 1) } }
    end,
    
    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play then
            local multHit = 0
            local moneyHit = 0
            if (pseudoseed("catgirl") < G.GAME.probabilities.normal / card.ability.extra.multOdds) then
                multHit = 1
            end
            if (pseudoseed("catgirl") < G.GAME.probabilities.normal / card.ability.extra.munOdds) then
                moneyHit = 1
            end
            if context.other_card:get_id() == 3 then
                return {
                    mult = 30,
                    dollars = 30
                }
            end
        end
    end
}
rapid stag
graceful magnet
#

so

#

my code does work

#

but not for me

#

specifically

minor furnace
#

you guide others to the treasure you cannot possess

tepid crow
#

disable all other mods (including debugplus), verify your files through steam, and make sure you're editing the right file would be my first 3 suggestions

graceful magnet
stark geode
#

how the heck does the dynmic descriptions work