#💻・modding-dev

1 messages · Page 404 of 1

stiff quiver
#

is thhere a way to make a joker that activates a random boss blind ability?

thorn furnace
#

How possible is this without patches

unborn bay
#

hook set ability then multiply ability table values recursively

thorn furnace
#

I keep bumping into it

pale holly
#

Hello, so i've tried to my joker only add a wheel of fortune but it can create them even if there's no space left in consumables, i tried to use something like G.consumable isn't something that exist apparently, G.consumables either as i tried, any idea maybe ?

        if context.joker_main then
            if math.random(1, 5) == 1 and #G.consumable.cards < G.consumables.config.card_limit then
                SMODS.add_card{
                    set = 'Tarot',
                    key = 'c_wheel_of_fortune',
                    skip_materialize = false,
                }
            end```
thorn furnace
pale holly
#

Thanks !

clever rose
#

is there a variable that stores the current mult value of the scoring hand?

thorn furnace
#

This is the second time now that I've made a new type of thing and the name's just refused to cooperate ;-;
It worked with my rarity by putting it inside of the globalization misc->dictionary and misc->labels but it didn't work here

timid star
#

why is it giving x2 mult multiple times??

clever rose
timid star
#

it's supposed to be doing nothing!!

clever rose
#

i was trying to compare the hand mult to if it was a square number

#

which would activate a joker

keen totem
#

how do i get if a card has a certain enhancement?

#

nvm i got it

#

SMODS.has_enhancement(card, "m_modprefix_key")

timid star
keen loom
#

how to make a joker unsellable?

daring fern
keen loom
keen totem
#

my beloved

daring fern
burnt quartz
#

How I can use the pseudorandom func?

daring fern
keen totem
#

needed to make seeds' randoms be the same

burnt quartz
#

for example:


pseudorandom("aply_seal_chance", 0, 4)

I want to get a 1/4 chance of aply a seal

#

that's right?

keen totem
#

min should be 1 then

#

not 0

#

i would do "[yourModPrefix]_ApplySealChance" as the seed tho

#

something

#

why shouldnt the min be 1

#

literally why

burnt quartz
#

If it is 1, isn't at least one seal always applied?

daring fern
keen totem
#

what is G.playing_cards

burnt quartz
#

Is all cards in the deck

#

I want to declare the applye_seal_chance in config.extra in the Joker, is that ok?

#

I got a error trying to read from there

daring fern
burnt quartz
#
config = { 
        extra = { 
            mult = 0,
            mult_per_card = 7,
            seal_apply_chance = 0.25,
            color ='Red',
            odds = 4,
        } 
    },
daring fern
burnt quartz
#
if pseudorandom("modprefix_apply_seal_chance") < G.GAME.probabilities.normal / card.ability.extra.odds

burnt quartz
#

The joker calculate, inside the calculate func

keen loom
#

just realized that e_negative displays as "+1 Joker slot", not "+1 consumable slot"

keen totem
#

something

#

do you know how infoqueues work

keen loom
#

yeah

keen totem
#

im talking to something

daring fern
keen totem
#

is e_negative that?

daring fern
keen totem
#

then why are you ? ing the fact that e_negative is +1 Joker slot

#

that is what it shows

daring fern
keen totem
#

then use words

#

? means several things as a react

#

which is why you really cant just react people to talk

keen loom
keen totem
#

yea

thorn furnace
#

mom dad please stop fighting

keen totem
#

anyways

#

i have this nice function i use for my mod

#

im like 90% sure smods already has it

#

but i already have it in place in too many situations for me to feel like changing it

#

yea its just find_card

#

but i like my version better

red flower
#

what does your version do

keen totem
#

it just gives you first card instead of a list

#

also i like my args better

keen loom
#

is it possible to make a consumable card retain after use? (it'll be destroyed after the hand is played)

keen totem
#

would in_pool consider a table of size 0 to be false?

red flower
#

no

wild escarp
#

How would I make a voucher allow wof to give negative edition?

daring fern
wild escarp
#

Is there some good examples of taking ownership out there?

#

Or would hooking or patching be easier?

daring fern
wild escarp
#

I don't even know how I'd begin to do that.

daring fern
faint yacht
#

Just add the check for if the voucher is redeemed as well.

#

if G.GAME.used_vouchers['v_modprefix_theaxolotl'] == true

wild escarp
#

Thanks!

hybrid shadow
#

is there a way for a joker to tell when a card is flipped face-down?

wild escarp
#

Is there an easy way to test vouchers with debugplus?

manic rune
#

go to shop, press 3 on a voucher in collection

red flower
#

if you mean at the moment it is flipped then no without hooking

hybrid shadow
daring fern
red flower
#

in my mod i just hook card:flip and create a context

hybrid shadow
#

how do i hook smth

manic rune
hybrid shadow
#

and how would i create a context with it

manic rune
#

SMODS.calculate_context({context_name = true})

wintry solar
keen totem
#

I don't feel like changing it in my code

wintry solar
#

That doesn’t answer the question, you said you like yours better

#

I’m just interested why

keen loom
#

does vanilla game not have xchips?

spice wadi
#

it does not but i think smods adds it

native zinc
#

can i do stuff to the played cards after end of round

#

with contexts

hybrid shadow
native zinc
#

actually its prolly just context.end_of_round

burnt quartz
#

inside the calc func my config.extra variables are nil

native zinc
#

and context.individual and context.cardarea == G.play ???

red flower
#

G.play doesn't exist at end of round

spice wadi
spice wadi
#

like SMODS.calculate_context is to create a context no?

burnt quartz
spice wadi
#

show the full code

hybrid shadow
red flower
#

no

spice wadi
#

look at what the other guy sent above

#

read it all and learn what each part does, hooking is very useful

red flower
#

this is the more simplified version but it can get fucked up by animations and stuff

keen loom
#

ok, i'm trying to use xchips, but it's dividing them???

spice wadi
#

show the code

keen loom
# spice wadi show the code
SMODS.Joker {
    key = 'bonustime',
    rarity = "crb_effect",
    --atlas = 'commons',
    --pos = { x = 0, y = 0 },
    --soul_pos = { x = 1, y = 0 },
    blueprint_compat = true,
    eternal_compat = true,
    perishable_compat = true,
    config = {
        unlocked = true,
        discovered = true,
        extra = {
            xchips = 0.03,
            xmult = 0.02,
        }
    },
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue+1] = { set = "Other", key = "effect_info" }
        return { vars = { card.ability.extra.xchips, card.ability.extra.xmult}}
    end,
    calculate = function(self, card, context) 
        -- X0.03 chips, X0.02 mult
        if context.joker_main then
            return {
                xchips = card.ability.extra.xchips,
                xmult = card.ability.extra.xmult
            }
        end
        -- destroys itself at end of round
        if context.end_of_round and context.cardarea == G.jokers then
            return {
                message = localize("effect_down"),
                card:start_dissolve()
            }
        end
    end
}```
red flower
#

you're giving X0.03 chips

normal crest
#

Well you're multiplying by 0.03

spice wadi
#

you mightve meant to do 1.03

normal crest
#

Also unlocked and discovered go outside of config

burnt quartz
red flower
# burnt quartz

did you get a new instance of the joker or restarted a run before testing?

burnt quartz
keen loom
spice wadi
spice wadi
wintry solar
hybrid shadow
red flower
#

yeah

normal crest
hybrid shadow
spice wadi
#

like to get context.flipped?

normal crest
#

you might want to put the mod prefix in your context flag to ensure it's unique

keen loom
red flower
spice wadi
hybrid shadow
normal crest
#

in the calculate_context call, just do smt like prefix_flipped = self

hybrid shadow
#

alr

#

is it possible to have a joker make a flipped card no longer face down

normal crest
#

you can flip a card at any time doing other_card:flip()

#

You'd just have to check if it's facing down before doing that

#

Which idk if there's an easy way

red flower
#

also if you want your joker to counteract blinds you can just use the smods context.stay_flipped im pretty sure

hybrid shadow
native zinc
#

help . what context

#

end_of_round and something presumedly but gr ... it doesn't have G.play

hybrid shadow
native zinc
#

that or i just rework this joker

normal crest
hybrid shadow
red flower
native zinc
#

nope

normal crest
#

Rip

native zinc
#

ye so that's hwy i'm asking

normal crest
#

Mark the first scoring card with a flag in context.before

#

Then find it in G.playing_cards or smt

red flower
#

thats what i would do yeah

high sinew
#

whats the sizing for art pxl used for suits?

#

71x95?

normal crest
native zinc
red flower
#

to do what lol

wicked leaf
#

modding too hard

normal crest
wintry solar
#

But the hand has gone by that time

#

This would be a standard destruction timing check

keen loom
#

how would i make the joker message appear when the card is destroyed? currently, it appears after it's destroyed

normal crest
wintry solar
#

Yeah I’m just saying what they should instead 🤣

keen loom
#
    key = 'bonustime',
    rarity = "crb_effect",
    --atlas = 'commons',
    --pos = { x = 0, y = 0 },
    --soul_pos = { x = 1, y = 0 },
    blueprint_compat = false,
    eternal_compat = false,
    perishable_compat = false,
    unlocked = true,
    discovered = true,
    config = {
        extra = {
            xchips = 1.5,
            xmult = 1.2,
        }
    },
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue+1] = { set = "Other", key = "effect_info" }
        return { vars = { card.ability.extra.xchips - 1, card.ability.extra.xmult - 1}}
    end,
    calculate = function(self, card, context) 
        -- X1.03 chips, X1.02 mult
        if context.joker_main then
            return {
                xchips = card.ability.extra.xchips,
                xmult = card.ability.extra.xmult
            }
        end
        -- destroys itself at end of round
        if context.end_of_round and context.cardarea == G.jokers then
            return {
                message = localize("effect_down"),
                card:start_dissolve()
            }
        end
    end
}```
daring fern
wintry solar
#

Use SMODS.destroy_cards(card) instead

red flower
#

could we have an argument to make destroy_cards not use an event

#

i started using it but it messed up my timings

native zinc
#

i don't need to do this check . i just need to buff the joker

normal crest
wintry solar
normal crest
#

(I haven't used it at all)

red flower
#

but if it's an event inside an event it ruins it

wintry solar
#

Can’t you just chain the events?

red flower
#

wdym

wintry solar
#

Put the event for the summoning stuff directly after the destroy cards call

red flower
#

yes thats what i do

wintry solar
#

And that doesn’t work?

red flower
#

rn I'm queuing start_dissolve > my event
if i do destroy_cards > my event it queues start_dissolve after my event

wintry solar
#

But thats not how events work 🤔

abstract umbra
#

im making a custom suit called critters it looks so goofy

keen loom
red flower
normal crest
#

no, let me guess, you don't have the SMODS version with destroy_cards

wintry solar
red flower
abstract umbra
burnt quartz
# spice wadi what line is the error at

Well, are some error like :
My joker don't show my seal description
The pseudorandom function don't
and stuff like that

The error logs make my think that is some error in the reference vars inside the config.extra

wintry solar
keen loom
normal crest
#

yeah you need to update SMODS

red flower
wintry solar
keen loom
normal crest
burnt quartz
keen loom
spice wadi
normal crest
# keen loom

Put the destroy_cards call before the return, change the cardarea check for and context.main_eval

normal crest
burnt quartz
#

The error must be the card.ability.extra.adds

red flower
#

<@&1133519078540185692>

#

thank you mods

normal crest
normal crest
#

that's cus your context.main_eval == G.jokers is always false, remove the == G.jokers part

nova eagle
#

how do i move this up to be in the correct spot?

raven wing
#

Hello! Would someone be able to explain/point me in the direction to understanding how pseudorandom works?

wintry solar
nova eagle
#

thx

burnt quartz
#

How I refer the seal that I defined in my mod? With the key?

daring fern
nova eagle
normal crest
raven wing
#

Sweet thank you!

burnt quartz
#

How I refer my joker's config variables in the calculate func? card.ability.variable?

hybrid shadow
normal crest
#

card.ability corresponds to the config in your joker

burnt quartz
#
config = {
        extra = {
            mult = 0,
            mult_per_card = 7,
            seal ='Succu_Pink',
            odds = 4,
        }
    },

then

calculate = function(x,x,x)
  ...
  card.ability.extra.seal
  ...
end

Right?

hybrid shadow
keen totem
#

how can i reference the round number?

inner finch
#
    key = "bi",
    loc_txt = {
        name = "Bi",
        label = "Bi",
        text = {
            "{C:chips}+#1#{} chips",
            "{C:mult}+#2#{} mult"
        }
    },

    shader = "ljc_bi",
    discovered = true,
    unlocked = true,
    config = { chips = 25, mult = 5 },
    in_shop = true,
    weight = 6,
    extra_cost = 6,
    apply_to_float = true,
    badge_colour = HEX('FFC0CB'),
    loc_vars = function(self)
        return { vars = { self.config.chips, self.config.mult } }
    end
    
})```
I can't figure out why, but nothing i put this edition on will have the edition activate. I feel like it'll be something really obvious once pointed out, but i can't find the problem
keen totem
#

i just custom made the chips and mult for my enhancement

#

i think its just bugged

#

something

#

i had the same issue

#

so i custom made the calc for it

burnt quartz
#

I want to reduce the card's chips value without change the card's skin, some like the strength taro but decrese the abse chips

keen totem
daring fern
keen totem
#

it works

burnt quartz
#

how I refer card.chips? not a joker, just a normal card chips

snow vale
#

how to check the poker hand currently being played?

zenith sage
#

if next(context.poker_hands['Hand']) to check for a specific one

#

like if next(context.poker_hands['Straight']) then...

zenith sage
#

like

for k, v in pairs(context.scoring_hand) do
  v.base.nominal

where v.base.nominal is the score of the card being iterated over

zenith sage
#

you need a context check

#

like

if context.cardarea == G.jokers then
    if context.before then
        if next(context.poker_hands['Pair']) then
#

needs to be in the before context, as in before it scores

snow vale
#

lemme try now

outer basalt
#

how does context.repetition work? I'm a bit confused on it

zenith sage
# snow vale lemme try now
calculate = function(self, card, context)
    if context.cardarea == G.jokers then
        if context.before then
            if next(context.poker_hands['Straight']) then
                card.ability.a_mult = card.ability.extra.mult_mod
        elseif not (context.before or context.after) then
            if card.ability.a_mult > 0 then
                return {
                    message = localize {type = 'variable', key = 'a_mult', vars = {card.ability.a_mult}},
                    mult_mod = card.ability.a_mult,
                    colour = G.C.MULT
                }
            end
daring fern
outer basalt
#

ooo

#

thank u

zenith sage
outer basalt
zenith sage
#
if context.repetition then
    if card.ability.extra.retriggers > 0 then
        return {
            message = localize('k_again_ex'),
            repetitions = card.ability.extra.retriggers,
            card = card
        }
    end
end
#

thats what i use on mine and it works, not sure why yours isnt

outer basalt
#

huh

daring fern
outer basalt
#

i basically snatched it from vanillaremades hack

outer basalt
#

Im getting this every time I play a 2 tho

zenith sage
# snow vale 😔

seems like it might be the > operator, because card.ability.a_mult is nil

tall wharf
snow vale
#

so um then

zenith sage
#

is it initialized?

#

as in

config = {
    a_mult = 0,
    extra = {
        mult_mod = 1
    },
},
snow vale
#

yeah

zenith sage
#

where 0 and 1 are whatever you want it to start as and whatever you want it to change by

snow vale
daring fern
snow vale
outer basalt
zenith sage
#

try removing the if card.ability.a_mult > 0 then ... end check

#

keep the elseif not (context.before or context.after and the return statement

#

if card.ability.a_mult is nil it will probably crash anyway

#

also

snow vale
#

okk

zenith sage
#

how might one index G.P_CARDS

#

i tried what it seems vanilla does with
G.P_CARDS['H'..'9'] and G.P_CARDS['H'..'_'..'9'] and G.P_CARDS[_suit..'_'.._rank]
where _suit = 'H' and _rank = '9'

#

oh and G.P_CARDS['H_9']

#

crashed every single time

red flower
#

H_9 should work

zenith sage
#

oh its because im stupid

#

forgot to take it out of the front = pseudorandom_element(G.P_CARDS['H'..'9'], pseudoseed('cert_fr')), i copied it from

#

im like "oh ill index it to make it not random" 🤦‍♂️

craggy knoll
#

Is there any way to make it so all players see same shop in multiplayer

#

not same shop list in ante

#

same shop every blind

twin basin
#

how do i set the sell value of a joker?

zenith sage
#

self:set_cost()

#

something like

card.ability.extra_value = self.ability.extra_value + self.ability.extra.value_mod
card:set_cost()
return {
    message = localize('k_val_up'),
    colour = G.C.MONEY
}
chrome widget
#

Anyone available who knows a little bit about love2d vertex shader stuff?

sleek cliff
#

im trying to do a thing like Devious or Clever Joker but with Royal Flush

red flower
#

royal flush is not a real poker hand iirc it's still a straight flush

sleek cliff
#

ah

red flower
#

maybe context.scoring_name == "Royal Flush" works but I'm not sure

sleek cliff
#

I'll try that

#

nope, damn,

#

same problem

red flower
#

uhhh

#

no idea

sleek cliff
#

when I remove the next it does NOTHING

red flower
#

i mean that makes sense because it's nil

twin basin
#

how do i set a joker negative as soon as it appears?

sleek cliff
#

edition = "e_negative"

wintry solar
daring fern
untold vigil
#

What does this mean?

daring fern
twin basin
untold vigil
keen loom
#

how do i add an extra slot to a joker?

daring fern
keen loom
daring fern
bold sleet
#

silly

bold sleet
#

)

zenith sage
#

how do you check if the played hand is only a specified hand as opposed to contains the specified hand

wintry solar
#

Check context.scoring_name

keen loom
bold sleet
#

When do you want to get that extra joker slot?

keen loom
#

basically, i don't want it to take a slot when it's obtained

bold sleet
#
add_to_deck = function (self, card, from_debuff)
  -- card gets added
end,
remove_from_deck = function (self, card, from_debuff)
  -- card gets deleted
end,
keen loom
daring fern
bold sleet
uncut cloud
#

hey does anyone know why this doesnt work with talisman still?
Ive been kinda struggling with this one specific joker and i dont know why

normal crest
#

G.GAME.dollars is a table with talisman

uncut cloud
#

ah

normal crest
#

so if I had to guess that's where your issue is

uncut cloud
#

thanks

#

that does not seem to be it

#

everything to G.GAME.dollars = card.ability.extra.ogmult works correctly

#

somehow its either of these lines

zenith sage
#

crash that says attempt to call 'ceil,' a nil value ceil(pseudorandom(pseudoseed('count')) * 4)

#

ceil is not a variable, its a standard lua function??

normal crest
#

Math.ceil

zenith sage
#

thank you

#

thats stupid

normal crest
red flower
normal crest
#

Oh yeah cus you're setting your card's ability to a talisman table

#

Maybe?

#

I don't like talisman

red flower
#

I think it's the return

normal crest
#

yeah they're returning a big num table thing

red flower
#

but idk all of that should work according to people but I didn't see it working

#

I don't like talisman

uncut cloud
# red flower I think it's the return

modifying the return and adding to_big's to convert them into tables still does like
nothing

I'll try and check out some other mod's codes to see if any mod i have has pulled this off before and hopefully that'll give me some insight as to what's going wrong

uncut cloud
#

okay i just

#

no no

#

i just did the strangest thing ever

#

and somehow that worked

#

this fixed it

red flower
#

i hate talisman

twin basin
#

how would i change the enhancements of all cards in my deck at once?

normal crest
# uncut cloud

it looks like you're not even returning a table anymore

uncut cloud
#

i dont know

#

it just works

daring fern
uncut cloud
uncut cloud
#

i

#

dont know how

untold vigil
daring fern
untold vigil
#

How could someone rename that so there is no errors with the atlas?

untold vigil
solid mesa
daring fern
uncut cloud
untold vigil
normal crest
untold vigil
hard mica
#

im making a deck that makes all the playing cards have the glass card enhancement but how can i replace the normal playing cards with the glass cards?

cerulean bane
#

cryptid has the glass subdeck of the enhancement deck

daring fern
normal crest
# untold vigil Like that

Something is wrong with your atlas then, maybe your file isn't a png? maybe the name isn't exactly "Blade.png" or smt

hard mica
normal crest
#

could be anything

vale plinth
#

can someone explain why this isnt working

untold vigil
#

Any solutions for this?

wintry solar
normal crest
solid mesa
red flower
untold vigil
vale plinth
normal crest
# untold vigil Yes

I don't know what it is then, i guess just restart your game if you haven't

red flower
untold vigil
#

I'm helping somebody else with the mod

wintry solar
daring fern
vale plinth
#

ohh thanks

wintry solar
#

these files are called Blade.png.png

untold vigil
vale plinth
umbral zodiac
#

is there a way to check if you aree in endless mode

daring fern
wintry solar
untold vigil
vale plinth
#

what is a arithmetic?

daring fern
normal crest
red flower
vale plinth
#

oh okay

#

thanks

normal crest
#

that is the best question i've seen in this channel ngl

bold sleet
#

fuck did I just cake into?

twin basin
#

how do i check for the rank of a card?

normal crest
daring fern
bold sleet
#

card.config.card.value?

normal crest
#

you mean card.base.value for the rank key

bold sleet
#

possibly

#

i yoinked that from a piece of code I found

#

wait no, I am almost certain I did it right

untold vigil
bold sleet
#

For some reason cards have a card field inside config

scarlet imp
#

trying to add my own consumable type, but I always get this crash:

red flower
untold vigil
normal crest
bold sleet
#

-# yummers, spanish text, again

untold vigil
normal crest
#

I mean that looks fine to me

hard mica
#

how can i check if the lucky enhancement has hit on a playing card? im trying to check if the 20+ mult or 20$ activates if not then it destroys the card lmao

red flower
#

card.lucky_trigger

bold sleet
#

owers fr?

hard mica
#

thanks

untold vigil
wintry solar
normal crest
#

I don't know what's wrong

tall wharf
#

ui failure

untold vigil
#

If I erase the .PNG it gives me the sab_sab error

scarlet imp
# wintry solar show your code
SMODS.ConsumableType {
    key = "tboi_reversed",
    default = "c_tboi_r_fool",
    primary_colour = HEX("89093a"),
    secondary_colour = HEX("89093a"),
    collection_rows = { 5, 6 },
    shop_rate = 2.5
}
untold vigil
#

The atlas error

solid mesa
red flower
solid mesa
#

uh

scarlet imp
# wintry solar and the consumable
SMODS.Consumable {
    key = "r_fool",
    set = "tboi_reversed",
    loc_txt = {
        name = "The Fool?",
        text = {
            "Creates the last",
            "{set.primary_colour}Reversed Tarot{} card",
            "used during this run,",
            "{s:0.8}{C:inactive}\"Let go and move on\""
        }
    },
    pos = { x = 0, y = 0 },
    atlas = "tboi_reversed_tarots",

    loc_vars = function(self, info_queue, card)
        return {
            vars = {
            }
        }
    end,

    use = function(self, card, area, copier)

    end,

    can_use = function(self, card)

    end
}

one of them

hard mica
tall wharf
#

ok it works now

red flower
bold sleet
#

shouldn't default be c_tboi_reversed_r_fool?

bold sleet
red flower
#

that's aikoyori

tall wharf
#

wtf do you mean strange creature

scarlet imp
sturdy compass
scarlet imp
bold sleet
#

then idk

normal crest
wintry solar
tall wharf
#

i could have just used

#

my joker card

#

but no i have to be quirky

red flower
#

it looks good

hard mica
red flower
#

yeah

#

im pretty sure lucky_trigger gets set before context.destroy_card

scarlet imp
normal crest
#

np

sonic cedar
#

back again catsmirk
-# with the same problem catsmirk

tall wharf
#

hi toma

red flower
#

what's the problem

sonic cedar
#

hi aiko

untold vigil
#

The files need to be called Blade.png for the atlas to get it

hard mica
sonic cedar
#

same thing as the last 2 times

red flower
sonic cedar
#

ok n

red flower
sonic cedar
#

maybe it's a file loading thing???????????

#

i know all three files load for sure

red flower
#

no

#
if context.destroy_card and context.destroy_card.lucky_trigger then
    return { remove = true }
end
untold vigil
#

Is there anything wrong with the atlas?

#

Cuz it gives something like this

tall wharf
wintry swallow
#

does anyone know the variable that gets the number of jokers currently owned?

tall wharf
#

#G.jokers.cards?

sonic cedar
tall wharf
sonic cedar
#

/pos mb

#

i am in the awe

untold vigil
tall wharf
normal crest
#

not Blade.png

tall wharf
wintry solar
#

this is possibly the strangest development set up I have seen

normal crest
#

Oh nvm, they changed their atlas definition too

red flower
normal crest
#

Looks like they were trying to solve an issue someone else had with their mod, but they just don't have the same mod at all

hard mica
red flower
#

oh you want it if it didn't hit?

hard mica
#

yeah

red flower
#

that's if it hit

hard mica
#

i tried doing it like thisbut it removes every card lmao

#

i forgot

#

individual

wintry solar
#

you need to check if the card is lucky too

normal crest
#

check if the card is lucky first

hard mica
#

how

normal crest
#

and SMODS.has_enhancement(context.destroy_card, 'm_lucky')

sonic cedar
# sonic cedar maybe it's a file loading thing???????????

is there something wrong with this file structure that would cause the joker's xmult gain not to trigger? is it because it's determined with global variables and i'm calling the globals wrong?

-# (is this too many images i just wanted to give proper context)

red flower
sonic cedar
#

th

#

that's it

hard mica
sonic cedar
#

?

red flower
#

no i dont think that's the problem but that will cause errors, the only return should be the last one

untold vigil
#

Told them

normal crest
hard mica
#

oops

red flower
tall wharf
#

:3

#

should i move the text to v_text so i can make it have colours when i localize it

red flower
#

v_text can have colors??

#

hmmm that is helpful

normal crest
hard mica
red flower
#

oh context.cardarea == G.play

hard mica
red flower
#

hmm then either i got the name of the value wrong or it's not set/it's cleared before then

wintry solar
#

yeah looks like it's cleared before then

hard mica
#

damn how can i fix it

wintry solar
#

set your own flag

hard mica
#

how?

wheat jewel
#

How can i edit the logo on the title screen

sonic cedar
wintry solar
#

yes you can absolutely do that in your joker

red flower
# hard mica how?

you need to check in context.individual as well and set a flag like card.no_lucky_hit and then check for that in destroy_card

high sinew
#

curious if i wanted to make a card like the fool but it can recreate last consumable used how would I do that?

normal crest
#

also this part here does not need to be in a hook, which was what I was referring to initially

wheat jewel
wintry solar
#

You've also already set up the custom context

sonic cedar
#

yeah,,,,,,

normal crest
#

then in your joker's calculate function you just do stuff when if context.chudhit then

daring fern
wheat jewel
daring fern
wheat jewel
#

like this?

red flower
paper wharf
#

Is there a way to remove certain bossess? Or to make them more rare

scarlet imp
#

how can I create a label for my custom consumable?

red flower
# sonic cedar are you fr

that's what i was telling you when i told you about the context btw lol
i just thought you were using the hook for something more complicated

paper wharf
sonic cedar
daring fern
normal crest
scarlet imp
#

I'm using loc_txt for the individual cards, but it doesn't show up even if I try to use the localization file instead
and in the consumables list the label doesn't show up at all obviously

wheat jewel
wheat jewel
#

could there also be a way to change the card that displays on the title screen too?

wheat jewel
#

instead of it being an ace or random locked joker?

wheat jewel
daring fern
wheat jewel
#

Oh damn

normal crest
red flower
# hard mica seomthing like this?

almost, inside has_enhancement it should be other_card and also you need to check if not context.other_card.lucky_trigger then set context.other_card.no_lucky_hit = true

then you check on destroy_card if it has the flag

wheat jewel
wintry solar
normal crest
red flower
#

oh yeah that also

normal crest
#

both context.individual and context.destroy_card is already called for every card

bold sleet
#

Cryptid does a bunch of weird shit.
-# I wouldn't suggest using cryptid as a reference

#

-# still, I don't know how to modify already existing menus and shit, so uh... yeah

red flower
#

use JoyousSpring as reference

red flower
sonic cedar
#

why is card red

#

what did i do oh god

red flower
bold sleet
normal crest
# sonic cedar like this?

when you call SMODS.calculate_context { chudhit = true } that is all the information available in that context

sonic cedar
#

oh

#

do i just

normal crest
#

besides blueprint I guess

#

which gets added if there is one

red flower
normal crest
#

you don't need the other stuff

red flower
# hard mica like this?

sorry i misread, you also need to change other_card to destroy_card in the second if condition

#

someone needs to do a tutorial on contexts

normal crest
red flower
#

no

#

the one at the bottom sorry

sonic cedar
#

since its in the joker

normal crest
#

yes yes I forgot that, you don't need the loop at all

#

only the stuff inside the if

sonic cedar
#

oh i dont even need the for loop at all ok

hard mica
bold sleet
normal crest
# hard mica its okay. like this?

you don't need the enhancement check here since you're already marking only lucky cards in the first place, you need to change context.other_card.no_lucky_hit for context.destroy_card.no_lucky_hit

hard mica
#

OOOH

#

im dumb

wintry solar
#

uhhh is pseudoseed broken or am I just remarkably unlucky?

red flower
sonic cedar
#

(ironic)

wintry solar
#

in 600 calls, I hit less than 0.4 23 times

normal crest
#

aren't you supposed to be using pseudorandom

wintry solar
#

oh fuck

#

I am

sonic cedar
bold sleet
#

idk, I just see contexts as when the fuck something happens when playing a run.

red flower
normal crest
#

contexts are just events, people need a tutorial on events

normal crest
wintry solar
#

oh that's a lot better

sonic cedar
bold sleet
#

tbh I don't understand half of the shit that is in a context.

normal crest
#

understandable, it all looks fine to me

sonic cedar
#

test time catsmirk

hard mica
#

how can i make this joker talk like jimbo once pressed with custom text n stuff?

bold sleet
#

poker_hands = poker_hands fuck does that mean under most of the contexts?!

snow vale
#

how can i know if hand contains a straight?

red flower
daring fern
red flower
#

like that ^

snow vale
daring fern
bold sleet
snow vale
snow vale
daring fern
snow vale
#

which one?

daring fern
sonic cedar
snow vale
daring fern
hard mica
#

i got a var i wanna use in my SMODS.back but not sure how tho , do i do context.other_Card.ability.extra.numberOfDestroyedCards?

normal crest
sonic cedar
#

it was by itself

snow vale
normal crest
snow vale
#

i tried to use locals

sonic cedar
#

nope

daring fern
snow vale
#

nvm

normal crest
sonic cedar
#

Let me walk my dog rq anf I’ve got you

normal crest
#

woof

tall wharf
wintry solar
#

I hope the character makes noises

tall wharf
#

😭

wintry solar
#

back.ability.extra.....

tall wharf
hard mica
tall wharf
hard mica
#

do i ignore it

wintry solar
#

delete the context.other_card bit

#

that's not where the thing you want is

hard mica
wintry solar
#

oh hang on it might not be ability for backs

#

back.effect.config.extra I think

untold vigil
#

How do I include more jokers in one mod? And make one create another one after an amount of rounds?

hard mica
bold sleet
#

-# zero regrets on that one.

untold vigil
tall wharf
#

is this good UI chat

daring fern
bold sleet
#

As someone else said, I sure hope it has funny audio for text.

#

also, just noticed the next button.

#

I may be blind, chat.

#

Actually, almost.

bold sleet
sonic cedar
normal crest
#

honestly idk why it could be triggering twice

sonic cedar
#

lowkey might keep it due to the unlikeliness of it happening

#

actually yeah no ill keep it

#

but it works thank you!!

normal crest
#

lol

#

i'm curious as to why it happens twice tho

#

if you find out lmk

untold vigil
wintry solar
#

is that definitely the only place you call calc_context(chudhit = true)?

tall wharf
wintry solar
# tall wharf

I think the next button should be inside the box, I missed it until it was pointed out on the first image

bold sleet
#

Literally me.

tall wharf
#

i mean

normal crest
#

Basically give the button a background

bold sleet
#

yummers

#

now center the button

normal crest
#

Honestly it looks better when it's below the box

bold sleet
#

or pan it to the left

normal crest
#

it should just have some kind of background to make it more visible with the buttons in the background

bold sleet
#

I wonder how weird the drawing thing looks without the smooth font.

normal crest
#

"drawing thing"

red flower
#

why are you so mean towards the drawing 😭

bold sleet
#

How do I call it?

tawdry shale
#

do we fw the custom presence

bold sleet
#

Strange green and white being found on the right side of the screen?!

chrome widget
#

oughhhh vertex shaders giving me a headache.......

wooden swift
#

i literally cannot find anything about how to make booster packs other than the SMODS page which is not really helpful im ngl do any of yall have like a template or smth

chrome widget
#

I've figured out how to get this to work, but only for textures whose drawn size is the exact same size as the full atlas

sonic cedar
#

it works ThumbsUpLol

bold sleet
#

"Nothing"
The 200 xmult just sitting there:

sonic cedar
#

would we say 2x mult is common or uncommon

humble pawn
wooden swift
tall wharf
bold sleet
normal crest
bold sleet
# tall wharf

Wow, now my blind eyes can actually notice the next button!

bold sleet
#

-# a very bad uncommon, but eh

hard mica
#

how can i add 10 playable cards at the end of an ante?

bold sleet
# tall wharf

Again, how off does the individual on the right look when the font is not super ultra HD?

bold sleet
#

Like, a joker that adds 10 cards to your deck at end of round?

hard mica
sonic cedar
hard mica
daring fern
tall wharf
bold sleet
bold sleet
#

then idk

tall wharf
bold sleet
#

yummers

hard mica
normal crest
#

if context.end_of_round and context.main_eval and G.GAME.blind.boss

hard mica
#

alright thank you

tall wharf
hard mica
sturdy compass
#

Well done aiko

bold sleet
tall wharf
#

that's from Entropy

bold sleet
#

kill murder, destroy, obliterate, desintegrate, turn into ashes

normal crest
hard mica
red flower
#

you're emplacing it in G.discard

digital niche
#

can i something like

"If X suit trigger something once, Y suit trigger something twice"?

normal crest
daring fern
digital niche
#

oh god

hard mica
hard mica
daring fern
hard mica
red flower
#

uhh maybe it's one of the other arguments that's messing it up

daring fern
# red flower wdym

I'm pretty sure they have a suit that is just 2 suits combined and they want it to trigger twice for jokers that check for the original suit.

red flower
#

i dont remember what they were right now, check the code for one of the spectrals

digital niche
# red flower wdym

like

greed joker gives +3 mult for diamonds

it would give +6 mult for fortune (custom suit)

red flower
#

probably not but maybe you can do something silly by hooking is_suit

#

this is not me telling you to ask me what that is tho

tight notch
#

this joker works mostly as expected, however if the first effect triggeres the second one won't(tested with oops all 6s). for example, if the first effect doesn't trigger, it's still possible for the second one to trigger. but if the first one triggers, even if both are guaranteed, the second effect won't activate.

normal crest
#

when you return the function ends there

tight notch
#

ah ok

hard mica
tight notch
#

so how do I make it like lucky card where both can trigger

normal crest
#

create a local variable before the first if that's just a table

#

then add stuff to the table in the ifs

#

then return that after both ifs

tight notch
#

?

#

ah nvm

#

i understand

normal crest
#

awesome

red flower
tight notch
#

would using a ret variable work with Xchips?

hard mica
red flower
tight notch
#

and how would i have that return both messages

red flower
#
return {
    message = "msg1",
    chips = value,
    extra = {
         message = "msg2",
         xchips = value2
    }
}
tight notch
#

as in like using the ret variable

red flower
#

extra = ret

tight notch
#

alr

tight notch
red flower
#

it depends on how you set it up

hard mica
hard mica
red flower
normal crest
#

that makes chance 2 dependant on chance1

red flower
#

oh are they independent

normal crest
#

yeah

#

maybe don't initialize ret as a table and just leave it as nil

#

then in the first chance you can set it to a table, in the 2nd one you check if it's not nil then add extra otherwhise just set it

red flower
#
if pseudorandom < chance1 then --pseudocode obviously 
return {
    message = "msg1",
    chips = value,
    extra = pseudorandom < chance2 and {
         message = "msg2",
         xchips = value2
    } or nil
}
elseif pseudorandom < chance2 then
     return  {
         message = "msg2",
         xchips = value2
    }
end
#

easy

normal crest
#

that works too

humble pawn
#

Okay so how would you check if a specific joker was sold?

daring fern
hard mica
normal crest
#

did you try G.hand

#

instead of G.deck

tight notch
red flower
#

the idea looks correct but there seem to be syntax errors

tight notch
#

that's what i was trying to ask about

red flower
#

i think you have an extra end?

#

hard to tell without seeing the whole function

tight notch
#

tht is the whole function

#

*that

#

the bottom part is not needed rn

#

i just have to copy this and put it there

#

nvm i see

untold vigil
#

Why the 2nd joker dosen't appear?

daring fern
untold vigil
humble pawn
#

Anyone know why my card are significantly darker in game version the original image? (Dont ask why its fries)

brazen tusk
#

decided to take a break from art and impement the wips, WoF is close to done for reference on the final product
-# deck is called Tarot of the Holy Spectrum and was made by Chase Voorhees, i like the deck a lot so am balatroing

untold vigil
#

How do I make a joker create a specific one after an ammount of rounds?

#

For example make the first one create the second one after an ammount of rounds

raven wing
#

I am trying to have this joker view every current joker in possession and keep count of how many are uncommon but I get an error saying that joker_card is a nil value.

faint yacht
#

#G.jokers.cards... yet you use G.joker_cards?

#

Also, instead of self.config, card.ability.

untold vigil
maiden phoenix
untold vigil
sonic cedar
#

forgot to ask earlier but with how i did the joker (hitting a probability successfully triggers an xmult gain) any possible future crossmods would have to use my context check with their probabilities right? asking so i can like leave a comment on the readme later

red flower
#

yes

sonic cedar
#

mhmmmmmmmmmmmm

untold vigil
#

Is this right for end of round effects? I wanted to make it so it creates a specific joker after a certain ammount of rounds

normal crest
#

if you have red underlined text you have syntax errors

#

also for end of round effects you want context.end_of_round and context.main_eval as your condition

#

and idk what you're inventing with that last return statement

untold vigil
untold vigil
red flower
#

no what I mean is that the variable context contains those things inside it

wild escarp
#

How would I change this so the joker starts with perishable?

G.E_MANAGER:add_event(Event({
    func = function()
    local card = SMODS.create_card({
        set = 'Joker',
        area = G.jokers,
        key = 'j_dna',
        
    })
    card:add_to_deck()
    G.jokers:emplace(card)
    return true
    end
}))
vale glen
#

Add a perishable compat?

#

Not sure if you need additional code tho, never tried it

#

Looking at existing perishable jokers might help

wild escarp
#

This is a deck, I want this to start you off with a perishable dna.

vale glen
#

Mmh... Dunno enough about perishable things to comment, apologies

wild escarp
#

I'm guessing it's just another parameter I need to add, not sure what it might be though.

vale glen
#

Does this work?

wild escarp
#

Yep, that works!

vale glen
#

Oooh, there's a whole function for it

#

yey

north swallow
#

anyone know why this blind crashes the game when i try to redeem the cash prize?

scenic loom
#

Are there any vanilla examples of jokers that add editions to playing cards? Trying to make a joker that adds editions to all cards played

buoyant crag
#

only similar example in vanilla is midas mask pretty sure, but that does enhancement

hard mica
#

if anyone knows how to fix this issue , would be appreciated

maiden phoenix
#

Try adding those before the emplace

                            _card:add_to_deck()
                            G.deck.config.card_limit = G.deck.config.card_limit + 1
                            table.insert(G.playing_cards, _card)
plush depot
#

can someone tell my why its not working

#

in vsc

vale glen
#

Why is there a comma after the rounded closing parentheses

hybrid shadow
plush depot
hybrid shadow
#

i just had a series of events that ill write out here bc its not that long

joker gives +12 mult each time context.stay_flipped is called in current state

start blind > +96 mult (12x 8 cards drawn) > discard 5, draw 5 in return > +216 (120 added, 12x 10 cards (5 to deck, 5 to hand))

hybrid shadow
untold vigil
#

How do I make that a Joker gives mult/triggers when a specific rank and suit scores?

red flower
hybrid shadow
untold vigil
red flower
red flower
untold vigil
hybrid shadow
red flower
#

yes

untold vigil
#

How do I make it so it creates a joker and destroys itself after a certain amount of rounds?

hybrid shadow
# red flower yes

(not indenting here because discord wont let me use tab on mobile) would this work

local face_down = 0
for k, v in pairs(G.hand_drawn) do
if v:face_down(dunno if this is right) then
face_down = face_down + 1
end
end```
?
untold vigil
#

Like the Space Ace joker i made creates a joker then destroys itself

red flower
untold vigil
hybrid shadow
red flower
#

yeah

vale glen
vale glen
#

Keep it in the calculate function, not loc_vars. loc_vars is for the tooltip and card description when hovered, not the card's calculating code.

#

You're using SMODS.create_card(), not SMODS.add_card().

hybrid shadow
# red flower yeah

card works as intended now (was even able to get my upgrade message to return in an additional if face_down >=1 then statement), thank you

simple arch
#

Does anyone know where to find the documentation for the code!?

red flower
humble pawn
#

Anyone know how to make this so it copies the consumable that was just used rather than the previous one? (Currently its using the fool's code)

#
    key = 'duplicator',
    loc_txt = {
        name = 'Duplicator',
        text = {
          '{C:green}1/4{} Chance to Duplicate',
          '{C:attention}Consumables{} on use'
        },
    },
    atlas = 'Jokers',
    rarity = 1,
    cost = 2,
    unlocked = true,
    discovered = true,
    blueprint_compat = false,
    eternal_compat = false,
    perishable_compat = false,
    pos = {x = 12, y = 0},
    calculate = function(self,card,context)
        if context.using_consumeable and math.random(1,4) > 0 then
            G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.4, func = function()
                play_sound('timpani')
                local card = create_card('Tarot_Planet', G.consumeables, nil, nil, nil, nil, G.GAME.current_tarot_planet, 'fool')
                card:add_to_deck()
                G.consumeables:emplace(card)
            return true end }))
            delay(0.6)
        end
    end
}```
vale glen
#

Now you have two separate calculate functions, and the contexts are confusing. Imma just go back to modding Axy's own stuff, this is a lot. ^^;

humble pawn
# untold vigil Like this?

If you're trying to add a joker and remove the joker that added it you could just do this

return {
  G.jokers:remove_card(card),
  card:remove(),
  card = nil,
  SMODS.add_card {
    key = 'j_[modprefix]_[jokerkey]'
  }
}
untold vigil
#

Man im sure tired

#

And I still have to know how to trigger after 3 rounds

humble pawn
#
  if context.individual and context.cardarea == G.play then
    return {
      message = {
        "Fusion Queen!",
        "Evolution King"
      },
      message_card = card,
      G.jokers:remove_card(card),
      card:remove(),
      card = nil,
      SMODS.add_card {
        key = 'j_sab_spade_king'
      }
    }
  end

assuming i did it all right this should be what you would be looking for

humble pawn
# untold vigil

Your calculate function seems to end with a '}' when it should end with just 'end'

#

assuming thats what the problem is

humble pawn
regal ether
#

whats the repo with the vanilla joker recreations again

untold vigil
#

I'd better go rest, an entire day modding wears me out

timid zinc
#

I read that custom saved from death messages were added to SMODS but i don't see anything that says how

#

Okay i was right, just set saved to a string

daring fern
runic pecan
#

What is the difference between (not _c) and G.C.RED or G.C.GREEN and _c and G.C.GREEN or G.C.RED?

stiff quiver
#

hi i wanted to make a pair of jokers that work similarly to gros michel and cavendish but when i looked at their code all i could find is this (G.GAME.pool_flags.gros_michel_extinct = true) is this what makes one dissappear from the pool and add the other? and if so how would i make my own? i dont fully understand it

stiff quiver
#

i didnt know that existed, thanks!

sturdy compass
#

VanillaRemade is your friend JeremyLove

sonic cedar
#

another lost soul led to the light,,, i did good val_Heh

sturdy compass
#

LMFAO

sonic cedar
#

LMAO

sonic cedar
#

heh,,,,,, i have,,,, nothing val_Heh

thorn furnace
#

How would I go about finding the key of the currently used consumable (in context.consumeable)

sturdy compass
thorn furnace
#

thank u :3

sturdy compass
#

Mhm!

hybrid shadow
#

is the context for entering a boss blind just context.setting_boss_blind?

sturdy compass
#

Not that specific, but there is a context.blind attribute when context.setting_blind is true that you can check