#💻・modding-dev

1 messages · Page 495 of 1

subtle merlin
#

Can someone help me with shaders? Idk why exactly but this mf will not stop being pink

normal crest
#

where does hypermult and hyperchip come from

ivory citrus
hasty mist
normal crest
hasty mist
#

its just arbitrary operators

normal crest
#

You? or another mod

hasty mist
#

talisman

#

i believe

ivory citrus
#

Thanks

hasty mist
#

hyperchips works just fine on another joker of mine

#

just not this one

normal crest
#

What did you return on said other joker

jolly shadow
#

what does "to_big()" do

#

clueless emoji

daring fern
hasty mist
jolly shadow
#

that's where my mind would go first in this scenario, I'd check what that's returning

#

if putting a value into hyperchip n that jazz works elsewhere I'd think my value is wrong

hasty mist
#

i dont see how the implementation is any different

wooden nexus
hasty mist
#

if i manually replace the loc_vars listed under hyperchip_mod and hypermult_mod with numbers here it still does not work

jolly shadow
ivory citrus
normal crest
#

you didn't change ASSETS to assets

ivory citrus
#

oh, i sorry

normal crest
#

It looks like if either of them is negative, it returns NaN directly

hasty mist
#

-1 is just addition

#

its the exact same number i use on the other joker that works

hasty mist
#

if i replace everything with a positive number it still becomes nan

ivory citrus
wooden nexus
#

Sell the joker, get a tarot

jolly shadow
wooden nexus
#

it's the next best thing

normal crest
jolly shadow
hasty mist
#

😭 😭 😭

normal crest
ivory citrus
hasty mist
#

ive had like 5 people try to help me here and nothing works

wooden nexus
#

Who keeps putting ? emotes

normal crest
# ivory citrus Is empty

you should put everything you have in your jokers.lua file into your main.lua file, and delete the jokers.lua one

red flower
chrome widget
#

Three more...

normal crest
chrome widget
#

My chud taser face card

hasty mist
#

i wouldnt even begin to know who that is

jolly shadow
#

whenever I'm stuck on something I annoy aikoyori about it

red flower
#

have you tried asking ruby

hasty mist
#

that is a good idea

normal crest
bold gyro
#

is anyone an expert in context.joker_type_destroyed

jolly shadow
red flower
chrome widget
jolly shadow
jolly shadow
ivory citrus
#

But my mod it duplicated

ivory citrus
normal crest
ivory citrus
bold gyro
red flower
#

hmm let me test it myself

jolly shadow
ivory citrus
lucid owl
#

it's so outdated lol

long sun
#

attempted something that doesn't seem to be working

normal crest
long sun
#

trying to make it so all catan cards give +1 consumable slot

#

and i figured it'd be easier to add the needed config, loc_vars and functions in post

red flower
bold gyro
#

damn

ivory citrus
#

another question

jolly shadow
#

this is jus a curiosity question

long sun
#

yes

ivory citrus
#

how i can change the rarity of my joker

jolly shadow
#

that is so funny

bold gyro
#

caino

long sun
#

it's one of balatro's source code misspellings

#

ya caino ^^

hasty mist
#

gluttenous

long sun
#

that too!!

#

forgot how that was misspelled

hasty mist
#

heirophant

red flower
#

heirophant

#

damn

long sun
#

balala

jolly shadow
#

I don't kno the specific values tho

hasty mist
#

jinx

#

you owe me a double tag

long sun
#

anyway, it seems like the config isn't there

normal crest
long sun
#

as my localisation is +nil

long sun
#

oh possibly also a loc_vars issue

#

as the way i did that was mucho scuffedo

hasty mist
#

slight problem

#

i want to return multiple things at once

#

but i also want them to be conditional

jolly shadow
#

how so?

hasty mist
#

so my issue with this was

#

i cant actually have arrows below 1 apparently

#

so i need to hardcode addition and multiplication

#

but

#

im returning chips AND mult

daring fern
long sun
#

right ^^;

hasty mist
#

and they both are supposed to have different (random) operators, between addition and tetration

long sun
#

weird, that worked with my Starter Packs

#

will try in igo

chrome widget
daring fern
jolly shadow
long sun
#

ah :D

daring fern
red flower
chrome widget
#

I am simply a checks notes voracious sexual recipient for compliments

ivory citrus
#

I need to play until I get it, or is there a way to make it appear?

hasty mist
#

essentially

normal crest
long sun
#

mm, now it's complaining that card doesn't exist: return { vars = { card.ability.extra.no_of_cards } }

hasty mist
#

how do i explain

jolly shadow
hasty mist
#

the intended effect is to give chips and mult, but both are seperately randomized to be additive, multiplicative, exponentional, or tetrational

#

its proving to be more difficult than i thought

red flower
#

what determines the operator

hasty mist
#

a pseudorandom function

#

which rolls during joker_main

#

or, well, two pseudorandom functions

#

one for chips and one for mult

red flower
#

I'm asking more specifically what -1 to 2 means

#

I don't know anything about talisman

hasty mist
#

that was an issue on my part

#

for simplicity its just 1-4

#

addition, multiplication, exponentiation, and tetration

long sun
#

(bump? i don't know why card is nil)

#

assuming it's this bit

hasty mist
#

so like

long sun
#

ah wait i've seen something unrelated

hasty mist
#

if i roll a 1 and a 3, it should return +Chips and ^Mult

long sun
red flower
ivory citrus
#

it still doesn't work but I'm proud of that

#

(the image is a placeholder, i dont know how do pixel art yet)

normal crest
hasty mist
normal crest
#

assuming V is a center

long sun
#

ah lemme try that

#

sounds good

long sun
hasty mist
#

because you cant have two return statements at once, making me put both chips and mult in the same return

#

but that doesnt work either

red flower
normal crest
long sun
#

eep!

hasty mist
#

i see

subtle merlin
hasty mist
#

yeah my issue before was just that i was trying to use hyperchips/mult which didnt work

#

at all

long sun
#

no clue how i'd go about doing that

hasty mist
#

sorry if im overcomplicating my explanation

normal crest
red flower
# hasty mist sorry if im overcomplicating my explanation

like this?

local chance_mult = pseudorandom("seed", 1, 4)
return {
    mult = chance_mult == 1 and card.ability.extra.mult or nil
    xmult = chance_mult == 2 and card.ability.extra.mult or nil
    emult = chance_mult == 3 and card.ability.extra.mult or nil
    eemult = chance_mult == 4 and card.ability.extra.mult or nil
}
hasty mist
#

yeah

red flower
#

also talisman doesnt even have a wiki???

normal crest
#

yeah, right? Had to go look thru their code to see whatever hyperchips meant

#

not that I understood it, but still

red flower
#

same, didnt even know eeemult was a thing

long sun
#

AAAAAAAHAHAHAHAHAHA THIS WORKSSSSSSSS >:3

#

SUCK ITTTTT thanks :3

#

your help was invaluable :3

#

YESSSSS GET INNNNNN

#

getting a weird, but very minor, bug

#

when checking out Settlement in the collection, it displays +nil consumable slot

#

but then, hovering off and back on, it corrects itself

#

must be a timing thing

normal crest
#

is Settlement something you made

#

if so, what's its loc_vars

long sun
#

yepyep

#
loc_vars = function(self, info_queue, card)
    return { relevant = { G.P_TAGS.tag_rare } }
  end,```
#

relevant here is a thing that lets the info_queue work with this system

#

tis a tomorrow problem though ^^; it's 3am

#

very glad i got this all working! thanks for your help!!

lament agate
#
function SMODS.calculate_individual_effect(effect, scored_card, key, amount, from_edition)
  if G.jokers and next(SMODS.find_card("j_tngt_autocorrect")) and key == "mult" or key == "mult_mod" then
    return ref(effect, scored_card, "xmult", amount, from_edition) --Changing key to xmult. If you want to change how much xmult it should give, change amount, I assume.
  else
    return ref(effect, scored_card, key, amount, from_edition)
  end
end
#

this somehow leaks

#

even without the joker needed

#

what happened

lament agate
#

IF the player has that joker

#

but somehow a run without that joker still got affected

red flower
#

(key == "mult" or key == "mult_mod")

#

with parenthesis

real night
#

how would i make something like "X0.5 Mult for every card you can currently play"

lament agate
daring fern
lament agate
daring fern
lament agate
real night
lament agate
#

weird

#

thanks for telling me that

#

thunk (tm)

red flower
red flower
real night
lament agate
#

i actually need a reference screen somewhere here by god i forgot how normal joker color their description text sometimes

ivory citrus
#

Hello

#

me again

#

i wanna do an joker be like observatory

#

but with the fool and for all hands

real night
#

would "this joker gains +3 chips when a card is discarded" be like context.discard

lament agate
#

wait what

real night
daring fern
real night
#
SMODS.Joker {
    key = "trash_bin",
    config = { extra = { chips = 0, chips_mod = 3 } },
    rarity = 2,
    atlas = "pok_jokers",
    pos = { x = 0, y = 0 },
    cost = 2,
    blueprint_compat = true,
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.chips, card.ability.extra.chips_mod } }
    end,
    if context.discard and not context.blueprint then
        card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chips_mod
    end
}
#

what the fuck is wrong here

daring fern
subtle merlin
real night
real night
daring fern
subtle merlin
real night
#

i have no clue what it is tho

daring fern
subtle merlin
real night
#

oh wait

lament agate
#

running it back once again

#

its card.seal for cards that has seal right?

bold gyro
#

hey y'all, i'm trying to patch the get_pack function by changing the first pack to be something else. after a bit of testing, i added a print at the very start of the function, and it doesn't print. why could that be the case?

real night
#

okay this is crashing

SMODS.Joker {
    key = "trash_bin",
    config = { extra = { chips = 0, chips_mod = 3 } },
    rarity = 2,
    atlas = "pok_jokers",
    pos = { x = 0, y = 0 },
    cost = 4,
    blueprint_compat = true,
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.chips, card.ability.extra.chips_mod } }
    end,
    calculate = function(self, card, context)
        if context.discard and not context.blueprint then
            card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chips_mod
        end
        if context.joker main then
            return {
                chips = card.ability.extra.chips
            }
        end
    end
}
daring fern
bold gyro
daring fern
lament agate
hidden sable
#

is there a soul_pos for blinds

#

odd question

daring fern
hidden sable
#

k

wooden nexus
hidden sable
#

skip tag cards?

wooden nexus
#

Now to figure out how to merge them into ONE rank there in the UI

#

I don't want that to be TAG_BAL_THING

wooden nexus
hidden sable
#

open?

#

like like

#

uhhh

#

idk

wooden nexus
#

Well i'm trying to add an others rank and suit to basically do new custom cards

#

though i need to fix stuff like the spectrals crashing

real night
#

is it COLOR = G.C.BLUE or COLOUR = G.C.BLUE

wooden nexus
#

U

real night
#

is it capitalized

#

i cant remember

wooden nexus
#

I believe so?

hidden sable
#

who the giggle?

daring fern
daring fern
hidden sable
#

oh mb gang :sorry:

bold gyro
hidden sable
#

bros michel

bold gyro
# daring fern Code?

the function after the patch is applied (first bit):

function get_pack(_key, _type)
    print("nuts")
    if not G.GAME.first_shop_buffoon and not G.GAME.banned_keys['p_buffoon_normal_1'] then
        G.GAME.first_shop_buffoon = true
        print(G.GAME.selected_back_key.key)
        if G.GAME.selected_back_key.key == 'b_picubed_rejuvinationdeck' then
            return G.P_CENTERS['p_celestial_mega_'..(math.random(1, 2))]
        end
        return G.P_CENTERS['p_buffoon_normal_'..(math.random(1, 2))]
    end```
#

patches:
[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = "return G.P_CENTERS['p_buffoon_normal_'..(math.random(1, 2))]"
position = "before"
match_indent = true
payload = '''
print(G.GAME.selected_back_key.key)
if G.GAME.selected_back_key.key == 'b_picubed_rejuvinationdeck' then
return G.P_CENTERS['p_celestial_mega_'..(math.random(1, 2))]
end
'''

[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = "if not G.GAME.first_shop_buffoon and not G.GAME.banned_keys['p_buffoon_normal_1'] then"
position = "before"
match_indent = true
payload = '''
print("nuts")
'''

daring fern
bold gyro
#

ah

#

yeah that'd do it thx

lucid owl
#

would it be feasibly easy to make a pack's background color change if a specific card is in said pack?

#

wait isn't there a function for it

hidden sable
daring fern
hidden sable
#

huh

#

whats the sizwe of blind

#

blind atlar

daring fern
hidden sable
#

yo thanks bibby

fallow breach
#

thoughts on this?

#

it's a scaling joker where the scaling is in its odds

#

(odds increase over 2 means 1 in 20 goes to 1 in 18)

hidden sable
#

found it out

subtle merlin
hidden sable
#

nvm chunglinks

#

now uhh

fallow breach
modern kindle
#

Well then it isnt quite each time is it

subtle merlin
#

a scaling joker that has a possibility to eventually trigger every hand?

#

nice

modern kindle
#

I thought a cap to 1 means it only triggers the odds increase once

#

Meaning the best it gets is 1 in 18

fallow breach
#

nah, i just meant it can't go lower than /1

modern kindle
#

Make it -20

#

Then we are really gaming

subtle merlin
modern kindle
#

Mostly pray and stab yourself and cry
There was a small little guide in the modding area you can look for in regards to shadertoy shaders, otherwise I'd recommend looking at the smods examples are and look at their shaders to see how they do it

subtle merlin
#

ooohhhhh that thing

#

i didnt like that thing

hidden sable
#

balanced?

modern kindle
#

Smt why you thinking me am I wrong

daring fern
subtle merlin
modern kindle
lucid owl
#

if i wanted a card to constantly wiggle but not use :juice_card_until() (too fast) what function could i do that in?

#

definitely not a drawstep, but also update() would not be smart either

subtle merlin
hidden sable
#

but other than that balanced?

lament agate
#

is h_chips a thing

hidden sable
subtle merlin
hidden sable
subtle merlin
hidden sable
daring fern
hidden sable
lament agate
hidden sable
#

i might make it lose 1 dollar per hand

#

i want the blind to take a ridiculously long amount of time

#

like in the game i'm referencing

subtle merlin
daring fern
#

Also juice_card_until can take a custom delay.

hidden sable
subtle merlin
subtle merlin
hidden sable
lucid owl
# daring fern Why?

this card has the same chance of appearance as the soul, and understandably is powerful. it already changes the background when spawning to a deep red, but because of its slightly unhinged art, i'd like to make it as insane as possible

lucid owl
subtle merlin
#

(exagguration but not by much)

lament agate
#

go on

hidden sable
#

adding a whole blind, joker, and consumable based off this one game because i like it so much

#

don't even know what ima call my mod, it's just silly things i feel like adding

subtle merlin
#

LET ME GET RIGHT ON THAT.

hidden sable
#

trust

hidden sable
hasty mist
lucid owl
#

the plan is already to slow down music

daring fern
lament agate
#

can you detect player's most played ranks

daring fern
lament agate
hasty mist
#

when i try adding a custom message it shows in addition to the two previous ones

lucid owl
#

how would i only call set_ability() in a booster pack?

#

oh wait

#

G.STATES huh

hidden sable
#

i wanna add a joker that gives mult based off the players high score in another game, specifically their endless score, should it be +mult or xmult, and how much should it give, the average score is around 2000 so should it be score / 100 = mult?

daring fern
# lament agate how to
local ranks = {}
for k, v in pairs(G.playing_cards) do
    ranks[v:get_id()] = (ranks[v:get_id()] or 0) + v.base.times_played
end
local mostplayed
local played = 0
for k, v in pairs(ranks) do
    if v >= played then
        mostplayed = k
        played = v
    end
end
lucid owl
daring fern
short girder
#

what does the "collection_rows" element do in SMODS.ConsumableType?

daring fern
#

For example {5, 5, 5} would be 3 rows and 5 columns for each.

wild escarp
#

I've got this, where j_willatro_box is the key of an upgraded version of chad. How could I set it up so that I can put one thing there that could apply for all upgraded joker versions? If any of that makes sense.

use = function(self, card, area, copier)
    G.E_MANAGER:add_event(Event({
        trigger = 'after',
        delay = 0.4,
        func = function()
            play_sound('tarot1')
            card:juice_up(0.3, 0.5)
            return true
        end
    }))
    delay(0.2)
    for i = 1, #G.jokers.highlighted do
        G.E_MANAGER:add_event(Event({
            trigger = 'after',
            delay = 0.3,
            blockable = false,
            func = function()
         G.jokers.highlighted[i]:start_dissolve(nil, false)
                SMODS.add_card({ key = 'j_willatro_box' })
                card:juice_up(0.3, 0.5)
                return true
            end
        }))
    end
    G.E_MANAGER:add_event(Event({
        trigger = 'after',
        delay = 0.2,
        func = function()
            G.jokers:unhighlight_all()
            return true
        end
    }))
    delay(0.5)
end
short girder
near heart
#

trying to find & destroy the first queen held in hand. any ideas on why this error is happening?

#

i know im likely doing this in the worst way possible but bear with me

daring fern
daring fern
#

Also you should be using context.destroy_card

near heart
#

i define it above

#

there better not be question marks

daring fern
near heart
daring fern
#

You should still be using context.destroy_card

daring fern
near heart
#

... and if its not destroyed 'safely'?

lucid owl
#

then it's not safe

#

stuff could be broken

near heart
#

thank you rouxls card

lucid owl
#

you're welcometh

daring fern
near heart
#

awesome

daring fern
near heart
#

(it was sarcasm)

near heart
#

i also removed the local from found

#

i think i wrote the for loop wrong since its not finding any queens in the first place

daring fern
near heart
#

sick thanks

#

why is local okay for found in this case but not for the other variable?

daring fern
near heart
#

ok thats good to know

#

im used to it making the variable exist only in the function

compact valve
#

which one do yall fw more

short girder
#

how do i make a consumable spawn two cards from different sets (1 for each)?

daring fern
short girder
#

had to make a variable so i could switch cases and make both while preserving the animation, but thanks!

#

this didn't work! fuck the animation then lmfao

subtle merlin
#

I am again asking if anyone can help me with making a shader :3

manic rune
lament agate
subtle merlin
hidden sable
#

what is foo and bar, i see it everywhere

#

thunk is online, quick post your awful joker ideas

azure valley
#

Bit of a dumb question, I'm not too familiar with Love2D, and I think I'm running up against a feature of Love2D specifically.

G.E_MANAGER seems to have a definition for add_event in the balatro source, and I don't see a place where SMOD is messing with this. However, when I try to rawget this function, I get nil. I come to find out this is because the function is actually stored in a metatable. Is this from the fact that EventManager is a subclass of Object? If not, then where is it coming from? If so, how does that even work?

final jewel
#

How do I make something that isnt retrigg-able (idk if its a word)

subtle merlin
#

"retrigger-able" (with or without hyphen), and no idea

compact valve
final jewel
#

Like I have this part that I dont want my thing to be upgrade multiple time

modern kindle
subtle merlin
subtle merlin
hidden sable
hasty mist
#

how do i do something like collection_loc_vars on something that isn't a blind

faint yacht
subtle merlin
# compact valve ?

"is there a way to make the message box display variables? #1# doesn't seem to work, and message colors don't change either"

daring fern
subtle merlin
daring fern
final jewel
# hidden sable `blueprint_compat`

yeah but Its like a weird gold card that upgarde. I dont want the upgrade part to be retriggerable but the part where it give cash can be retrigger

subtle merlin
compact valve
#

which I still haven't figured out

daring fern
# subtle merlin Elaborate, please

You have to enable it but it would be if context.retrigger_joker_check then return {repetitions = 1} end to retrigger all jokers once.

final jewel
daring fern
hidden sable
subtle merlin
#

Ah

final jewel
hidden sable
final jewel
subtle merlin
#

Couldn't you just make the upgrade happen past when the retrigger context happens? (Like context.after or context.final_scoring_step)

final jewel
modern kindle
#

I like how those cards look

hidden sable
# final jewel

yeah just make the upgrade happen on a different context

final jewel
final jewel
compact valve
#

(wild cards only count as one suit at a time, so I had to manually add in the wild card effect)

hidden sable
final jewel
hidden sable
final jewel
#

its show some stat

#

Its realy good for testing things

#

with that it works how I intended, thx y'all

hasty mist
#

whyyyyyyyyyyyyyyyyyyyy

daring fern
hidden sable
#

just about to say that too

#

but you beat me to it

#

i'm suing

hasty mist
#

i see my issue

lament agate
#
    calculate = function(self, card, context)
        if card.seal and context.repetition and context.cardarea == G.play then
            if card.seal == "Red" then
                return {
                    repetitions = card.ability.extra.repetitions,
                    xmult = card.ability.extra.red_xmult
                }
            end
            return {
                repetitions = card.ability.extra.repetitions
            }
        end
    end
#

not giving retrigger and xmult

#

whats wrong

daring fern
lament agate
#

fuck

#

thansk

daring fern
lament agate
lament agate
daring fern
lament agate
#

thanks some

lament agate
#

but not the xmult

daring fern
lament agate
daring fern
#

Do it in context.individual

lament agate
#

so

#

else if?

daring fern
# lament agate else if?

No, just put another if like if context.individual and context.cardarea == G.play and context.other_card:get_seal()

lament agate
#

like this?

daring fern
#

It should be context.other_card:get_seal() == "Red"

lament agate
#

oh

lament agate
#

lke this?

daring fern
lament agate
lament agate
#

it retriggers instead of giving xmult

daring fern
lament agate
# daring fern Code?
    calculate = function(self, card, context)
        if context.repetition and context.cardarea == G.play and context.other_card:get_seal() then
                return {
                    repetitions = card.ability.extra.repetitions,
                }
            end
        if context.individual and context.cardarea == G.play and context.other_card:get_seal() then
            if card:get_seal() == "Red" then
                return {
                xmult = card.ability.extra.red_xmult
                }
        end
    end
end
daring fern
hidden sable
#

how set hand

#

mr poly bridge pls clutch up on ts one

hidden sable
#

not add, set

daring fern
hidden sable
#

like

#

discards

#

hands

lament agate
daring fern
hidden sable
daring fern
lament agate
daring fern
lament agate
#

it works

#

thank you

hidden sable
#

how can i make it so in a blind every hand makes you lose 2 dollars

faint yacht
#

if context.before then ease_dollars(-2) end

hidden sable
#

in a blind

faint yacht
#

...do you mean entering the Blind you lose $2 per hand or you lose $2 per hand played?

hidden sable
#

a blind causing you to lose 2 dollars per hand played

#

also does ease dollars go negative

faint yacht
#

Blinds have calculate too, you just toss if context.before then ease_dollars(-2) end there.

hidden sable
#

like under 0 for the total

faint yacht
#

And yes.

hidden sable
#

ok nice

#

nvm fixed

#

now how can i

#

make it so cards that go to the discard pile

#

instead go back into the deck

daring fern
hidden sable
#

guys thats totally intended

hidden sable
wintry solar
hidden sable
#

if you run out of cards its game over

#

thats why i give you an absurd amount of hands

#

because the blind is REALLY big

#

how to check if current blind is my modded blind?

subtle merlin
daring fern
hidden sable
#

yuh i hooked it wrong

#

i also need to do the same for draw from discard to discard

#

actually isnt there a function for

molten relic
#

how would i make an unlock condition?

#

(for 3 wins)

hidden sable
#

drawing cards from discards to deck

#

?

subtle merlin
hidden sable
#

hold up i think im onto something

foggy ginkgo
#

What is bro cooking

daring fern
hidden sable
#

this worked

#

now uh

#

whats the function for discard to discard

daring fern
hidden sable
daring fern
#

But not the ones in play.

#

You need to draw them to deck after.

hidden sable
#

i want just to basically disable the discard and keep moving it to deck, this accomplishes that

molten relic
#

how do i check for how many times someone has won a run?

daring fern
#

Move the G.FUNCS.draw_from_discard_to_deck to after the old function has run.

hidden sable
daring fern
hidden sable
#

like this?

daring fern
hidden sable
daring fern
#

Also it should just be return ret

daring fern
hidden sable
daring fern
#

The if is useless.

hidden sable
#

yeah

normal crest
#

hi

hidden sable
molten relic
#

hi

hidden sable
#

hi

normal crest
#

bye

molten relic
#

bye

hidden sable
#

now whats the function for discard to discard

hidden sable
#

spooky ass error

#

everything works

#

now how high should i make the blind

#

i beat it and clicked cash out

wintry solar
foggy ginkgo
#

The wise eremel is real

#

THE ONE PIECE IS REAL

molten relic
#

is there a way to check for if a player has won 3 times

subtle merlin
# wintry solar What do you need?

i want to make shaders but i don't know anything at all abt it

I wanted to make one for different kinds of emotions but i can barely make one not be pink

wintry solar
#

You just want basic colour grading?

subtle merlin
#

Originally i wanted more than that but it's taken so long that ill settle for that

foggy ginkgo
#

Real

wintry solar
#

Right, do you have a shader file ready to go?

subtle merlin
# molten relic PLEASE

variable that's stored in the joker and goes up by 1 at the end of the round is how i did it

subtle merlin
molten relic
#

won 3 runs

#

like entire runs

subtle merlin
wintry solar
subtle merlin
#

everything is set up properly, all i need to do now is make the actual shader

wintry solar
#

Okay that one’s a bit more involved to begin with, I’d probably grab the greyscale one as a base. I’m just about to head out for an hour or so, I’d recommend using the debug plus watch command and just playing around with changing different things to learn what stuff does, but a lot of it is just colour math

subtle merlin
#

the watch command?

wintry solar
#

Lets you see changes to the shader without reloading the game, it’s on the debug plus wiki

subtle merlin
#

oki ill try that

#

ty

wintry solar
#

But as a very quick summary, you’re telling each pixel what colour it should be in the shader file, so basic colour effects are reasonably straight forward once you are used to the syntax

foggy ginkgo
#

I'm scared

molten relic
#

somethingcom515

#

do you have enough wisdom to helpeth me

#

i think i found it

#

c_wins

#

would this work

#
        if c_wins >= 3
        return {
            true
        }```
daring fern
molten relic
#

yeah i got that lol

#

could ya help meh

daring fern
molten relic
#

oh

subtle merlin
molten relic
#

oke

wintry solar
subtle merlin
#

yea...

foggy ginkgo
#

You got this Violet

wintry solar
#

You can look at the book of shaders too

#

That’s a very good resource

foggy ginkgo
#

Damn

#

Good luck Violet

#

It's gonna look great :D

molten relic
#

did i formulate it correctly

#
        if G.PROFILES[G.SETTINGS.profile].career_stats.c_wins >= 3
            return {
                true
            }
        end
    end
}```
#

crash log:

subtle merlin
molten relic
#

owh

daring fern
molten relic
#

where?

#

check_for_unlock =?

#

please help

daring fern
molten relic
#

ok

hidden sable
#

i click cash out and my game crashes

molten relic
#

same crashlog

daring fern
molten relic
#

okay

#

in dm's?

#

ill do it here

#
    name = "Transendence",
    key = "j_bali_trans",
    config = {
        extra = {
            xmult = 1.5,
            face = false,
            number = false
        }
    },
    loc_txt = {
        ['name'] = "Transendence",
        ['text'] = {
            "{X:red,C:white}1.5X{} Mult if both a",
            "{C:attention}face card{} and a {C:attention}7{} are scored"
        }
    },
    pos = {
        x = 0,
        y = 4
    },
    cost = 6,
    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.xmult } }
    end,
    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play and context.other_card:is_face() then
            card.ability.extra.face = true
        end
        if context.individual and context.cardarea == G.play and context.other_card:get_id() == 7 then
            card.ability.extra.number = true
        end
        if card.ability.extra.number and card.ability.extra.face then
            if context.joker_main then
                card.ability.extra.face = false
                card.ability.extra.number = false
                return {
                    xmult = card.ability.extra.xmult
                }
                end
        end
    end
    check_for_unlock = function(self, args)
        if G.PROFILES[G.SETTINGS.profile].career_stats.c_wins >= 3
            unlock_card(self)
        end
            return false
    end
}```
molten relic
#

ohhh

daring fern
#

And a ,

molten relic
daring fern
lament agate
lament agate
# daring fern Code?
function SMODS.calculate_individual_effect(effect, scored_card, key, amount, from_edition)
  if G.jokers and next(SMODS.find_card("j_tngt_roblox")) and (key == "chips" or key == "chips_mod" or key == "h_chips") then
    return ref(effect, scored_card, "xchips", amount, from_edition) --Changing key to xmult. If you want to change how much xmult it should give, change amount, I assume.
  else
    return ref(effect, scored_card, key, amount, from_edition)
  end
end
lament agate
#

is it chip then

#

not chips

daring fern
lament agate
#

oh alright

#

i get it

#

thanks

daring fern
#

It's chips, chip_mod and h_chips

lament agate
#

now i just gotta

#

figure out

#

how to replace them all text

daring fern
#

Also you should do effect.message = nil

lament agate
daring fern
molten relic
wintry solar
#

You should probably only do that if it’s chip_mod though

lament agate
#

got it

#

so like

#

and effect.message = nil then?

daring fern
faint yacht
#

mod.reset_game_globals time...

molten relic
#

nvm

#

i set unlocked to true 😭

hidden sable
molten relic
#

it worksa

#

only now i have to set the locked text

subtle merlin
molten relic
#

why cant i set the unlock text

#

it shows the jokers effect as the unlock text

#

i changed it in en-us.lua and everything

daring fern
molten relic
#

in the joker's code?

#

then yes

#

its set to false

daring fern
molten relic
#

wait

#

do you have to add ['unlocked']

#

in loc_txt

daring fern
#

But yes.

molten relic
#

unlock or ['unlock']

daring fern
molten relic
#

it works

#

:3

#

thanks

lament agate
#
        in_pool = function(self, args)
        return false
#

i put this in already

#

why is it still showing up

daring fern
lament agate
lament agate
# daring fern Show more code.
SMODS.Joker {
    key = 'nxkoo',
    loc_txt = {
        name = 'Nxkoo'
    },
    rarity = "tngt_fourwall",
    atlas = 'DEVS',
    pos = { x = 0, y = 0 },
    soul_pos = { x = 0, y = 1 },
    cost = 20,
    unlocked = true,
    discovered = true,
    config = {
        extra = {
            lines_mult = 0.1, 
            lines_count = 8528,
            joker_chips = 5,
            joker_count = 105
        }
    },
    loc_vars = function(self, info_queue, card)
        return {
            vars = {
                card.ability.extra.lines_mult,
                card.ability.extra.lines_count,
                card.ability.extra.lines_mult * card.ability.extra.lines_count,
                card.ability.extra.joker_chips,
                card.ability.extra.joker_count,
                card.ability.extra.joker_chips * card.ability.extra.joker_count
            }
        }
    end,
     set_badges = function(self, card, badges)
         badges[#badges+1] = create_badge('DEAD', G.C.RED, G.C.BLACK, 1.2 )
     end,
    calculate = function(self, card, context)
        if context.joker_main then
            return {
                xmult = card.ability.extra.lines_mult * card.ability.extra.lines_count,
                xchips = card.ability.extra.joker_chips * card.ability.extra.joker_count
            }
        end
        in_pool = function(self, args)
        return false
    end
    end
}
daring fern
lament agate
subtle merlin
lament agate
subtle merlin
lament agate
#

somethingcom is disappointed at me

#

its over

ashen drift
#

how do i modify vanilla enhancements' value

daring fern
ashen drift
#

cool thanks

slim ferry
#

why does this crash

maiden phoenix
#

Check if context.poker_hand exists first

#

I think

slim ferry
#

okay turns out context.poker_hand shouldve been context.poker_hands

lament agate
#

how do you

#

color tooltips text again

slim ferry
#

what is the equivalent of G.P_CENTER_POOLS["Enhanced"] for editions

daring fern
slim ferry
#

How would i create a card with a random edition with SMODS.add_card

wintry solar
#

it's just poll_edition

#

theres no smods wrapper for it

slim ferry
#

nvm turns out cryptlib is fucky

#

is SMODS.destroy_card not a real function? vanillaremade uses it but it crashes my game when i use it

wintry solar
#

SMODS.destroy_cards

red flower
#

did i write destroy_card somewhere

slim ferry
#

no i just cant read

#

why does my game crash on this now? vanillaremade does the exact same thing for familiar, incantation etc and this card is pretty similar

red flower
#

what's the crash

slim ferry
red flower
#

what's card.ability.extra.cards

slim ferry
#

5

#

oh

red flower
#

where is it defined

slim ferry
#

wait

#

no

#

i used the wrong variable name oops

manic rune
#

i feel sorry for how many crashes your getting rn 😭

red flower
#

are you trying to give a table to poll_edition

slim ferry
red flower
#

the arguments are not structured the same as the smods ones

wintry solar
#

I should make a smods wrapper for poll edition at some point

manic rune
#

here are the arguments

red flower
slim ferry
#

when its not a table vsc gets pissy

wintry solar
#

have you ever called a function before

slim ferry
#

i have and those worked

red flower
#

functions in lua don't have named parameters so you can't do guaranteed =

#

it would be poll_edition("seed", nil, nil, true)

#

(the second nil can be true if you want to remove negative)

ripe kestrel
#

how can i make a joker trigger when opening a pack kinda like hallucination

manic rune
#

context.open_booster?

desert hedge
#

How can I make a custom deck with Steammodded

slim ferry
#

very similar to jokers just with a few differences

desert hedge
#

I'm trying to figure out how to modify jokers when they are bought from the shop

#

Or added in another way

red flower
#

what's the exact effect you want?

desert hedge
#

If a joker is added; make them Eternal

vestal magnet
#

made a deck but game crashes the moment its selected

desert hedge
#

Unless the joker can't be Eternal

red flower
desert hedge
#

Oh got it

#

I think

vestal magnet
lament agate
#

how to detect if a booster pack is a celestial booster pack

red flower
lament agate
red flower
#

wdym

desert hedge
#

Uh no I don't

lament agate
#

booster.config.center.kind == "Tarot"

red flower
lament agate
#

etc.

red flower
lament agate
#

vald

#

thanks

vestal magnet
#

upd: i solved the problem

#

i forgot to put the name in loc txt

fathom void
#

i should figure out how to make diviner's chance work later
(what it's supposed to do is have 1/3 tarot cards generate another tarot card when used)

humble pawn
#

Is it possible to forcably end the shop?

red flower
humble girder
#

Rip all the real estate

glass crown
#

so, i have this calculate function (sorry if im using the wrong terms im very new) and its supposed to just give one card when it triggers, but uh as of current when it triggers it begins infinitely giving cards? how do i make it just trigger once?
this calculate function is attached to a deck btw, not like a joker or anything else

        if context.individual and context.cardarea == G.play then
            if pseudorandom('extraterrestrial_deck') < G.GAME.probabilities.normal / self.config.odds then
                G.E_MANAGER:add_event(Event({
                    func = function()
                        local card = SMODS.create_card { set = "Base", rank = "votd_Extraterrestrial" }
                        G.deck:emplace(card)
                        table.insert(G.playing_cards, card)
                    end
                }))
                return { true }
            end
        end
    end```
glass crown
#

oh im really silly

#

how did i not notice that lmao ive taken note of the fact that events need to return multiple times

#

i guess its always the silly mistakes that get you

ripe kestrel
#
    key = "SStar",
    loc_txt = {
        name = 'Sale Star',
        text = {
            "+1 option in booster packs",
        }
    },
    rarity = 2,
    atlas = "RiskOfJokes", pos = {x = 4, y = 0},
    cost = 5,
    unlocked = true,
    discovered = true,
    eternal_compat = true,
    blueprint_compat = true,
    perishable_compat = true,
    calculate = function(self, card, context)
        if context.open_booster and context.card.ability.name and not G.GAME.rerolled_pack then
            G.E_MANAGER:add_event(Event({
                trigger = 'after',
                delay = 0,
                blockable = false,
                blocking = false,
                func = function()
                    if G.pack_cards and G.pack_cards.cards and G.pack_cards.cards[1] and (G.pack_cards.VT.y < G.ROOM.T.h) then
                        G.GAME.pack_choices = G.GAME.pack_choices + 1
                        if G.GAME.pack_choices > #G.pack_cards.cards then
                            G.GAME.pack_choices = #G.pack_cards.cards
                        end
                        return true
                    end
                end
            }))
        end
    end
}```
#

it doesnt have a discription nore name? also the wrong rarity

red flower
#

did you restart the run before testing

ripe kestrel
#

i restarted the game with debug plus

#

and a new run

simple helm
#

how do i make effects like turtle bean, that gives you +5 hand size if you have it?

red flower
simple helm
red flower
#

yes

#

thats what turtle bean does

#

you would remove the decreasing part

simple helm
#

srry, i didn't explain myself

#

i want a joker that increases ante +1, but gives you some spectral cards every time you defeat a blind

#

so, if i sold this joker, the ante goes down by 1

red flower
#

ok then you would do what turtle bean does but with antes

simple helm
#

yeah

red flower
#

and thats what i linked

simple helm
#

but without the decreasing element

red flower
#

yeah, the relevant part for you is add/remove from deck

simple helm
#

oh, i understand now

ripe kestrel
simple helm
#

ok, now it works :D

#

thx

#

now i need to figure out how to create specific spectral cards...

red flower
#

SMODS.add_card{ key = "c_key" }

simple helm
#

lol

red flower
#

you would replace c_key for the spectral key or use set = 'Spectral' for a random one

simple helm
#

ok, so the prefix for spectral cards is s_?

red flower
#

no, c_

simple helm
#

ok then

lament agate
#

how do you detect if the player has modded joker

maiden phoenix
#

Like by checking if G.P_CENTERS["joker_key"].original_mod exists

#

Iirc this field isn't on the card itself

lament agate
#

original_mod is supposed to be the id of the mod?

maiden phoenix
#

It contains data about the mod it's from, like prefix or optional features

#

Just noticed .mod exists too and seems to be the same thing?

lament agate
#

imma make sure im doing it right by checking @shell timber Jokers

#

i forgot their name tho

maiden phoenix
#

Triangle

#

or NotMario

lament agate
#

thats the jerma icon looking one right

maiden phoenix
#

Triangle is the oc nvm I think

#

Yea

lament agate
#

got it

#

tysmm

shell timber
#

do not do it my way

lament agate
#

im just looking on how you do it

lament agate
shell timber
#

jankman

#

so i guess the implementation fits

lament agate
#

name fits

#

okay yeah i can see why now

#

dear almighty

hardy viper
#

see the funny thing is that that would work

maiden phoenix
#

Actually ig G.P_CENTERS[card.config.center.key] is always true

hardy viper
#

what's wrong with card.config.center.mod

maiden phoenix
#

Would be weird if it wasn't

#

Oop yea

#

Don't copy me I'm a bad coder

lament agate
#

i was just about to

maiden phoenix
lament agate
#

if card.config.center.mod then

#

?

hardy viper
#

uhh im not sure

#

steamodded makes a "mod" for vanilla iirc

#

but i don't know if it's used there

#

hover over a vanilla joker and eval dp.hovered.config.center.mod

#

that'll answer that question

lament agate
#

rhanks

wintry solar
#

I don't think it is

hardy viper
#

figures

gaunt thistle
#

@red flower what's the performance difference between vanilla and vanillaremade?

hardy viper
#

i imagine it's written when a center is created through the smods API and vanilla jokers aren't

gaunt thistle
#

if you've ever tested

sonic cedar
wintry solar
#

update joker display I think

sonic cedar
#

got it

red flower
sonic cedar
#

oh true its the old probabiltiy jokerdisplay still oops

red flower
#

i still don't know how to recreate that crash

gaunt thistle
gaunt thistle
#

yeah haha

wintry solar
#

what would that involve?

sonic cedar
#

....buying fake scholar hard crashes my game...

wintry solar
#

fake scholar?

sonic cedar
#

it's a scholar designed to turn into ijiraq

#

you remember ijiraq right

sonic cedar
onyx sonnet
#

not sure if eremel knows what inscryption is, and even then that's not a helpful description

wintry solar
#

I do

sonic cedar
onyx sonnet
#

👍

sonic cedar
#

*they've, rather

#

are the logs kept in files when it comes to hard crashes?

red flower
#

yes

#

i had a stack overflow yesterday so i checked lol

wintry solar
#

is this the first fake one you've tried?

sonic cedar
wintry solar
#

I would guess that it's infinitely calling add_to_deck

#

but I don't know how you've set up the other stuff

sonic cedar
#

the add_to_deck is supposed to just add the alt key and a sticker

wintry solar
#

yes but if you infinitely call it the game will overflow and crash

sonic cedar
#

how do i infinitely call it? last line in the lovely log according to the files

wintry solar
#

well I don't know if you're calling it specifically in your ijiraq stuff

#

also you absolutely do not need to be doing your ace count in every calculate cycle

#

that could also be the problem

sonic cedar
#

should i move it to ace_count

#

sorry what

#

i mean to context.after

wintry solar
#

yes

#

100%

sonic cedar
#

bet

wintry solar
#

it is incredibly rare to do things outside of a context check

sonic cedar
#

i'll see if that fixes it
how can i spawn someone in a shop so i dont have to reroll hunt

#

does it have to be a tag thing

wintry solar
#

do eval dp.hovered:set_ability('joker_key_here')

sonic cedar
#

got it thanks

sonic cedar
wintry solar
#

yes

sonic cedar
#

thought so

#

ayyy no crash

#

that was it i guess

#

thanks eremel

wintry solar
#

out of interest, can you show me your Card:get_id function in the dumps?

wintry solar
#

I have no idea what's causing the infinite loop then 🤷‍♂️

#

unless you hook it somewhere

sonic cedar
#

but hey

#

no crash so im not complaining

#

nvm i tried to score

short girder
#

how do i generate a joker of a certain rarity

sonic cedar
#

is asserting destroy_cards bad

red flower
sonic cedar
sonic cedar
short girder
sonic cedar
#

wait no i literally forgot the ()

#

nvm

modern kindle
#

👋

red flower
#

hello dilliard

modern kindle
#

Hi N

foggy ginkgo
sonic cedar
#

hi dilly

modern kindle
#

Hi toma