#💻・modding-dev

1 messages · Page 480 of 1

red flower
#

can i see the objecttype

quick scarab
# red flower can i see the objecttype

This?

SMODS.ConsumableType {
    key = 'fnaf_item',

    loc_txt = {
        collection = 'Item Cards', 
        name = 'Item',
        undiscovered = {
            name = 'Not Discovered',
            text = {
                "Purchase or use",
                "this card in an",
                "unseeded run to",
                "learn what it does"
            },
        },
    },

    default = "c_fnaf_pizza_maker",

    primary_colour = G.C.GREEN,
    secondary_colour = G.C.GREEN,
    collection_rows = { 5, 6 },

    shop_rate = 2
}```
red flower
#

hmm i dont see the problem sorry

quick scarab
#

A detail that might help is that I only have one "item"

karmic nest
#

anyone know why this isnt activating 100% of the time?

red flower
foggy ginkgo
#

How does one make unscored cards turn into a certain thing

karmic nest
#

change the number every time a hand is played

red flower
red flower
foggy ginkgo
#

When played, the unscored cards turn into steel

#

If that's what you meant

red flower
#

you can use context.individual and context.cardarea == 'unscored'

sonic cedar
red flower
#

yes

sonic cedar
#

i love documentation (i saw it right after asking)

red flower
red flower
sonic cedar
karmic nest
red flower
karmic nest
red flower
#

like print("hi")

karmic nest
#

on one of the if statements?

red flower
#

after the math.random

karmic nest
#

it prints hi

red flower
#

ok, if you set chosen to a specific number does it work?

quick scarab
# sonic cedar what's your consumable's code
SMODS.Consumable{
    key = 'pizza_maker', 
    set = 'fnaf_item', 
    atlas = 'TarotFnaf', 
    pos = {x = 4, y = 1},
    config = { max_highlighted = 2, mod_conv = 'm_fnaf_pizza' },
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue + 1] = G.P_CENTERS[card.ability.mod_conv]
        return { vars = { card.ability.max_highlighted, localize { type = 'name_text', set = 'Enhanced', key = card.ability.mod_conv } } }
    end,
}
red flower
karmic nest
red flower
vast night
#

Hi. needing some help with this:
It seems like it is trying to set the meta table for SMODS.GameObject in my overwritten 8 ball. any help?

    function SMODS.GameObject:__call(o)
        o = o or {}
        assert(o.mod == nil, "Created object should not have \"mod\" field defined.")
        o.mod = SMODS.current_mod
        o.original_mod = o.mod
        setmetatable(o, self)
        for _, v in ipairs(o.required_params or {}) do
            assert(not (o[v] == nil), ('Missing required parameter for %s declaration: %s'):format(o.set, v))
        end
        if o:check_duplicate_register() then return end
        -- also updates o.prefix_config
        SMODS.add_prefixes(self, o)
        if o:check_duplicate_key() then return end
        o:register()
        return o
    end
red flower
karmic nest
urban wasp
#

i haven't had any of my questions answered recently; it would be really helpful if somebody helped me on this 😭

pure salmon
#

jesus christ finally. i had to use context.ending_shop and add_to_deck() to update the debuffed suit because context.setting_blind is too late of a timing but it works. fuck this game and FUCK context.debuff_card

red flower
#

yeah i just dont touch debuffing much haha

vast night
#

you mean when changing config.lua?

red flower
pure salmon
#

thank you for the help though N i would not have been able to work out any of that on my own

urban wasp
quick scarab
#

oh that makes sense

karmic nest
vast night
red flower
karmic nest
#

got it

foggy ginkgo
red flower
vast night
red flower
#

thats not the syntax

vast night
#

hm

red flower
vast night
#

but

red flower
#

youre missing the take ownership part

vast night
#

💀

#

how did i miss this

#

sob

#

tf

unborn bay
pure salmon
#

manual debuffs are still annoying

#

and stil have tons of nonsensical behaviour

unborn bay
#

the humble SMODS.debuff_card:

red flower
#

i love smods debuff card

pure salmon
#

fuck debuffs don't like em fix your game thunk

gray quartz
foggy ginkgo
#

Is there in ipair for unscoring or am I tripping

urban wasp
red flower
vast night
#

lemme see

#

weird. does the tab show up at all. afaik nodes should be definition

urban wasp
#

shows up as config too

vestal magnet
#

can i change the text color on the mods badge

quick scarab
# red flower https://github.com/Steamodded/smods/wiki/SMODS.Consumable

wait hold up is it like this or

SMODS.ConsumableType {
    key = 'fnaf_item',

    loc_txt = {
        collection = 'Item Cards', 
        name = 'Item',
        undiscovered = {
            name = 'Not Discovered',
            text = {
                "Purchase or use",
                "this card in an",
                "unseeded run to",
                "learn what it does"
            },
        },
    },

    pools = {
         ["Consumable"] = true,
     },

    default = "c_fnaf_pizza_maker",

    primary_colour = G.C.GREEN,
    secondary_colour = G.C.GREEN,
    collection_rows = { 5, 6 },

    shop_rate = 2
}```
#

because it isnt working

urban wasp
red flower
vast night
harsh bobcat
#

how do I make it trigger at the end of a round?

#

joker

urban wasp
pure salmon
#

ok i think it's time to switch over to new probability. how do i convert this to the new format

vast night
#

like the definition of it

quick scarab
#

in the add_card event?

vast night
pure salmon
#

alright thanks

red flower
pure salmon
#

this will take a while

red flower
#

base isn't G.GAME.probabilities.normal btw

#

ive seen that mistake a couple of times

urban wasp
# vast night no just in `G.UIT.ROOT`

now everything is blank

-- config tab
local function cryptpostingConfigTab()
    local crp_nodes = {}

    -- http toggle
    crp_nodes[#crp_nodes + 1] = create_toggle({
        label = "HTTP Module",
        active_colour = G.C.DARK_EDITION,
        ref_table = cryptposting_config,
        ref_value = "HTTPS",
    })

    return {
        n = G.UIT.ROOT,
        config = {
            emboss = 0.05,
            minh = 6,
            r = 0.1,
            minw = 10,
            align = "cm",
            padding = 0.2,
            colour = G.C.BLACK,
        },
        definition = crp_nodes,
    }
end
vast night
vast night
#

nope its nodes

#

mb

#

it was prob smtn else

red flower
#

can you post it fully

vast night
urban wasp
#

alright then i'm back at it again

Bump, then bump again. Surely it'll make a splash if I just do it one more time.

vast night
#

idk why col = true

red flower
# vast night

oh ok it's the same reason

the game is still calling the original 8 ball function and it's checking card.ability.extra (where the odds are originally)

vast night
urban wasp
red flower
urban wasp
#

well okay what about this? why does this crash?

daring fern
urban wasp
#

oh right fuck i forgot that was already solved 😭

#

oopsie

#

okay well then yeah the config stuff is really the last thig i have to solve before pushing this commit

harsh bobcat
#

How can I make my joker trigger every round. So when I complete a split it does something.

#

so ig every split

daring fern
harsh bobcat
#

blind idk

daring fern
urban wasp
#

if you mean at end of round

urban wasp
daring fern
harsh bobcat
#

ok

vast night
urban wasp
#

let me find the code

daring fern
vast night
daring fern
#

context.retrigger never existed.

#

Also context.main_eval skips the checks for not context.individual and not context.repetition

red flower
urban wasp
#

this is a portion of the clockwork joker from cryptid that uses context.retrigger

context.before and context.cardarea == G.jokers and not context.blueprint and not context.retrigger then

this is a portion of scalae from cryptid that uses almost exactly what i just said

(context.end_of_round and not context.individual and not context.repetition and not context.blueprint)
urban wasp
vast night
red flower
foggy ginkgo
#

What's the "context.other:is_suit" for enchantments

daring fern
quick scarab
# red flower no, you only need that and what you had before
SMODS.Joker {
    key = "cassie",
    atlas = 'Joker',
    pos = { x = 5, y = 4 },
    blueprint_compat = true,
    rarity = 2,
    cost = 4,
    config = { extra = { odds = 3 } },
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue + 1] = {key = "fnaf_WIP", set = "Other"}
        return { vars = { G.GAME.probabilities.normal or 1, card.ability.extra.odds } }
    end,
    calculate = function(self, card, context)        
        if context.joker_main and #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
            if context.using_consumeable and not context.blueprint 
            and context.consumeable.ability.set == 'fnaf_item' and (pseudorandom('fnaf_cassie') < G.GAME.probabilities.normal / card.ability.extra.odds) then
                G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
                G.E_MANAGER:add_event(Event({
                    func = (function()
                        SMODS.add_card {
                            set = 'fnaf_item',
                            key_append = 'fnaf_cassie'
                        }
                        G.GAME.consumeable_buffer = 0
                        return true
                    end)
                }))
                return {
                    message = "+1 Item"
                }
            end
        end
    end,
}```

```lua
SMODS.ConsumableType {
    key = 'fnaf_item',

    loc_txt = {
        collection = 'Item Cards', 
        name = 'Item',
        undiscovered = {
            name = 'Not Discovered',
            text = {
                "Purchase or use",
                "this card in an",
                "unseeded run to",
                "learn what it does"
            },
        },
    },

    pools = {
         ['fnaf_item'] = true,
     },

    default = "c_fnaf_pizza_maker",

    primary_colour = G.C.GREEN,
    secondary_colour = G.C.GREEN,
    collection_rows = { 5, 6 },

    shop_rate = 2
}```
#

it still doesnt work

modern kindle
#

omg i saw smt hi smt

foggy ginkgo
#

The goat of this server/chat

modern kindle
#

there are so many goats in here

urban wasp
#

i'm likely just going to comment out my config at this point if i can't figure out why the config options aren't saving due to how important of a feature that is lol

foggy ginkgo
molten relic
#

what do i put in loc_vars if in config = { extra = { i have repetitions = 1, odds = 5?

daring fern
molten relic
#

so just return { vars = { card.ability.extra.repetitions, card.ability.extra.odds ?

#

how do i make a 1 in 5 probability to retrigger something

#

im looking at 8-ball in vremade and confused

daring fern
sonic cedar
#

do i have to increment the consumeable buffer with each usage of add_card before the reset, or does it only need the +1?

marsh scroll
#

how do you change a different card's enhancement through code?

sonic cedar
#

like is it

-buffer + 1
-consumable,
-message
-buffer + 1
-consumable,
-buffer 0
-message

or

-buffer + 1
-consumable,
-message
-consumable,
-buffer 0
-message

red flower
sonic cedar
#

got it thanks

hybrid shadow
#

which is the dollar function that does it immediately and which is the dollar function that happens at end of round

chrome widget
#

The ease_dollar function has a parameter to happen immediately

#

Otherwise it's queued as an event whenever it's called

#

Unless you mean the entire round eval UI

hybrid shadow
#

i just need dollars that happen during joker_main

daring fern
chrome widget
#

You'd just use ease_dollars or return dollars from a calculate function

daring fern
#

Or use SMODS.calculate_effect?

hybrid shadow
chrome widget
#

Also Something if you're gonna keep putting question marks on my suggestions without elaboration I'm probs gonna block you.

#

Either tell me what the issue is or don't interact with me

hybrid shadow
#

also i think you're right abt ease_dollars having a parameter to act immediately given thats how vanillaremade's wraith works

daring fern
chrome widget
#

Cool?????? And it's a single letter mistake that can easily be sorted out by the person I'm responding to. They won't have more trouble finding it

#

Regardless I wouldn't be annoyed by the correction if you just added onto it in reply rather than the vague suggestion that I was incorrect entirely

hybrid shadow
#

it isnt made exponentially more difficult to understand what theyre saying if theyre off by one letter

the error is easily caught by anyone who spends any amount of time looking through vremade or the smods documentation

#

a one letter difference doesnt do enough to warrant any reaction more than "small correction, there's an s at the end"

formal quest
#

How do I check if the player has a specified tag?

daring fern
copper thorn
#

Why isn't my inactive mult updating in the desc ? (yes the desc is in french ask is you need a translation)

#

in the game screenshot i already skipped a booster which is needed to make the Xmult gain X1

copper thorn
#

but it will start at 2 where it starts a X1 mult

#

it starts off a 1 and updates now thanks x)

#

:)*

viral ember
#

Is there a way to have a joker use 2 tiles for it's texture?

daring fern
#

You would have to create a new atlas.

viral ember
#

new atlas?

formal quest
daring fern
chrome widget
# viral ember Is there a way to have a joker use 2 tiles for it's texture?

You'd need to either do some fun shader stuff to accomplish this with a big atlas of the tiles and then the shader computing where on the atlas to draw from for which screen pixel to draw, or you could probably do something clunkier by creating a new child sprite where both the center and the new child contain one half of the sprite, whereas the other half is empty pixels

viral ember
#

I think I'll just make it visually wide

#

thanks tho!

chrome widget
#

What do you want to accomplish visually?

#

Like a half/half fusion thing?

viral ember
#

this is what it looks like right now.
It's only 1 tile but it's made wide with display_size

#

I just want it to use this 2 tile texture

#

but if that's not really accomplishable I'll just use the 1 tile

chrome widget
#

Ah I see

hybrid shadow
viral ember
#

How would I do that?

daring fern
viral ember
#

That worked thanks!

#

I'm also noticing that the stickers are rendered weirdly

chrome widget
#

Uhh yeah I've had this issue before with some cards. Basically, the stickers are drawn respective to the reference width of the card rather than specifically the center object, though I don't know the specific underlying reason why. I did a workaround to temporarily scale up the card to draw it where I wanted it, though the method I used would also stretch the image if it was done on something without the same aspect ratio

quick scarab
chrome widget
#

he's wide

#

you better leave the description wide too

modern kindle
#

how can i become wide

red flower
#

expand

modern kindle
#

can you expand me

chrome widget
#

eat food

red flower
#

i love eating food

chrome widget
#

in front of you is a plate of carbs and meat and fiber and vitamins

#

eat it

modern kindle
#

usually like once every 3 days

#

but still

red flower
#

i literally forgot to eat lunch today

#

this never happens to me

lament agate
#

how to add

#

discount

lament agate
red flower
#

i just ordered food as a treat :3

modern kindle
daring fern
lament agate
daring fern
lament agate
wooden nexus
viral ember
#

?

sturdy compass
#

Not too sure why this one is crashing . Any JokerDisplay wizards in chat?

#

I'm getting the same crash for any card using a colour field in a text_config table

modern kindle
#

wheres mr display himself at

sturdy compass
#

Probably joyousing his spring

formal quest
#

Why do I get this error?

bold sleet
#

edition = 'e_negative'

#

capitalization™

bold sleet
#

or if the crash reason changes

formal quest
bold sleet
#

i am so smart
-# lie lol

red flower
red flower
bold sleet
#

amazing emoji

sturdy compass
#

isn't it? lmao

red flower
sturdy compass
#

I was gonna do that ngl but the external file seemed less daunting

modern kindle
red flower
sturdy compass
#

Alright finally done debugging all of my Jokers. My last problem now is that my Horoscope cards aren't showing their displays despite the hook

red flower
#

i think you need the dev version

#

not sure when i added it

sturdy compass
#

Whatever it'll probably work fine when you push it to release

red flower
sturdy compass
#

that'll do it

modern kindle
red flower
#

no you couldn't

modern kindle
#

ill be there at 7 tomorrow

sturdy compass
#

Maximus 1.1 will officially have JokerDisplay support 🎊

modern kindle
#

I want to start giving display support but that has to wait for me to finish talisman and lack thereof compat
Sometimes shit dont work with talisman and sometimes it dont work without

sonic cedar
#

finally I_CAN_FINALLY

modern kindle
sonic cedar
#

there arent any more that's it

#

tell localthunk to do it

modern kindle
#

I literally just said more smh

#

Make some

#

Then add them

sonic cedar
#

HELLLL NO
this version already taking long enough 😭

modern kindle
#

Smh my head

faint yacht
#

Gonna leave this here too for the time being-

sonic cedar
#

time to test all 30 KyaruThumbsUp

hasty mist
#

yall what could this possibly do

red flower
#

it checks if the table contains a value

hasty mist
#

i see

#

i dont seem to be using it anywhere

sonic cedar
# faint yacht

you could combine both of them into one and make that the challenge

red flower
faint yacht
sonic cedar
#

i mean it could still be fun

#

maybe...

vague crest
#

i think im just being silly here but i cant seem to figure out how to actually make the function trigger

#

im trying to make it a global thing since before it would always start the hand at high card when you pick up the joker, when i wanted it to start as the last hand you played

#

but im a little lost on how to actually accomplish this laugheline

#

its also crashing when i hover over the joker now i guess thats the bigger issue

jaunty viper
#

Guys, how do I make the Joker's soul legendary?

#

the soul effect

faint yacht
faint yacht
wispy sparrow
faint yacht
#

You don't need to have a Joker be Legendary for it to have a floating Soul sprite.

wispy sparrow
faint yacht
#

ye.

wispy sparrow
#

right, sorry for the confusion

median veldt
#

oh yeah

vague crest
# vague crest

better question actually because i realized i was approaching this fully the wrong way, if i wanted a calculate function outside of a joker, what would i replace self and card with in the function?

median veldt
#

bump

daring fern
#

You would hook SMODS.calculate_context

jaunty viper
vague crest
#

whats the process for that?

red flower
daring fern
# vague crest whats the process for that?
local smodsoldcalccontext = SMODS.calculate_context
function SMODS.calculate_context(context, return_table)
    local g = smodsoldcalccontext(context, return_table)
    if context.after then
        -- do things
    end
    return g
end
vague crest
#

tysm !!

#

oh wait i see what this is doing thats neat

hasty mist
#

what variable stores the current blind requirement

median veldt
red flower
red flower
median veldt
#

ah

hasty mist
red flower
median veldt
#

wait so how does it actually debuff a hand

modern kindle
#

G.game.chips

#

Yea n got it

hasty mist
#

ah

red flower
median veldt
#

i'm trying to debuff the hand that gets picked so that it's not allowed to be played

red flower
# hasty mist ah

keep in mind that if you want to edit it you also need to do G.GAME.blind.chip_text = number_format(G.GAME.blind.chips)

red flower
hasty mist
#

no im just checking the current score in relation to the blind requirement

red flower
median veldt
#

Oh

#

does this work for a joker?

red flower
#

yes

median veldt
#

just return debuff = true

#

ok

vague crest
#

one last thing, im trying to add a fallback here in the localization so if the hand isnt chosen yet (happens if youre looking at the collection in the menu) it still displays, but ive tried like 5 different things and its being weird

red flower
#

you can also return debuff_text to set the text in the middle of the screen

median veldt
#

will it make the joker wiggle

#

if not how do i do that i dont remember

red flower
#

i think so

#

card:juice_up()

median veldt
#

i love that

red flower
median veldt
#

waaait what context should i put the debuff in

red flower
#

context.debuff_hand

#

it's a separate context

vague crest
median veldt
#

or something?

red flower
#

yes

#

it also checks every time you click on a card

median veldt
#

so like

old epoch
#

I'm trying to have my enhancement show the image, but it just shows red deck. What would i do to fix this?

-- Astral
SMODS.Atlas{
    key = 'astral',
    path = 'AstralEnhance.png',
    px = 71,
    py = 95
}
SMODS.Enhancement {
    key = 'astral',
    pos = { x = 0, y = 0 },
}
median veldt
#

no wait

hasty mist
#

why is it doing that? i'm not trying to edit any of the values, i'm just trying to check for them

median veldt
#

without the .name i think

daring fern
hasty mist
#

oh i see

#

whoops

old epoch
median veldt
#

so will this only play the message and upgrade if i actually PLAY the debuffed hand

red flower
#

it will play it every time you select a card haha

median veldt
#

Oh

red flower
#

there's a check for when playing

median veldt
#

what's that

red flower
#

let me look it up

red flower
median veldt
#

so like

#

or do i do if context.debuff_hand and not context.check
like the old code but with that added

hasty mist
#

hm

#

cryptid's scale mod function isnt working

median veldt
#

ah ok

pure salmon
#

how do i stop the first part of this calculate function from triggering at the end of the round?

red flower
#

maybe you can check if the chips are higher than the requirements?

#

not sure

median veldt
#

what's the difference between these two

#

why are they different with the pseudorandom_element

vague crest
# median veldt so like

does this properly debuff the hand for you? i have a joker that id like to debuff 3 specific hands in a similar manner to how boss blinds do it but im not actually sure how to make them not score

#

ive just been setting the score to 0 😭 which doesnt really accomplish the same thing since you can still make money and stuff

red flower
median veldt
#

what's with the false_to_do

#

and the whole card.area stuff

#

that's not there in the end of round one

red flower
#

when the joker is in the collection it uses a different seed

#

so it doesn't affect gameplay

median veldt
#

ah

median veldt
red flower
median veldt
#

latest i believe

vague crest
#

ohhh do i need 6 minutes ago smods

#

lemme try i think its been a bit since i updated

median veldt
#

1.0.0~BETA-0614a-STEAMODDED

red flower
#

hmmm did i push that change to main

#

oops

median veldt
#

whats the issue

red flower
#

that's a feature of the next version

#

i think

median veldt
#

ah.

red flower
#

you need to change it to v.visible

median veldt
#

?

faint yacht
modern kindle
#

Is it truly a good challenge if you can win

red flower
median veldt
#

like that?

red flower
#

no, can i see a bit more to see how you named the variables

median veldt
#

straight from vremade

#

oh im guessing its the _

red flower
#

yes

#

v.visible without the (handname)

#

or whatever you name _

median veldt
#

Oh

vague crest
red flower
median veldt
#

it. didn't debuff the hand for me either

vague crest
red flower
#

maybe it's bugged haha

median veldt
vague crest
#

theres stuff under it but its just returning xmult

median veldt
#

my debuff just scored as usual and didn't upgrade or anything

vague crest
#

i remember trying to get it to work earlier but i didnt actually understand how the blind code worked and it crashed first try so i just gave up LOL

pure salmon
#

i want a joker that halves the cashout money somehow

#

how would i go about that

red flower
#

oh wait i see what's wrong with both

#

@vague crest @median veldt change scoring_hand for scoring_name

vague crest
#

👍

#

ohhhhh my PEAK it works and it tells you properly too

#

thank you SO much you are a godsend

covert merlin
#

so i managed to code a joker that "ends" a boss blind when selecting it

      return{
        G.GAME.blind:defeat(),
        message = 'Ended!',
        colour = G.C.FILTER,
        card = card,
      }
    end```
and this just happens
(sends me to the cash out screen when i play a hand..)
faint yacht
#

Maybe you'd want to move that to context.first_hand_drawn? And move the G.GAME.blind:defeat() outside the return or put it as

func = function()
  G.GAME.blind:defeat()
end

in said return...

red flower
#

first hand drawn is too early still i think

#

let me check if i have the code for this

faint yacht
#

...I have a Boss Blind that auto-plays the first drawn hand in its' entirety.

#

So, may not be too early...

median veldt
#

is there a way to quick reload localisation

faint yacht
#

-# Oh yeah, the need to set those too--

median veldt
#

do u think this formatting is off in any way

covert merlin
covert merlin
#

or does it have to contain a straight?

median veldt
#

is

#

it has to be whatever the hand is

covert merlin
#

o alr

median veldt
#

it changes

covert merlin
#

wording is good then

median veldt
#

its not the wording im very good at seeing how base game jokers word things

#

i mean the actual placement of the words

#

since lines are manual

#

also does G.GAME.hands include modded hands

median veldt
#

sweet

median veldt
toxic flicker
#

how do i detect when a card is destroyed like canio bro

#

i dont get it

toxic flicker
#

THIS IS HUGE WTF

#

i love you

red flower
#

:3

toxic flicker
#

:3

toxic flicker
#

hell yeah

sonic cedar
#

I HATE THE FLINTTTTT

#

WHY

toxic flicker
#

O_o

vague crest
#

i have a contraption that puts all cards held in hand into an array, and im wondering how id check for a two pair out of these values

#

i realized this is a much harder thing to check for than i had in my head 😭

toxic flicker
#

there's gotta be an easier way tho

vague crest
#

wait that sounds super doable actually

toxic flicker
#

:3

vague crest
#

i dont remember how to actually sort it but

toxic flicker
#

lol same

#

copy paste someone's algorithm or something

#

maybe lua has one built in

red flower
#

there's a table sort

#

there's also a function to evaluate poker hands in the game

#

you can use that to check for all the contained two pairs

vague crest
#

oh?

toxic flicker
#

lol there's the easier way

red flower
#

check what burnt joker does with the discards

#

but do it with G.hand.cards

#

the funtion returns something like text, scoring_hand, poker_hands

vague crest
#

like so?

scarlet imp
vague crest
#

ohhh wait it works it just doesnt work if something higher ranking is there currently

#

how would i change it to work with higher ranking hands still?

red flower
vague crest
#

would that mean im just looking for the scoring_hand part instead?

red flower
#

no, the poker_hands

faint yacht
vague crest
#

will check this out EEEEEEEE

pure salmon
#

why does this tally also increase on repetiton or blueprinting

daring fern
pure salmon
#

repetition as in retriggering cards

#

ok blueprint works

red flower
#

i think it's not context.repetition_only? something like that

pure salmon
#

never heard of that context in my life but i trust the process

vague crest
#

got it working! the issue was straight up just i didnt understand what the _, was for

red flower
#

damn

pure salmon
#

i want the counter to increase only when you score a card for the first time

red flower
#

is there a reason you don't do it in context.before

pure salmon
#

do what in context.before

red flower
#

increasing the counter

pure salmon
#

i want the cards to give +mult as they're scored ideally

red flower
#

you can... do both

dense ginkgo
#

I'm trying to make this joker activate when a two pair is played but it activates whenever the hand includes a two pair like full house. Is there anyone who knows how to fix this?

SMODS.Atlas{
    key = 'TWOPAIR',
    path = 'TWOPAIR.png',
    px = 71,
    py = 95
}
SMODS.Joker{
    key = 'TWOPAIR',
    loc_txt = {
        name = 'TWO PAIR!!!',
        text = {
            'Gain {C:money}$2{} if poker hand is a {C:attention}Two Pair{}.'
        }
    },
    atlas = 'TWOPAIR',
    pools = {["Batrocities"] = true},

    rarity = 2,
    cost = 6,
    pos = {x=0, y=0},
    unlocked = true,
    discovered = false,
    blueprint_compat = true,
    eternal_compat = true,
    perishable_compat = true,

    config = { extra = { dollars = 2, type = 'Two Pair' } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.dollars, localize(card.ability.extra.type, 'poker_hands') } }
    end,
    calculate = function(self, card, context)
        if context.joker_main and next(context.poker_hands[card.ability.extra.type]) then
            return {
                dollars = card.ability.extra.dollars
            }
        end
    end
}
pure salmon
#

alright i'll recode the whole effect tomorrow

#

i have a better idea

#

as in, to make this effect work

red flower
sonic cedar
#

update: i have given the event for specifically the flint, on specifically the hierophant, exactly one frame of delay

will this fix the crash? probably, since the issue was that hierophant didn't exist yet

on specifically the flint

i hate the flint

red flower
#

what was the issue?

sonic cedar
#

didnt exist in the tarot pool yet

#

or wasnt initialized rather

red flower
#

are you running something before balatro exists

sonic cedar
#

-# at least according to the print check

sonic cedar
red flower
#

no but it's funny

sonic cedar
#

true i laughed

red flower
#

anyway, good night

sonic cedar
#

WHAT MORE DO YOU WANT

sonic cedar
modern kindle
sonic cedar
#

....so what if i give it 2 frames

red flower
#

what's the full code for that

sonic cedar
#

for the event?

#

ill grab it

red flower
#

where is this event

#

also i think i know what the problem is lol

sonic cedar
#

in an "is this blind the flint" else conditional

red flower
#

c_heirophant

sonic cedar
#

No.

#

I refuse.

red flower
#

im sorry

sonic cedar
#

THUNK

vague crest
#

valid crashout

sonic cedar
#

if this works

sonic cedar
#

god

damnit

red flower
#

F

sonic cedar
#

no matter how solid your code
it's powerless against thunkcoding

#

you know what's worse
i had went earlier "oh i spelled hierophant wrong in the key whoops"

#

i dont even know if this is credit worthy outside of the one thunk already has

#

but thanks n

scarlet imp
#

or Canio

sonic cedar
sonic cedar
scarlet imp
#

SMODS.Joker:take_ownership("caino",

#

the Vanilla key is misspelled

#

SMODS.Joker:take_ownership("selzer",

#

same with Seltzer

sonic cedar
sonic cedar
#

im gonna lose it

stiff quiver
#

how can i check the price of a reroll?

scarlet imp
#

can I call a Joker's calculate function from anywhere, provided it exists?

daring fern
stiff quiver
#

thanks something

stiff quiver
scarlet imp
stiff quiver
#

i have this and its still adding reroll cost even with that ```lua
if context.reroll_shop then
card.ability.extra.current = card.ability.extra.current + G.GAME.current_round.reroll_cost
end

stiff quiver
daring fern
stiff quiver
#

like this? ```lua
if context.reroll_shop and calculate_reroll_cost(true) then

daring fern
#
if context.reroll_shop then
    calculate_reroll_cost(true)
    card.ability.extra.current = card.ability.extra.current + G.GAME.current_round.reroll_cost
end
stiff quiver
#

oh just that, no i havent, i'll try that

#

so that works for the first free reroll, if there's two the second one is adding 5, and the next one is adding 6 eventhough it costs 5

vague crest
#

attempting to add a glass card when a diamond card is destroyed, but it gets stuck here for some reason?

#

using pretty much the same code as marble joker

#

can send code anyways though

#

this is effectively a softlock if that narrows anything down, cant select discard or play hand

daring fern
scarlet imp
#

use SMODS.create_card, its typically a bit more reliable at creating the intended behavior in my experience

vague crest
#

oh gotcha, i was just using what vremade did

scarlet imp
#

I would always recommend at least reading over the code of Vremade, since sometimes it can be a bit funky. I had to take ownership of all the Vanilla Jokers recently and sometimes Vremade let me down

daring fern
vague crest
#

oh yeah its this on my end

#

guess i gotta update it

scarlet imp
#
calculate = function(self, card, context)
  if context.setting_blind then
      local _hands = card.ability.extra.h_plays * math.floor(((G.GAME.dollars or 0) + (G.GAME.dollar_buffer or 0)) / card.ability.extra.dollars)
      G.E_MANAGER:add_event(Event({
          func = function()
              ease_hands_played(_hands)
              SMODS.calculate_effect({
                  message = localize({
                      type = "variable",
                      key = "a_hands",
                      vars = { _hands }
                  })
                  }, context.blueprint_card or card)
              return true
          end
      }))
      return nil, true
  end
end

I'm guessing this visual bug has something to do with context.blueprint_card or card but I'm not sure how to fix it. Any suggestions?

daring fern
scarlet imp
#

return what

#

the function?

daring fern
scarlet imp
#
G.E_MANAGER:add_event(Event({
  func = function()
    ease_hands_played(_hands)
    return SMODS.calculate_effect(<args>)
  end
}))

like this?

daring fern
#

Also outside of the event.

#

And do ```lua
func = function()
G.E_MANAGER:add_event(Event({
func = function()
ease_hands_played(_hands)
end
}))
end

scarlet imp
#

softlocks the game

#
calculate = function(self, card, context)
  if context.setting_blind then
      local _hands = card.ability.extra.h_plays * math.floor(((G.GAME.dollars or 0) + (G.GAME.dollar_buffer or 0)) / card.ability.extra.dollars)
      G.E_MANAGER:add_event(Event({
          func = function()
              ease_hands_played(_hands)
          end
      }))
      return {
          message = localize({
              type = "variable",
              key = "a_hands",
              vars = { _hands }
          })
      }
  end
end
vague crest
daring fern
daring fern
vague crest
#

i guess not explicitly? i feel like its a pretty good thing to have for player feel though

#

since the suit and rank are random so its more relevant to see it

scarlet imp
# daring fern You mean freezes?

when setting the blind, the game softlocks, as in it still runs but the player cannot do anything. None of the cards or UI appears as it should when selecting a blind

daring fern
daring fern
vague crest
#

oh huuge

#

i guess i could just go the same route as the one i did with panic button

scarlet imp
#

happens even with trigger = "immediate" for the record

scarlet imp
# daring fern Yes, https://discord.com/channels/1116389027176787968/1233186615086813277/139274...
calculate = function(self, card, context)
  if context.setting_blind then
      local _hands = card.ability.extra.h_plays * math.floor(((G.GAME.dollars or 0) + (G.GAME.dollar_buffer or 0)) / card.ability.extra.dollars)
      return {
          SMODS.calculate_effect({
              message = localize({
                  type = "variable",
                  key = "a_hands",
                  vars = { _hands }
              })
          }, context.blueprint_card or card),
          func = function()
              G.E_MANAGER:add_event(Event({
                  func = function()
                      ease_hands_played(_hands)
                      return true
                  end
              }))
          end
      }
  end
end

changed to this, as I'm assuming you meant have all of this stuff in the return for calculate. Visual bug still occurs

daring fern
scarlet imp
#

you're saying just return message?

daring fern
# scarlet imp you're saying just return `message`?
if context.setting_blind then
    local _hands = card.ability.extra.h_plays * math.floor(((G.GAME.dollars or 0) + (G.GAME.dollar_buffer or 0)) / card.ability.extra.dollars)
    return {
        message = localize({
            type = "variable",
            key = "a_hands",
            vars = { _hands }
        }),
        func = function()
            G.E_MANAGER:add_event(Event({
                func = function()
                    ease_hands_played(_hands)
                    return true
                end
            }))
        end
    }
end
scarlet imp
#

same thing happens

daring fern
# scarlet imp same thing happens
if context.setting_blind then
    local _hands = card.ability.extra.h_plays * math.floor(((G.GAME.dollars or 0) + (G.GAME.dollar_buffer or 0)) / card.ability.extra.dollars)
    return {
        message = localize({
            type = "variable",
            key = "a_hands",
            vars = { _hands }
        }),
        func = function()
            G.E_MANAGER:add_event(Event({
                func = function()
                    ease_hands_played(_hands, true)
                    return true
                end
            }))
        end
    }
end
scarlet imp
#

alright that fixed it

#

I forgot that method took multiple arguments

lament agate
#

whats the context of entering shop

#

and defeating a boss blind

scarlet imp
vague crest
#

ok i might be stupid but is this the wrong way to do an else if

scarlet imp
#

elseif one word

vague crest
#

ohhh ty my goat

scarlet imp
#

also suggestion

#

do card.ability.extra.suitcolor = G.C.SUITS[znm_card_to_destroy_suit]

lament agate
#

is this the right variable for playing a sound?

vague crest
#

oh does that just work

lament agate
#

or is it play_sound

scarlet imp
#

as long as that variable is not nil, it should work

vague crest
#

also is there a specific way i need to define the color as a variable?

scarlet imp
vague crest
#

yeah

daring fern
scarlet imp
#

loc_vars always expects this format:

return {
  vars = {
    <stuff>,
    colours = {
      <colours>
    }
  }
}
daring fern
scarlet imp
#

for its return at least

vague crest
#

hm ok

daring fern
vague crest
#

could i jsut do this directly?

lament agate
daring fern
lament agate
#

it kinda icks me that VSC put yellow line over it

scarlet imp
#

try this

unborn bay
lucid owl
#

how do you make a line of text only appear based on a variable...

#

in a card desc

scarlet imp
#

you know how usually numbers are dependent on the config of a card? just do that but for text, works the same way

daring fern
scarlet imp
#
return {
    vars = {
        card.ability.special.supernova_Xmult.."X ",
        colours = {
            G.C.RED
        }
    }
}

this works for example, with line 3 being a string that gets passed to the description of the card

lament agate
#

@daring fern @unborn bay thanks guys

#

oh jesus

unborn bay
#

for that you can extract the balatro exe into a folder and add that as a workplace

#

not everything is dumped, after all

lament agate
#

hmm

unborn bay
#

whats with the question marks mr some of the thing of the dot of the com

scarlet imp
#

that's just his thing

#

Exhibit 13411531:

lament agate
#

thats his thing

#

its like stockfish

glass scaffold
lament agate
#

he's our stockfish of our modding

daring fern
glass scaffold
unborn bay
#

but not everything 😭

#

like the events

#

the most complete source tree is found when you directly extract the source out of the executable

unborn bay
# lament agate oh jesus

and is important if you're a stickler like me and doesn't want errors like these thrown everywhere

umbral zodiac
#

simply make a useless lovely patch in every single file and then the lovely dumps will probably contain everything right

shell timber
#

to solve this, make a patch which adds a newline to every source file

#

so true lily

umbral zodiac
#

i win

shell timber
umbral zodiac
#

wait why am i competing we should make peace

shell timber
#

so true lily

umbral zodiac
lament agate
#

im decompiling it

umbral zodiac
#

also very Ppurplre discord

lament agate
#

and by it i mean

shell timber
#

yes purple is a good colour

glass scaffold
umbral zodiac
glass scaffold
umbral zodiac
#

there is no joker

scarlet imp
shell timber
#

the real solution is to not use lsp

glass scaffold
umbral zodiac
glass scaffold
umbral zodiac
#

36,444 warnings 🔥

scarlet imp
umbral zodiac
#

warn me a little more wont you

scarlet imp
#

your IDE must HATE you

umbral zodiac
#

i have to restart emmylua pretty often because it just gives up with syntax highlighting and it bothers me

scarlet imp
#

"she doesn't bother with all the warnings, I'm just not gonna try anymore"

vague crest
umbral zodiac
#

well it runs

scarlet imp
vague crest
#

ohhh wait maybe

scarlet imp
#

yeah mb

vague crest
#

still returning orange 💔

scarlet imp
#

you have a variable znm_card_to_destroy_suit you were using before, maybe you could try that

foggy ginkgo
#

How do you when played, turn cards held in hand into an enchantment

vague crest
#

oh wait lowkey i never realized this in my previous code but i meant to put .suit there LOL

daring fern
foggy ginkgo
#

Enchancement

scarlet imp
#

if nothing else, your previous solution should work, simply using conditional statements to assign the color directly

foggy ginkgo
#

When played last hand all cards held in hand turns into steel

daring fern
# foggy ginkgo Enchancement
if context.before and context.cardarea == G.play then
    for k, v in pairs(G.hand.cards) do
        v:set_ability("m_steel")
    end
end
foggy ginkgo
#

It's not working

lament agate
#

whats the context for exiting a shop

foggy ginkgo
#

Hai Nxkoo

scarlet imp
#

context.ending_shop i thinnk is what Perkeo uses

daring fern
foggy ginkgo
#

Nvm I got it

lament agate
#

whats the context for buying a joker?

daring fern
lament agate
#

also @unborn bay @daring fern how do you fix this

daring fern
daring fern
lament agate
#

thanks

#

for the last time

#

whats the context for selling cards, skipping blinds, and rerolling

daring fern
crimson dune
#

What the hell is this juice_up bug?

The issue appears to be within the actual code of the game itself and all I'm doing is having it return money when a 10 or 7 is scored. Do I have to manually create another juice_up function even though it literally exists inside the code?

#

And as far as I know, this issue is unresolved cause from what I looked at, a similar issue #💻・modding-dev message has not been resolved

manic rune
#

and also, dont use self in your calculate code

crimson dune
#

oh I see

manic rune
#

are you taking reference from source code?

crimson dune
#

I think at the time yes, and it has slipped under the radar until now because I was using talisman as a dependency until recently

foggy ginkgo
#

Is there a way to stop triggering from happening

daring fern
#

Would there be a way get the source code of a function?

daring fern
frigid cargo
#

can someone name me all the scoring names please?

foggy ginkgo
daring fern
median veldt
frigid cargo
median veldt
#

here it is for shorter and longer hand names

median veldt
#

also what do you mean "get" the source code
like from a mod? or just so you can look at it

median veldt
#

hm,

#

i'm not. sure

#

why so?

daring fern
# median veldt why so?

I need to obtain the ifs of calculate functions to perhaps improve my quantum items to only call them when the conditions are true.

median veldt
#

lovely patches? maybe?

daring fern
median veldt
#

I'm confused

daring fern
#

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

median veldt
#

ohh like get the source code of a function from a mod

#

uuhm i actually still don't know if that's possible

daring fern
median veldt
#

unrelated I also have a question: is there a way to upgrade a joker whenever a probability fails? like is there a context for that or smth

daring fern
median veldt
#

how would I do that, and can I wrap the joker definition in an if statement to only make the joker if you're using the dev version

median veldt
#

i forgot about that

#

what about the second question

daring fern
median veldt
#

oh mb i should've asked how

#

is there like
a number i can check or something

daring fern
median veldt
#

cool that worked

#

thnx

#

uhrm would I be able to make it so it's only jokers with probabilities that trigger it

#

it's not imperative that was just the original idea for the joker that I'm making for someone

#

i can modify it

frigid cargo
#
ease_background_colour = function(self)
        ease_background_colour(HEX("d9c032"))
    end,

is this the proper code for background on booster packs?

median veldt
#

is this formatting ok?

#

and also do you think this is uncommon
or would it be uncommon if i made it only jokers specifically that trigger it

tall wharf
#

formatting is subjective i think

median veldt
#

i like it to feel vanilla

daring fern
#

What part of SMODS makes it so the sources of things are formatted as "=[SMODS "..mod.id..' "'..path..'"]'?

frigid cargo
#
    create_card = function(self, card, i)
        ease_background_colour(HEX("d9c032"))
        return SMODS.create_card({
            set = "Batrocities",
            area = G.pack_cards,
            skip_materialize = true,
            soulable = false,
        })
    end,
    select_card = 'jokers',

    in_pool = function() return true end

why does my game crash whenever i open the booster pack? its fine with the shape pack but not for this, its just a different set?

daring fern
median veldt
# daring fern Yes.

how do I exclude playing cards from it, I'm not sure how this new context works

unborn bay
#

check for their "set"

median veldt
unborn bay
#

card.ability.set

median veldt
#

Ah

#

wait what

daring fern
unborn bay
#

oh yeah playing_card exists too

#

i keep forgetting that exists

lament agate
#

how do you level up all hands

manic rune
lament agate
daring fern
manic rune
#

loud_incorrect_buzzer.mp3

#

but even if thats the case, you can just, yk

lament agate
#

fair

manic rune
#

nxkoo DEAD today

marsh scroll
#
if pseudorandom('group_0_bc8df58d') < G.GAME.probabilities.normal / card.ability.extra.odds then
    
    for i, v in ipairs(context.scoring_hand) do
        if v == card and context.scoring_hand[i+1] then
            context.scoring_hand[i+1]:set_ability(self)
        end
    end
end

I have this code in a main scoring context for an enhancement, it works but all of it happens instantly, how do I make the enhancement propagate when each card is scored

manic rune
#

i have no clue what context.scoring_hand[i+1] is for

#

oh

#

nevermind

marsh scroll
#

right

lament agate
pastel kernel
#

How do you apply a value cap? (For example, Max Spectral Cards Spawned = 25)

vestal magnet
#

i'm making a seal that has 1 in 2 chance of retriggering the card but if the card retriggers it has another 1 in 2 chance of retriggering and so on. any ides on how to code the seal retriggering in

manic rune
rare phoenix
#

uhhhh so what context would i use for when a specific joker is added

#

i assume it's something with card_added but idk

pastel kernel
#

How do I put a cap?

#

So it does not crash

#

Maybe like 10.

daring fern
rare phoenix
manic rune
#

:(

manic rune
manic rune
pastel kernel
manic rune
#

no, math.max

unborn bay
#

bepis.

manic rune
#

🤔

#

wat no fuck i wait no

#

math.min, yeah

#

god i think coding ui for 3-4 hours straight is affecting half of my brain

unborn bay
#

math.min is for the smallest value of the two

#

math.max is the largest

manic rune
#

yeah i know 😭

unborn bay
#

bepis has become STUPID after ui brainrot

manic rune
#

im sorry

pastel kernel
#

can i just share my calc snippet?

#

Hello?

manic rune
#

sure

pastel kernel
#

here


calculate = function(self, card, context)
    if context.pre_discard and not context.blueprint then
        local total_created = 0
        G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + card.ability.extra.cards_per_discard
        for _ = 1, card.ability.extra.cards_per_discard do
            local g = pseudorandom_element(G.P_CENTER_POOLS.Spectral, pseudoseed('minos')).key
            local spectral_card = SMODS.add_card({key = g, area = G.consumeables, edition = "e_negative", key_append = "minos"})
            if spectral_card then
                total_created = total_created + 1
            end
        end
        G.GAME.consumeable_buffer = G.GAME.consumeable_buffer - total_created
        if total_created > 0 then
            card.ability.extra.xmult = card.ability.extra.xmult + total_created * card.ability.extra.xmult_mod
            G.E_MANAGER:add_event(Event({
                func = function()
                    card:juice_up(0.3, 0.5)
                    return true
                end
            }))
            return {
                message = localize("k_upgrade_ex"),
                colour = G.C.MULT,
                sound = "minos_die",
                card = card
            }
        end
    end
    if context.joker_main then
        if to_big(card.ability.extra.xmult) > to_big(1) then
            return {
                message = localize({
                    type = "variable",
                    key = "a_xmult",
                    vars = { number_format(card.ability.extra.xmult) }
                }),
                Xmult_mod = to_big(card.ability.extra.xmult),
                sound = "minos_judgement",
                colour = G.C.MULT,
                card = card
            }
        end
    end
end
rare phoenix
#

so uhhh im almost certain im not doing this right

#
    context.card.config.center.key = "rylen",
    cardarea = G.jokers,
    card_added = true,
    card = "rylen",
    if card.ability.extra.round < card.ability.extra.maxround and card.ability.eternal ~= true then
        card.ability.eternal = true
    end
end```
#

can yall help pwease

daring fern
floral narwhal
#

it does nothing when troops are not equal

#

needs mod prefix?

pastel kernel
#

hello?

daring fern
floral narwhal
#

instead

daring fern
daring fern
floral narwhal
daring fern
lament agate
#

is

G.GAME.blind:defeat()

a thing

lament agate
#

what do i use for a joker that wins a blind

daring fern
floral narwhal
#

it's new mechanic goal is find troop (value in config of enhancements) then find the least troop then destroy that

pastel kernel
#

I’m ass at suggestions, I’ll let everyone else do the talking

pastel kernel
#

Oh wow, the limiter actually works

#

Thanks

daring fern
lament agate
lament agate
# daring fern Code?
config = { extra = {} },
    loc_vars = function(self, info_queue, card)
        return { vars = { "High Card", "50%" } }
    end,
    calculate = function(self, card, context)
        if context.joker_main and context.repetition and next(context.poker_hands['High Card']) then
            local retriggers = 0
            local highest_rank = 0
            
            for _, playing_card in ipairs(context.scoring_hand) do
                local rank = playing_card:get_id()
                if rank > highest_rank then
                    highest_rank = rank
                end
            end
            
            if highest_rank >= 11 and highest_rank <= 14 then
                retriggers = 10
            elseif highest_rank <= 10 then
                retriggers = highest_rank
            end
            
            if pseudorandom('DOMINATED') < 0.5 then
                G.E_MANAGER:add_event(Event({
                    func = function()
                        play_sound('tngt_neverforget', 1.2)
                        G.GAME.chips = G.GAME.blind.chips
                        G.STATE = G.STATES.HAND_PLAYED
                        G.STATE_COMPLETE = true
                        end_round()
                        return true
                    end
                }))
                return {
                    message = "DOMINATED, CYCLOPS.",
                    colour = G.C.GOLD,
                    card = card
                }
            end
            
            if retriggers > 0 then
                return {
                    repetitions = retriggers,
                    message = localize{type='variable', key='a_repetitions', vars={retriggers}},
                    card = card
                }
            end
        end
    end
}
daring fern
daring fern
# lament agate oh shit

Try setting some config variables to true when you would do it and instead do it in context.after

unborn bay
#

yeah you shouldn't really mess with state stuff during joker calc

lament agate
#

got it

unborn bay
#

joker_main and after don't run at the same time lmao

#

what you do is set a variable to true when the condition you set in joker_main is true

#

then reference that with context.after

#
if context.joker_main then
    -- .. condition stuff here
    card.ability.extra.yeah = true
end
if context.after and card.ability.extra.yeah then
    -- do stuff
    card.ability.extra.yeah = false
end
daring fern
# lament agate like this?

Also in context.after you would just do G.GAME.chips = G.GAME.blind.chips elsewise the round will end twice I think.

floral narwhal
lament agate
daring fern
lament agate
#

im so confused

#

let me a take a break rq

#

ill figure this out

daring fern
rare phoenix
zealous peak
#

Can someone help me if this code is correct?

#

--- STEAMODDED HEADER
--- MOD_NAME: Zvs Joker
--- MOD_ID: ZVSJOKER
--- MOD_AUTHOR: Zvstheworld207
--- MOD_DESCRIPTION: Zvs's joker he made for fun!
--- PREFIX: xmpl

------------MOD CODE -------------------------

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

SMODS.Joker{
key = "joker2",
loc_txt = {
name = 'Zvs Joker',
text = {
'When Blind is selected,',
'this Joker gets X mult.',
}
},
atlas = 'Jokers',
pos = {x = 0, y = 0}
}


------------MOD CODE END----------------------

#

It doesn't appear in game

#

I don't have any real functions done, this is just so it shows.

#

It says SMODS is undefined

#

I'm using a tutorial, but it works there

dreamy thunder
bold sleet
#

For starters I'd suggest you use the updated metadata.

#

That should help you.

zealous peak
#

Ok

bold sleet
#

If you are still having trouble after that, do ask

zealous peak
#

what should I put as the prefix?

#

does it have to be some coding thing

#

or is it just like an ID for my mod

bold sleet
#

Prefix is like, the thing SMODS will add to most of your stuff.

#

If you were to make a joker, for example, the key would look like this: j_[prefix]_[key] where prefix is the prefix of your mod and key is the key you gave to your joker.

#

It is good practice to keep your mod prefix short, under 4 letters if possible.

#

For example, a mod I (and some others) am developing, Fool's Gambit, has the prefix fg.

#

this results in all the content added by said mod to have that prefix. i.e. j_fg_joker

zealous peak
#

I just made it ZVS

#

and it works

#

how do I give myself the joker through debug menu plus

#

or just the debug menu

molten relic
#
        if context.individual and context.cardarea == G.play and
            if pseudorandom("among") < G.GAME.probabilities.normal / 5 then return {repetitions = 1}```
#

i have this now. i wanna make 1 in 5 chance to retrigger a card. how?

red flower
red flower
molten relic
#

and then?

red flower
#

that's it

molten relic
#

do i have to make a return statement?

#

or does it just work like this

red flower
#

you have a return statement there

molten relic
#

oh yeah i see

#

haha

#

hehe

zealous peak
#

yo it works

#

thanks

molten relic
#

any idea whats wrong here?

#

line 206 is the loc_txt

#
        ['name'] = "My Reflection",
        ['text'] = {
            [1] = {C:green}1{} in {C:green}5{} chance to",
            [2] = {C:attention}retrigger{} a scored card"
        }
    },```
red flower
#

you're missing a "

molten relic
#

ooooooo

#

whoops

#

thanks :3

red flower
#

also you don't need the [1] =

molten relic
#

the [2] = neither?

red flower
#

yeah those are automatic

molten relic
#

ooo ok

#
        if context.repetition and context.cardarea == G.play and
            if pseudorandom("among") < G.GAME.probabilities.normal / 5 then return {repetitions = 1}
            end
        end
    end
}```
#

this is also erroring

red flower
#

what's the error

molten relic
#

ill copy it

#

but i might know whats wrong

molten relic
#

im confused

red flower
#

or replace the and with then

molten relic
#

ohhh i guess that makes sense

#

okay i dont think it works

#

or im just REALLY unlucky

#

ill paste the code for you to help me :3

#
    name = "My Reflection",
    key = "myreflection",
    config = {
        extra = {
            odds = 5,
            repetitions = 1
        }
    },
    loc_txt = {
        ['name'] = "My Reflection",
        ['text'] = {
            "{C:green}1{} in {C:green}5{} chance to",
            "{C:attention}retrigger{} a scored card"
        }
    },
    pos = {
        x = 4,
        y = 0
    },
    cost = 4,
    rarity = 2,
    blueprint_compat = true,
    eternal_compat = true,
    unlocked = true,
    discovered = false,
    atlas = 'CustomJokers',

    loc_vars = { function(self, info_queue, card)
        return { vars = { card.ability.extra.repetitions, card.ability.extra.odds } }
    end,
    calculate = function(self, card, context)
        if context.repetition and context.cardarea == G.play and
            (pseudorandom('skallywobble') < G.GAME.probabilities.normal) / 5 then
                return {
                    repetitions = 1
                }
            end
        end,
    }
}```
#

please help me im lost