#💻・modding-dev

1 messages · Page 118 of 1

zealous glen
#

I was tagging grassy

wooden nexus
#

Ditpyrc be like

valid forge
#

seems it has been done before 😭

wooden nexus
#

It’s fine if done before!

#

Make all of it

valid forge
#

fair enough

#

oddly enough before I saw this

#

I already added some extra modifiers to the Carnelian and Obsidian decks

nova finch
#

can anyone help me with making card enhancements? I'm trying to make one that has a chance to destroy itself like glass cards

wooden nexus
wooden nexus
#

Notepad++

elder vapor
wooden nexus
#

You can search a folder’s worth of files

winged nest
#

does anyone have any ideas

wooden nexus
nova finch
nova finch
#

i was able to make the enhancement exist just not able to get the calculate to work

nova finch
wooden nexus
#

n++ does the searching for you

cedar stream
winged nest
#

well yeah but like

#

it only crashes when i register a joker from the link i sent.

#

its literally just joker2 with the mult changed as a testing thing

SMODS.Joker {
  key = 'japan',
  loc_txt = {
    name = 'Japan',
    text = {
      "{C:mult}+#1# {} Mult"
    }
  },
  config = { extra = { mult = 40000 } },
  loc_vars = function(self, info_queue, card)
    return { vars = { card.ability.extra.mult } }
  end,
  rarity = "what",
  atlas = 'THAW',
  pos = { x = 0, y = 0 },
  cost = 2,
  calculate = function(self, card, context)
    if context.joker_main then
      return {
        mult_mod = card.ability.extra.mult,
        message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } }
      }
    end
  end
}
#

oh it happens when i do rarity = "what"

cedar stream
#

yea, if you have not made it a rarity in your mod it will do that

winged nest
#

its right above

cedar stream
#

try removing pools

#

if it doesnt work then undo the deleteing of it and add the "weight" of the rarity showing up

rancid perch
#

so i want to make a persona 5 royal tycoon deck but

#

is tehre any way to get HD/4k card faces in

cedar stream
edgy reef
supple folio
#

how do i get the rarity of a joker in the joker area?

rancid perch
#

i want to make one based on a game's cards but they loo horrendus cmpressed

cedar stream
#

if you down scale the image to about the size of like 4 playing cards from balatro then modify the colors some then downscale again to the card size

rancid perch
#

i mean no way to make it good looking/hq?

cedar stream
rancid perch
#

no way to make the engine handle/run hq/4k images?

cedar stream
#

not to my knoledge

rancid perch
#

darn

#

example of the quality

#

compressing really ruins it

cedar stream
#

let me see if i cant work some magic on it,i am in a vc in the cryptid discord if you want to watch

zealous glen
#

For some reason when it depends on the time to select a random skin, it always selects a random skin, despite the selected index changing and the number of options being greater than 1

rancid perch
#

if you can get it to work without any compression id be most pleased

#

im making an entire set

zealous glen
rancid perch
#

i dont mind downscaling them

valid forge
zealous glen
#

I think @mellow sable found out the upper limit when trying to make animation atlii

rancid perch
#

this one is 3264 x 4440 tho so

#

xD

#

id def ened to downscale it

wooden nexus
valid forge
#

I might do a reskin for that

faint yacht
#

...huh, I thought some shader shenanigans would be needed for translucent cards.

valid forge
#

really though Checkered staying as is is perfectly fine by me

random sleet
#

nah you can just have transparency

faint yacht
#

Makes it all the easier, yeah.

rancid perch
#

lemme know if you get something drago

random sleet
#

if you want to do any cool fog/fade effects, then you do, yeah

#

that looks cooooooool omg

valid forge
#

hypothetically I could make Checkered+ and Tartan+ which would just be making those a bit less flush spammy

#

...could make it so all the odds turn into evens and vice versa, so you can't make straight flushes, but it's easier to make full houses 👀

faint yacht
# faint yacht Makes it all the easier, yeah.

This was not worth unpacking the archives within win32 of PSO2 stuff that ended up as 911946 files totalling up to 217GB, trying to find the actual UI parts. Ended up using green screening shenanigans.

random sleet
#

asset ripping is a passion project

zealous glen
faint yacht
#

I've not touched the other folders... I'll need to move this off to my server box. But yeah, now I can properly do the intended PSO2 reference, though the current iteration of the Joker will need to be renamed to something else, alongside a design change.

winged nest
radiant halo
#

any clue how i would do this but with a joker from my mod instead?

faint yacht
#

j_modprefix_jokerkey

radiant halo
#

i tried that, didnt work

#

lemme double check tho maybe i simply typod

#

ok yup, guess i typod lol

#

ty

supple folio
#

Is there documentation for creating a deck on the newest Steamodded version?

faint yacht
supple folio
#

Thank you!

#

Is there a way to reload the game without quitting and reopening it every time?

violet void
#

holding M

supple folio
#

I see. Thanks a bunch!

violet void
#

personally I find that annoying since it types in vs code after closing lol

supple folio
#

Oh, I see what you're talking about

#

that is annoying lol

frosty dock
#

fair enough, it also interferes with a debugplus keybind if you have the ctrl setting off

#

might be worth changing

cedar stream
livid tapir
cedar stream
#

but still ned more down scale

livid tapir
tepid crow
livid tapir
rancid perch
cedar stream
#

that is a difficult thing to explain in text

livid tapir
#

its peak

violet void
crisp coral
#

it's worse for me because i have autosave on focus loss LOL

livid tapir
frosty dock
#

so since I get to decide, no

tepid crow
#

yeah just thought about some laptop and (weird) keyboards

livid tapir
#

id do ctrl +f5 epersonally
lemme actually do that

frosty dock
#

I have a weird keyboard personally

tepid crow
#

you've mentioned it before 😄

livid tapir
#

but how do i change the M keybind tho

frosty dock
#

ctrl+f5 would be a hold through 3 keypresses for me

livid tapir
#

oh*

tepid crow
#

eh that's not even that bad tbh

frosty dock
#

could be worse but eh

tepid crow
#

how we feeling about ctrl+T

cedar stream
frosty dock
#

ctrl+T seems fine

#

on release or short hold duration?

rancid perch
#

and no channel vc here caled cryptid

violet void
frosty dock
#

I'd have to see if it's used by debugplus

cedar stream
tepid crow
frosty dock
#

aight

tepid crow
#

(and as far as I can tell it's not used by debugplus)

frosty dock
#

as per the keys.txt it's not used

rancid perch
#

ah

livid tapir
#

so do i change keys.txt

frosty dock
#

so that's a debugplus doc

livid tapir
#

ye

frosty dock
#

no

#

it's in steamodded's code

livid tapir
#

o ok

wintry solar
#

I've changed it to [ on my end

livid tapir
#

theres multiple files, is it config.lua?

frosty dock
#

tbh we could have a config option for it

livid tapir
#

ikr

frosty dock
#

search for SMODS.Keybind in src/game_object.lua

#

the last occurrence in the file should be the definition of the keybind

livid tapir
#

ok thx

nocturne garnet
#

yippee cryptid unlocks

violet void
wintry solar
#
[[patches]]
[patches.pattern]
target = 'engine/controller.lua'
pattern = 'if key == "r" and not G.SETTINGS.paused then'
position = 'at'
match_indent = true
payload = '''
if key == '[' then
    SMODS.save_all_config()
    SMODS.restart_game()
elseif key == "r" and not G.SETTINGS.paused then
'''
livid tapir
#

btw do i enter ctrl as a string like 'ctrl'

violet void
#

ah I see. Smods is also doing a lovely patch

tidal steppe
#

I killed balatro, it died right after this blind. crashed with no report XD

violet void
cosmic notch
#
    key = 'ConstellationBooster1',
    atlas = 'Booster',
    pos = { x = 0, y = 0 },
    loc_txt = {
        name = 'Constellation Pack',
        text = {
            'Choose {C:attention}1{} of up to',
            '{C:attention}3{} {C:purple}Constellation{} cards to',
            'be used immediately'
        }

    },
    discovered = true,
    weight = 1,
    cost = 4,
    group_key = 'ConstellationConsumableType'
}```

so ive got the booster made, it appears in shop but crashes when I open it
livid tapir
#

btw was i right to make doubled joker a rare? or should it be a different rarity (creates a duplicate of the joker to left of this one if theres room, -1 joker slots as long as this joker exists in your joker area or whatever)

cosmic notch
#

oh wait, im missing config

#

whoop

violet void
cosmic notch
#

nope still crashes

livid tapir
#

so you could make some op combos with it

tidal steppe
#
SMODS.Back{
    key = "antimatterDeck",
    pos = {x = 1, y = 0},
    unlocked = false,
    discovered = false,
    loc_txt = {
        name = "Antimatter",
        text ={
            "Start with 1 {C:attention}Joker slot",
            "Gain 1 per {C:attention}Ante."            
        },
    },
    apply = function()
        G.GAME.starting_params.joker_slots = 1
    end,
    trigger_effect = function(self, args)
        if args.context == "eval" and G.GAME.last_blind and G.GAME.last_blind.boss then
            G.jokers.config.card_limit = G.jokers.config.card_limit + 1
        end
    end,
    check_for_unlock = function(self, args)
        if args.type == "ante_up" and args.ante == 9 and #G.jokers.cards >= 8 then
            unlock_card(self)
        end
    end
}

My deck is working quite well, BUT how do i add the unlock requirment text? rn the text zone is blank. you don't know how to unlock it

violet void
#

thats strong lol
permanent -1 joker slot per duplication

livid tapir
#

ngl

violet void
#

high risk high value

livid tapir
#

i just wanna know if you think i should change it to legendary/other rarity or keep it as rare

violet void
#

legendary

livid tapir
#

ok

#

the cost? like 15-20?

violet void
#

you cant buy legendaries, but since their sell value is 10 it should be 20

tidal steppe
#

voucher idea: you can now buy legendaries from the shop

livid tapir
#

oh
wait so why does perkeo have a cost

violet void
livid tapir
#

ah ok

#

makes sense

violet void
#

at least I think so

livid tapir
#

thx

#

do you think Joker Lottery should also be legendary? id guess not since its just
Destroy joker to left of this card, create a random joker of the same rarity (if there is space (for edge cases like if the destroyed joker was a negative))
i mean its rare rn

merry raven
#

Is there a way to make it so that if I select a card with a specific Enhancement, it disables the "Play Hand" button?

tidal steppe
valid forge
#

just looks interesting

tidal steppe
#

thx

livid tapir
#

imma try to remake the art for doubled joker
try to make it fit legendaries more

violet void
#

do you think Rare is justified for this joker

livid tapir
violet void
#

anything that uses create_card

livid tapir
#

id say its more of a uncommon

violet void
#

(for playing cards)

livid tapir
#

but im not very experienced so dont listen to me balatrojoker

violet void
#

yeah I also feel like its a bit underwhelming like packs are likely to give any of the 4 suits

#

maybe it should increase by 1 the amount you can pick
-# and leave it rare

livid tapir
#

also that unique thing
what does it mean when added
itll just self destruct when what

violet void
#

yes previous copy self destructs

livid tapir
livid tapir
violet void
merry raven
#

I need an idea for an Enhancement card that's pretty anti-gameplay but gives a significant buff

livid tapir
#

so you cant stack it

livid tapir
violet void
radiant halo
#

so im almost done all the jokers of my mod but im still iffy on the effect of this specific joker. it just feels kinda boring

violet void
#

its pretty useful

radiant halo
#

if anyone has suggestions on something cooler im open to them

#

it is but its just kinda dull

violet void
#

like you always get straight flushes and flush houses

#

its good
-# almost too good

radiant halo
#

oh no like, it changes the ancient joker selected suit

#

i could do that though

violet void
#

its probably broken

#

like baronmime level of broken

radiant halo
#

maybe i do that but make it so you always have to play 5 cards, forcing you into flush/straight flushes

#

or a different number of cards

#

ill have to workshop it

solid surge
#

hello! im new to modding balatro, and i got two questions in mind:

  1. if i could, how could i get a joker that multiplies chips to work?
    2, for future reference) how would i get chance systems on jokers to work? like chance to self-destruct or chance to create a tarot / planet / spectral?
radiant halo
#

for 1) you can do ```
chip_mod = mod_chips((Xchips-1) * hand_chips)

#

not sure about 2 though sorry

radiant halo
solid surge
#

awesome

#

thanks for the assistance

sonic sandal
#

What's the best way to make an enhancement that destroys itself after the hand is finished calculating a la glass cards?

#

I've been trying 'context.destroying_card', but that doesn't seem to be working here - but then again I may just not be quite understanding it

elder vapor
tidal steppe
merry raven
#

Something that goes against how the player plays
No discards, unable to play hands, destroying cards etc
Not to worry though I already figured something out

violet void
tidal steppe
#

thanks for the warning. if you have succeded could you share your progress as i wanted to make a stone like enhancement myself. if not, am i able to help? work together

merry raven
#
calculate = function(self, card, context, effect)
        if context.cardarea == G.play and context.scoring then
            if next(context.poker_hands['Full House']) or
               next(context.poker_hands['Four of a Kind']) or 
               next(context.poker_hands['Straight Flush']) or
               next(context.poker_hands['Five of a Kind']) or
               next(context.poker_hands['Flush House']) or
               next(context.poker_hands['Flush Five']) or
               next(context.poker_hands['Royal Flush']) then
                
                card.ability.extra.primed = true
                card_eval_status_text(card, 'extra', nil, nil, nil, {
                    message = "Primed!",
                    sound = "fm_finalized",
                    colour = G.C.BLACK
                })
            end
        end

Trying to make an Enhancement's flag (primed) turn to true once it detects one of those hands while it is in the holding hand, but it's not able to detect any played hands. Any help?

violet void
#

context.scoring_hand maybe

lusty pollen
violet void
wintry solar
merry raven
#

I missed that out whoops

#

context.scoring_hand doesn't really work either

wintry solar
#

I think you want context.individual

merry raven
#

Does it replace anything in the if case?

#

Or just pile it on with an and

violet void
wintry solar
#

replace the scoring one

#

so you have if context.cardarea == G.play and context.individual then

violet void
#

isnt context.individual used if you are checking every card like with walkie talkie

wintry solar
#

sorry, if context.cardarea == G.play and not context.individual and not context.repetition then

#

I should get some sleep 😴

merry raven
#

What does not context.repetition do again? Is it a retrigger like Red Seals or something

wintry solar
#

context.repetition checks for retriggers on that object, yeah

#

I wonder if we should name each context and build the names into better calc 2 🤔

merry raven
merry raven
wintry solar
#

throw a and context.poker_hands in there

violet void
#

where is the logic that checks if the enhanched card is held in hand

livid tapir
#

i think i cooked with the resprite for Doubled Joker

#

what do yall think

wintry swallow
#

it needs to say "joker" on it

merry raven
livid tapir
wintry swallow
#

ah it's a legendary

#

i see

wintry swallow
#

also no, every joker in the game has "joker" on it somewhere

#

except legendaries

violet void
#

til that one also has it

livid tapir
wintry swallow
#

yes it does

#

hold on

livid tapir
#

oh it does

violet void
#

its the first character of each word

livid tapir
#

OH

#

thats clever

#

lol

violet void
#

fr

wintry swallow
#

lol yeah

livid tapir
violet void
#

looks like a military related joker

wintry solar
livid tapir
#

LOL

#

it does tho 💀

wintry swallow
#

smeared joker is the only joker i can think of that doesn't have the word "joker" legibly on it

#

and that's because smeared joker's art is just a mess

livid tapir
#

yeah its all smeared balatrojoker

wintry swallow
#

remember guys the driver's license expires later this month

livid tapir
sturdy compass
#

Does anybody here happen to know how animating joker art works? I've tried asking in Cryptid but I didn't get much help there. Here's the code I wrote to handle it but I'm clearly missing something since it's not ticking/sending console messages

merry raven
# wintry solar if you throw some print messages in can you see where it's getting to?
calculate = function(self, card, context, effect)
        if context.cardarea == G.play and not context.individual and not context.repetition and context.poker_hands then
            print("Card area checked")
            if next(context.poker_hands['Full House']) or
            next(context.poker_hands['Four of a Kind']) or 
            next(context.poker_hands['Straight Flush']) or
            next(context.poker_hands['Five of a Kind']) or
            next(context.poker_hands['Flush House']) or
            next(context.poker_hands['Flush Five']) or
            next(context.poker_hands['Royal Flush']) then
                print("Poker hand checked")
                card.ability.extra.primed = true
                print("Primed")
                card_eval_status_text(card, 'extra', nil, nil, nil, {
                    message = "Primed!",
                    sound = "fm_finalized",
                    colour = G.C.BLACK
                })
                print("Message displayed")
            end
        end

Ho shit, it's not even printing any of the messages at all in the console

wintry solar
#

this might sound dumb, but is this definitely in the right enhancement?

sturdy compass
#

Haven't even heard of that

violet void
#

it has some animated jokers

sturdy compass
#

Six Suits?

violet void
#

no its just called aura or aure I dont recall precisely

sturdy compass
#

hmm ok

merry raven
#

Just checked

#

I'll double check the console

livid tapir
#

listening to the main menu music while spriting is such a vibe fr

wintry swallow
#

listening to the main music while doing anything tbh

livid tapir
#

ye

violet void
merry raven
#

Nothing in the console either hmm

sturdy compass
violet void
#

sorry I misunderstood then

sturdy compass
#

no worries

livid tapir
#

imo

violet void
#

jimbo is going places

livid tapir
#

resprite done lez go

livid tapir
#

btw the noise plugin im using is called YANP

tidal steppe
normal crest
#

you put unlocked = false

#

so it'll be locked

#

wait I think I misunderstood

normal crest
tidal steppe
#

oh thx, i thought it might be smth like that, but wasnt sure

livid tapir
#

oh i should prob do that too

merry raven
#
calculate = function(self, card, context, effect)
        if context.cardarea == G.play and not context.individual and not context.repetition then
            if context.scoring_name and (
               context.scoring_name == 'Full House' or
               context.scoring_name == 'Four of a Kind' or
               context.scoring_name == 'Straight Flush' or
               context.scoring_name == 'Five of a Kind' or
               context.scoring_name == 'Flush House' or
               context.scoring_name == 'Flush Five' or
               context.scoring_name == 'Royal Flush') then
               
                card.ability.extra.primed = true
                card_eval_status_text(card, 'extra', nil, nil, nil, {
                    message = "Primed!",
                    sound = "fm_finalized",
                    colour = G.C.BLACK
                })
            end
        end

This is killing me, I still couldn't figure out how to make this Enhancement card fetch the hand type when scored

livid tapir
#

hm how should i make doubled joker be obtained by
bc its a legendary so it doesnt go on the shop

random sleet
#

then the soul will get it

livid tapir
#

ah ok cool

#

imma make a deck in my mod where you start with doubled joker lol

#

btw is there an smods wiki thing showing all of the formatting things you can do in loc_txt text (like {C:attention})

normal crest
#

do you mean all the colors

merry raven
#

Is there a way to fetch the number of the current round?

livid tapir
violet void
#

wrong reply but ok

livid tapir
normal crest
merry raven
#

So if i want Spade's colour in my text field do I just do {C:spades}

normal crest
#

yeah

merry raven
#

Sick it works

normal crest
royal carbon
#

I keep getting this crash on startup and I can't figure out why?

#

Here's the code I think is at fault, there's probably a bunch wrong with it but idk how to see that yet

#

I've noticed an errant reference to the no-longer-existing new_card but fixing that doesn't solve the issue

#

Found it. I mistyped the modded rarity on a joker

livid tapir
#

this is what doubled joker looks like in game (after setting soul_pos)

random sleet
royal carbon
#

👍

#

Hm, it still won't let me use it thinkvi no idea how to be clearer

random sleet
#

j_mod_joker

royal carbon
#

Where do I put that, when I'm making the card or when I'm checking the highlighted?

random sleet
#

when you're checking the key

royal carbon
#

So like G.j_mod_joker.highlighted[1].key or what

random sleet
#

no in the key you're checking

royal carbon
#

if G.jokers.highlighted[1].key == "j_bf_hoaxe"? That isn't how I have it formatted in the joker itself, but it isn't working either way

livid tapir
#

is it context.before to do smth before scoring

humble gale
#

is there any way, with SMODS.Keybind, to check the mouse position when the button is pressed?

#

and also get the joker if one is being hovered over

livid tapir
livid tapir
#

ye

merry raven
#

Is there a context that checks when a card has entered your hand from the deck

livid tapir
#

you could look through its code to see how

sturdy compass
sturdy compass
#

It'd be moving in real time if it were accurate :(

humble gale
#

thx anyways

gilded blaze
#

I've never thought I would do this but

#

screw it, we ball

#

I do need people to provide translations tho

royal carbon
lethal pumice
#

tutorial

cerulean rose
#

for some reason incantation refuses to stack my consumable type

SMODS.ConsumableType({
    key = "index",
    primary_colour = HEX("FFFFFF"),
    secondary_colour = HEX("FF0000"),
    shop_rate = 4,
    can_stack = true,
    can_divide = true,
    loc_txt = {},
})
sturdy compass
livid tapir
rough furnace
#

you can just use the method DebugPlus (and the game) uses to get the current hovered element

#

if G.CONTROLLER.hovering.target and G.CONTROLLER.hovering.target:is(Card) then

#

oh I meant to reply

rough furnace
#

the target will be the card

#

then you can check card.ability.set == 'Joker'

tidal steppe
merry raven
#

Yep

#

dark_edition shimmers between two colours

tidal steppe
pine moss
#

Hi it's me again. It's telling me card.ability.extra.chips doesn't exist

-- Jamminhead Joker
SMODS.Joker {
    atlas = 'Estrocards',
    key = 'jammin',
    pos = { x = 4, y = 1 },
    rarity = 3,
    immutable = true,
    config = { extra = { chips = 1, chip_mod = 0 } },
    loc_vars = function(self, info_queue, center)
        info_queue[#info_queue + 1] = G.P_CENTERS.m_est_transgender
        return { vars = { center.ability.extra.chips, center.ability.extra.chip_mod } }
    end,
    loc_txt = {
        ['en-us'] = {
            name = 'Jammin Joker',
            text = {"Gain {C:chips}#2# Chips{} every time",
                    "{C:attention}Transgender{} card scored",
                    "when {C:attention}Chips added >= 77{}",
                    "make every card in deck {C:attention}Transgender{}",
                    "{C:inactive}(Currently{} {C:chips}+#1#{} {C:inactive}Chips){}"
                    }
        },
    },
    calculate = function(self, card, context)
        if context.individual then
            if context.cardarea == G.play then
                if SMODS.has_enhancement(context.other_card, 'm_est_transgender') then
                    card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chip_mod -- Error line
                    return {
                        message = localize('k_upgrade_ex'),
                        card = card,
                        colour = G.C.CHIPS
                    }
                end
            end
        end

        if context.cardarea == G.jokers then
            if not context.before and not context.after then
                return {
                    message = localize{type='variable',key='a_chips',vars={card.ability.extra.chips}},
                    chip_mod = card.ability.extra.chips, 
                    colour = G.C.CHIPS,
                    card = card
                }
            end
        end
    end,
}
#

So true digital detective, I 🤷 as well

rough furnace
#

did you add the chips after creating the joker (if it's from a save)?

sturdy compass
#

That's a pretty plausible explanation to the issue

rough furnace
#

it's also the most common reason for this

sturdy compass
#

For future reference, it's usually good practice to start a new run any time you've made changes, as continued runs can have bad data

rough furnace
#

at least destory and spawn a new copy of your joker

sturdy compass
#

mfw I never thought of that because muscle memory lol

radiant halo
#

friends

#

it is with great pleasure that i announce i have finished functionality for all 20 of my jokers

sturdy compass
#

Huge

#

I just finished my 30th. We up here hitting milestones as newbies 💪

radiant halo
#

hell yeah 💪💪💪

#

now for the hard part

#

art

sturdy compass
#

I'm so glad I don't have to do that lmfao

radiant halo
#

i got friends who are helping but i actually do wanna improve at art myself

sturdy compass
#

Still plenty more to do

radiant halo
#

yeah those are great

#

how many are you planning to do?

sturdy compass
#

That's a good looking question

tidal steppe
#

how do i detect when cards are removed from the deck? how do i also then check the deck size(full)?

    check_for_unlock = function(self, args)
        print(args.type)
    end

args.type does nothing when i hang man delete cards

random sleet
#

oh man im only on 18 jokers....
6 vouchers, 9 tarot, 10 planets, 10 spectrals, 14 oddities, 6 joker stamps, a set of 8 booster packs, 4 tags, 2 blinds, 6 decks, 16 hands, and 17 suits also tho

radiant halo
tidal steppe
#

im on 2 jokers and 1 deck XD

sturdy compass
#

You're doing VERY fine eyeswtf

random sleet
#

yeah 16 new poker hands

tidal steppe
radiant halo
#

ohh sorry misread

random sleet
#

though really its 6 new hands, two of which have flush/spectrum alternate versions and one has flush/spectrum house and flush/spectrum five overlap too

#

a Blaze (5 face cards), a Skeet (2, 5, 9, plus two other ranks between 2 and 9), and the little/big dog/cat hands, which are each basically almost-Straights with particular high/low cards with no pairs; little dog is 7-2, big dog is A-9, little cat is 8-3, big cat is K-8

radiant halo
#

that must be fun to program

random sleet
#

hands are actually pretty simple once you understand how the system works

#

its just abit weird

sturdy compass
#

I'm gonna eventually need to learn how to make hands cuz this is a deck I wanna make

radiant halo
sturdy compass
random sleet
#

there was a mod a long while back called Hand of Six, that still around?

tidal steppe
#

instead of super flush why not blush XD

#

or we need a blush joker

#

instead of super straight: horseshoe gay XD

radiant halo
#

anyone do a hanafuda deck yet?

sturdy compass
#

Actually I'm considering sending the doc of ideas my artist and I have for this mod if y'all wanna take a looksee. Just no stealing >:(

random sleet
#

i'll only steal if i steal

sturdy compass
radiant halo
#

im too lazy to steal dw

sturdy compass
#

If anything I hope it gives a little inspiration for some of y’all too

tidal steppe
#

some bangin ideas!

sturdy compass
#

Thank ya. Almost all credit goes to my artist lmao

#

I’m not too insanely creative ngl but I can at least code good

tidal steppe
#

i got the ideas and code but not the art :/

sturdy compass
#

Rather unfortunate

tidal steppe
#

i love all the food synergies, maybe i can offload one of my ideas to you to implement with your existing?

radiant halo
#

im curious, how easy is it to do all the food joker stuff

#

do you have to check each one individually

sturdy compass
tidal steppe
radiant halo
#

im sorry

sturdy compass
#

Worth it honestly

sturdy compass
tidal steppe
#

fair

sturdy compass
#

Glad y’all like the ideas though. Makes it really feel like this project will be worthwhile

radiant halo
#

theyre very good

#

love the art for streaker lmao

sturdy compass
#

The artist sent an earlier iteration of it in a gc and someone else asked for a more defined buttocks, and thus here we are lol

tidal steppe
#

XD

radiant halo
#

they know what they want

#

also, did you ever get the shader for 4d joker working?

tidal steppe
#

i love soil joker

sturdy compass
tidal steppe
#

well i love many of these

sturdy compass
#

I just couldn’t apply it to the Soul sprite for whatever reason. Probably due to how it’s rendered

radiant halo
#

oh what, howd you do it then

#

im asking cause i wanna do something similar, just vertical

sturdy compass
#

The same way Jimball does it, Game update ticks

#

Gimme a sec I can get you a link to it

radiant halo
#

please

sturdy compass
radiant halo
#

asesomeeee tysm

sturdy compass
#

Np

#

It’s a little hard to wrap your head around but once you get it it’s somewhat simple

radiant halo
#

i have no clue what jimball is so thats throwing me off a bit

sturdy compass
#

This guy

radiant halo
#

OOOO

sturdy compass
#

It’s basically just iterating through a spritesheet

radiant halo
#

i see ok

#

would you know how it defining Game:update here works?

#

i feel like that should conflict with Game:update in game.lua

sturdy compass
#

I’m not 100% in the know of how that works, just that it does lmao

storm oar
#

it gets the old Game:update function first

#

local upd = Game.update and then the first line of the new Game:update is upd(self, dt)

#

it's hooking the function and adding more to the update loop

livid tapir
storm oar
#

i had to do some function hooks for my mod to add to the game over screen and also to prevent discards of certain cards

radiant halo
#

thats actually a real clever way to do animation

#

but also a bit annoying

sturdy compass
#

A tad

#

But hey it woiks

cosmic notch
#

one of these days i need to just get lost in the sauce (the sauce being the modding documentation) and actually finish my half baked mod

#

ive added a handful of husks of ideas, 13 consumables, 8 jokers (i have more ideas just cant get them balanced right)

#

but none of them do anything because i cant wrap my head around the configs for cards

sturdy compass
#

What exactly is the roadblock?

cosmic notch
#

just having an idea that isnt in the game so i try and find other examples, to no avail (not because they dont exist, but simply because i cant find what im looking for) and then sit and stare at the crash log for 10 minutes before moving on to something else

#

or i get really invested in making a design for a card and then when it gets to the point of actually implementing it i just lose steam

radiant halo
#

i mean no shot i would have made as much progress as i did without asking around here

sturdy compass
#

Same here. This channel is a massive resource

storm oar
#

honestly though i kinda wish there was a modding help forum where people could ask questions, and instead of having a ton of people asking the same questions, just direct them to a forum post

radiant halo
#

the code is a mess made by one guy who thought the game would sell like 6 copies so who the hells gonna see the source code, and the smods api, while helpful, does lack some documentation

sturdy compass
#

That’d be kinda nice for more involved questions, but smaller ones I think are fine for the most part

cosmic notch
#

yeah, because i dont always want to ask a bunch of questions that have already been answered and i just dont know where they are

radiant halo
cosmic notch
#

plus, if i cant figure out the solution after the first answer i hate coming back and asking for clarification

sturdy compass
#

Coding is not a straightforward process. Following up is nothing to be ashamed of

gaunt thistle
#

I think forums would be a good idea

cosmic notch
#
SMODS.Booster{
    key = 'ConstellationBooster1',
    atlas = 'Booster',
    pos = { x = 0, y = 0 },
    loc_txt = {
        name = 'Constellation Pack',
        text = {
            'Choose {C:attention}1{} of up to',
            '{C:attention}3{} {C:purple}Constellation{} cards to',
            'be used immediately'
        }

    },
    discovered = true,
    config = { extra = 3, choose = 1},
    weight = 1,
    cost = 4,
    group_key = 'ConstellationConsumableType'
}

On that note... whenever i open this booster my game crashes

sturdy compass
#

What does the crash report say? Top of the screen

cosmic notch
#

hold on ill go recreate

sturdy compass
#

Do you have access to the game’s source code? Because that error is occurring within the base game’s card.lua file

#

It’d be worth looking at that line to help diagnose

storm oar
#

specifically you need to look at the code dumped by lovely since it'll have any patches added

radiant halo
#

this is what it is in vanilla card.lua

sturdy compass
#

I didn’t consider lovely patches whoopsies lol

random sleet
#

if steamodded has loaded then looking at vanilla line numbers is useless

#

always look at lovely dumps

cosmic notch
#

which can be found...

random sleet
#

mods/lovely/dumps/

cosmic notch
storm oar
#

ah

#

so uh

#

i think its not creating the card?

#

idk

radiant halo
cosmic notch
#

well i need it to do that i think

storm oar
#

okay

#

so, its a different card type, yeah?

cosmic notch
#

yes

storm oar
#

you'd need to patch the thing

cosmic notch
#

would i do that within my own lua file

sturdy compass
#

No

#

You’d have to make a lovely.toml file in your mod root

radiant halo
storm oar
#

do you have the new consumable type set up as well?

radiant halo
#

you should have installed it when you set up mods

sturdy compass
radiant halo
#

haha

cosmic notch
# storm oar do you have the new consumable type set up as well?
SMODS.ConsumableType{
    key = 'ConstellationConsumableType',

    collection_rows = {6,7},
    primary_colour = G.C.PURPLE,
    secondary_colour = G.C.DARK_EDITION,
    loc_txt = {
        collection = 'Constellation Cards',
        name = 'Constellations',
        undiscovered = {
            name = 'Not Discovered',
            text = {'Purchase or use', 'this card in an', 'unseeded run to', 'learn what it does'}
        }
    },
}

yes

#

they exist

random sleet
#

so it just.... has no idea what cards you want it to make

storm oar
#

oh then you don't need a patch

#

i was thinking you'd need to patch the function for boosters

random sleet
#

remember that you can always assign functions to variables and reuse them for repeat boosters

storm oar
#

but yeah that's way easier

random sleet
radiant halo
#

you really need to manually make a create_card function?

random sleet
#

i think so?

cosmic notch
random sleet
#

:)

radiant halo
#

ive not made consumables or boosters yet but i feel like that shouldnt be needed

random sleet
#

idk i've made a whole suit levelling system so

radiant halo
#

you could even do create_card = function(self, card) then blahlblahblah endin smods.booster itself if you prefer that way

#

but defining it on the highest level allows for its reuse

cosmic notch
#

alright, im going in for the test drive

radiant halo
#

gl

livid tapir
#

btw whats that mod that had the safeguard joker called (if its publicly available)

cosmic notch
#

nvm, one sec i need to increase the weight again

normal crest
#

Any idea what the meaning behind 'b' and 'k' before the actual key in the localization files mean?

radiant halo
cosmic notch
#

already got it

radiant halo
#

sick

storm oar
#

are events blocking by default?

radiant halo
#

cant you summon the pack from the collection screen then?

random sleet
cosmic notch
#

dont know all the features of debugplus

radiant halo
#

hold tab in game

cosmic notch
#

well, it creashed when it appeared this time

radiant halo
#

hey thats progress

cosmic notch
livid tapir
cosmic notch
#

good to know

random sleet
livid tapir
#

yessss

random sleet
#

also is this the most hand name

radiant halo
cosmic notch
#

yes?

radiant halo
#

you sound unsure lmao

cosmic notch
#

well its in there

#

7 times

radiant halo
#

may i see?

cosmic notch
#

the jokers i was doing started as ripped from a youtube tutorial

#

hence the comments

true jasper
radiant halo
cosmic notch
#

it also hasnt crashed until the booster showed up

#

and those jokers were the first thing in the file

#

ok, so update. It crashes when i hover the pack

#

ow wait, im a dumbass

radiant halo
#

oh?

cosmic notch
#

i put the name = 'Constellation Pack', inside of the text = line

#

simple ctrl v error

radiant halo
#

oh lmao

cosmic notch
#

new error, yipee

#

culling the pool?

#

in the function create_card does the key_append need to be something specific

radiant halo
cosmic notch
#

we're all learning

radiant halo
#

its weird tho, i feel if you added everything in here it should be fine

cosmic notch
#

thats what i assumed too

radiant halo
#

can i see an example of smods.consumable?

cosmic notch
#

it doesnt have a config yet because im not focusing on that part rn

radiant halo
#

shouldnt need it yet

cosmic notch
#

i want my things in the game before i make them do things

radiant halo
#

yeah im really not sure what's going wrong

cosmic notch
#

well that makes two of us

radiant halo
#

you said the issue was when you hovered over the pack?

cosmic notch
radiant halo
#

oh right

cosmic notch
#

now it crashes when it tries to spawn cards

radiant halo
#

oh

#

does it have a loc_vars? the booster

#

and when you hover does the text correctly say like "choose 1 of 3"

cosmic notch
#

i know its missing a texture. im working on it

radiant halo
#

dw lol all my textures are temps too

#

OHHHH

#

i think its cause youre using the vanilla create_card, which wont work with any custom stuff

#

you need SMODS.create_card()

cosmic notch
radiant halo
#

lmao

#

i did the exact same thing

cosmic notch
#

so if just toss in SMODS. in front of create cards it should do something different

#

WOO, new error

radiant halo
#

you need to put all the vars int a single table

#

just add {} and, assuming the values line up right, you should be good

cosmic notch
#

ah

#

wheremst should i place it

radiant halo
#

easier and clearer to do {set="constellation", area = G.pack_cards, etc....} though

cosmic notch
#

ill give it a shot

radiant halo
#

again the orders may be off, and also it might be iffy about the set name

cosmic notch
#

nope same error

radiant halo
#

ok back to loc_var

cosmic notch
#

wait, hold on

#

if the first one is calling the set, then i am once again made the joker

#

ConstellationConsumableType

#

is my set

#

not just constellation

radiant halo
#

still an error when opening right?

cosmic notch
#

well hold on i havent tried this new fix

#

because previously it was looking for the Constellation set, but that doesnt exist... its ConstellationConsumableType

radiant halo
#

ah that might be it

cosmic notch
#

nvm, still crashes

cosmic notch
radiant halo
#

still when opening?

cosmic notch
#

yeah

radiant halo
#

can you comment out loc_text.text and trying hovering over it? i want to see if it crashes

cosmic notch
radiant halo
#

you shouldnt need all of it

#

i suspect theres an issue retriving the number of cards to pull and let you choose. try adding loc_vars = function(self, info_queue, card) return { vars = { card.config.center.config.choose, card.ability.extra } } end, to the booster code

cosmic notch
#

ok

#

still the same crash message

radiant halo
#

ok just for testing, put "tarot" as the first argument to see if itll make tarot cards

cosmic notch
#

nope, thats not it... hmm

radiant halo
#

oh actually capital T Tarot

#

its picky

cosmic notch
#

i put it caps

#

i went back to check the documentation

radiant halo
#

im pretty sure that wont work yea

#

this is vanilla code but you can see it doesnt account for case

#

and i think smods version is the same

#

alright i gotta sleep but essentially, if that works and it spawns tarots, the issue is with the key youre giving it and you might have to mess with the casing or add the prefix of you mod (if you have one) or even maybe prepend "c_" for consumable. if it doesnt then tbh im outta ideas. gl

cosmic notch
#

alright, well thank you for trying, i appreciate it

#

ill try and figure it out

radiant halo
#

ofc

elder vapor
#

does this sound good

fallow lava
#

I have no context other than this picture, seems crazy

elder vapor
#

tl;dr my mod adds a new card modifier (or however you wanna call it) and i'm working on a new version

#

this is one of the ideas i had for a new gem slot

tidal steppe
tidal steppe
random sleet
tidal steppe
#

flush of hearts with lvl1 means +25chips and +5mult 0_0
thats very good

random sleet
#

yes

tidal steppe
#

and mult applying on cards is nice cuz of glass/etc

#

how does one upgrade suits?

random sleet
#

planet cards

tidal steppe
#

noice

random sleet
storm oar
#

okay i think i finally got this working right entirely now

tidal steppe
#

so i play chekered deck, level up jupiter and spade planet

random sleet
#

artwork by one Jevonn

elder vapor
fallow lava
random sleet
#

thanks its not mine

storm oar
#

ended up having issues where sometimes the joker wouldn't be added and the cards not changed but i hooked start_run and added some stuff to it

#

that fixed the issues

merry raven
#

Holy shit that's amazing, really love the Joker spawning animation

storm oar
#

planning to make it even fancier later on

#

mostly was just trying to get a base for that set up for later

merry raven
#
calculate = function(self, card, context, effect)
        if context.cardarea == G.play and context.individual and not context.repetition then
            if G.play and G.play.cards then
                for _, playedCard in ipairs(G.play.cards) do
                    if playedCard.config.center == G.P_CENTERS.m_fm_slow or
                       playedCard.config.center == G.P_CENTERS.m_fm_freeze or
                       playedCard.config.center == G.P_CENTERS.m_fm_shatter then
                        card.ability.extra.money = card.ability.extra.money + 3
                        card_eval_status_text(card, 'extra', nil, nil, nil, {
                            message = "Cracked!",
                            sound = "fm_cracked",
                            colour = G.C.MONEY
                        })
                    end
                end
            end
        end
    
        ...

Man I can't figure out how to fix this [SMODS FATEMAKER "main.lua"]:787: bad argument #1 to 'ipairs' (table expected, got nil)

Any insights? This Enhancement stores money in itself whenever those specific cards are played

storm oar
#

i'd assume line 787 is the start of that for loop?

#

or is that somewhere else?

#

cause it's saying that G.play.cards is nil if it's that, but it can't be nil because that checks if it exists before doing the for loop

merry raven
#

Lemme recheck

#

Now it's 785... on a different Enhancement
for i, playedCard in ipairs(context.scoring_name) do

The one I'm having problems with is called Shatter, it detects Shatter, Slow and Freeze cards to gain money when they are played. This line 785 is on Freeze

#

Lemme try with different cards

storm oar
#

scoring_name isn't a table

#

context.scoring_hand is the cards

merry raven
#

Line 720 brings us to Slow, at this line for i, playedCard in ipairs(context.scoring_name) do

#

I see hmm

storm oar
#

if you're trying to find the names of hands within the played hand it's context.poker_hands

merry raven
#

No I'm trying to find those specific Enhancements that are played, ones that start with m_fm

storm oar
#

yeah ok so then change it to scoring_hand

#

scoring_name is a string which is the name of the played hand type

merry raven
#

Righto

#

Alright at least it didn't crash now, but somehow it's just not able to add money to the Shatter card
But I'll fix that on my own later, gotta head out
Thanks for the help though!

wintry swallow
#

what's the debug to skip a pack

pine moss
#

How do I get a list of played non-scoring cards?

#

context.unscoring, found it

storm oar
#

does that exist?

#

i'm not seeing anything like that in the code anywhere

pine moss
#

It might not, I found it in the Cryptid code for green seal

storm oar
#

maybe its a cryptid thing

elder vapor
#

is there a context for when a card is drawn to hand?

pine moss
storm oar
#

are you trying to do something for each card individually?

#

or something that actually needs a list of only unscoring cards?

pine moss
tidal steppe
#

ooh

pine moss
#

Can i get a list of all played cards?

storm oar
#

context.full_hand

pine moss
#

thanks

pine moss
tidal steppe
#

i feel dumb. how do i trigger an effect on joker addition and removal, i thought it was apply, but its not working

    apply = function(self, card, context)
        G.GAME.modifiers.money_per_discard = G.GAME.modifiers.money_per_discard + 1
        print("Money per discard: " .. G.GAME.modifiers.money_per_discard)
    end
wintry solar
#

add_to_deck/remove_from_deck

tidal steppe
#

even tho jokers arent added to deck?

random sleet
#

owning something is having it in your deck

tidal steppe
# wintry solar `add_to_deck`/`remove_from_deck`

thank you, that worked 🙂
You woldnt happen to know how to manipulate money recieved from discards like in green deck? the above i tried isnt working. G.GAME.modifiers.money_per_discard is nil

night pagoda
#

I have a Joker with custom size that I set using card.T.w and card.T.h in Joker's set_ability, but upon copying the Joker it's sprite gets "stretched" across it's size instead of adjusting the canvas (the copy gets stretched; but if I reload, it will be restored back to its normal look)

Not sure what to do, any ideas?

wintry solar
storm oar
crisp coral
night pagoda
crisp coral
#

it's the set_sprites one

night pagoda
#

This modifies the sprite child, not the card itself

#

yes

crisp coral
#

you can modify the size there too

#

oh! i guess just copy the set_ability stuff to set_sprites

night pagoda
#

I use multiplication to do custom scaling so it just resizes two times and becomes worse lol

crisp coral
#

heck

frosty dock
#

just remake the sprite with new dimensions in set_sprites instead of modifying it maybe?

night pagoda
#

I want to determine what happens upon copying that doesn't happen upon loading or initial creation (or vice versa)

#

because if I just create the card as-is, it looks as expected

#

and in the collection too, and upon reloading the saved game all the broken ones fix

random sleet
#

does your method of sprite resizing persist through save/loading

#

oh dang nice :0 i couldnt figure that out when i tried

night pagoda
#

and if I reload, they act like nothing happened

random sleet
#

i really wish we could just put in the size of the joker and smods would handle it ^^;

night pagoda
#

yes 😔

merry raven
random sleet
#

gee firch how come jimbo lets you have two jokers

frosty dock
random sleet
#

oh no its smodsmn everyone duck and hide

frosty dock
#

🦆

#

m?why hide though

night pagoda
random sleet
#

idk because i insinuated smods should have more features :P

frosty dock
#

nah that's a good idea

frosty dock
#

scaling for stuff like square joker or photograph are all over the place

random sleet
#

yeah i tried to implement it back when i was makin oddityapi and i got stuck on getting it to scale the sprite correctly after reloads and in other niche situations

#

... these issues persist to my current version as well sigh

night pagoda
#

what's delay_sprites?

#

I mean I can see where it's used but is there any point in using it in joker's setup

wintry solar
#

No not in joker setup

#

I think it’s solely used for timing enhancement sprite updates correctly

random sleet
#

i wonder if thats related to why my finicky custom centers for my suits have been weirder since updating

night pagoda
#

uhmmm, almost?

night pagoda
#

okay card.children.center:reset() did the thing

#

the full thing

#

is there any reason why thunk made the achievement notification not an actual card object

narrow pendant
#

Because thunk

nocturne garnet
night pagoda
crisp coral
#

+9 Mult, 1 from the tape

#

/j

nocturne garnet
#

PEAK...

night pagoda
#

it's not going to have linked jokers lmao

#

cryptid is right next apartment sir

#

(also happy birthday)

nocturne garnet
#

thank

merry raven
#

Cryptid's source code is cryptic as hell

frosty dock
#

it's in the fucking name

crisp coral
#

if so, lobcorp's source code will give you a lobotomy

nocturne garnet
open bone
#

Hey, I was wondering if there was a way to have a Voucher effect always be active as a sort of passive effect?
I know of the Update function but that runs on every frame, so I figure it's not a good idea to use it with a voucher- Gist of the idea is a voucher that gives you say, 5$, if you manage to one-shot a blind (aka the fire effect spawns)?

I'm wondering if it wouldn't be easier to inject a check at the end of a blind that gives you money if you one shot a blind upon redeeming the voucher, but I'm not really sure how to achieve that 😩

languid mirage
#

if you follow vanilla style, then you'd have something like G.GAME.boss_oneshot_reward = 5 and then check at the end of the blind if that amount is set (or > 0) and if boss got oneshotted, then give amount of dollars from that parameter

#

in voucher redeem function you'd just have to set that value

open bone
#

I haven't messed around with adding new g.game values or hooking into preexisting functions like the end of blind yet so I gotta learn now lmao

languid mirage
#

well anything you add to G.GAME will get automatically saved iirc

#

other than functions/files

open bone
#

yeah I assume that's why my test voucher did just fine keeping the +1 to hand upon reloading the save

languid mirage
#

also by end of blind I meant payout function

open bone
#

Oh yeah I figure that's what I should hook into

#

ok there we go
upon purchasing the voucher i have it set to true and print itself
then i reloaded the save and did an eval in the console

#

so I know the variable works
now i just gotta find the payout function to hook that new stuff into it lmao

wintry solar
#

You can also just check if the voucher is redeemed rather than setting a variable if this is the only effect you have that will use the variable

open bone
#

Oh true

mighty granite
#

i don't think thunk removed it

languid mirage
earnest creek
#

Can I get a bit of help here? I'm trying to make a joker that upon selling and highlighting a single card in hand, transforms 15 other cards into it. on the Steamodded Wiki, I didn't really find anything that could help me here

    if context.selling_self and not context.blueprint and #G.hand.highlighted == 1 then
      local selected_card = G.hand.highlighted[1]
      for i = 1, 15 do
        local random_index = math.random(2, #context.full_hand) -- Start from 2 to avoid selecting the first card
        local random_card = context.full_hand[random_index]

        -- Transform the random card into the selected card
        local transformcard = copy_card(selected_card)
        transformcard:start_materialize()
        transformcard:add_to_deck()
        G.hand:emplace(transformcard)
        G.playing_card = (G.playing_card and G.playing_card + 1) or 1
        table.insert(G.playing_cards, transformcard)
      end
    end
  end```
#

It just does nothing when I sell the joker

wintry solar
storm oar
storm oar
#

and do you want it to guarantee 15 different cards, or randomly be able to pick the same?

dreamy thunder
#

how can i make a deck which adds a joker to your hand on start?

earnest creek
storm oar
#

you're wanting to change cards to the selected one right?

#

or add cards?

earnest creek
#

change cards

storm oar
#

so then if it randomly picks the same card, it wouldn't guarantee it would change 15 cards

earnest creek
#

oh, that's what you mean. yeah, I'd want to guarantee 15 different cards

lapis mirage
#

how would I make something not show up in shop and packs? I've tried G.GAME.banned_keys and SMODS.remove_pool but but items still showup

storm oar
#

what is it? a joker, voucher?

lapis mirage
#

packs, planets and vouchers

storm oar
#

outside of the SMODS.(whatever) call, you only need this once
local function nopool() return false end

then add in_pool = nopool to the item

#

or you could add other conditions that allow it to be in the pool

storm oar
# earnest creek oh, that's what you mean. yeah, I'd want to guarantee 15 different cards
calculate = function(self, card, context)
    local cards_to_change={}
    if context.selling_self and not context.blueprint and #G.hand.highlighted == 1 then
      local selected_card = G.hand.highlighted[1]
      local maxCards=#G.playing_cards>15 and 15 or #G.playing_cards-1
      for i = 1, maxCards do
        local is_in_list=true
        local random_index = math.random(1, #G.playing_cards)
        while is_in_list do
          local found=false
          for _,v in ipairs(cards_to_change) do
            if v==random_index or G.playing_cards[v]==selected_card then found=true end
          end
          if not found then 
            is_in_list=false 
            cards_to_change[#cards_to_change+1]=random_index
          else
            random_index=math.random(1, #G.playing_cards)
          end
        end
      end
      for _,v in ipairs(cards_to_change) do
        copy_card(selected_card,G.playing_cards[v])
      end
    end
  end

not the most efficient way but i think that'll work?

frosty dock
storm oar
#

ah sometimes i forget local

earnest creek
#

I can't thank you enough.

storm oar
#

huh that's weird

#

does it like just freeze?

#

or actually crash?

earnest creek
#

hold on, I'll make a recording

storm oar
#

ah that's very weird

#

there's probably a better way to do that loop but i can't think enough right now

earnest creek
#

Yeah I'll see what I can do. Thank you so much again for the help, I didn't even really know where to start.

storm oar
#

wait, i just thought of something and probably would be better than a while loop

earnest creek
#

?

#

Okay, It works now with a few chaanges I made but it adds them to my hand O.o

storm oar
#

ah do you want it to exclude cards in hand?

#

cause it's just possibly changing the whole deck including ones already in the hand

earnest creek
#

no, no. I thought It'd add them to the deck, not to the hand.

storm oar
#

yeah since it's using G.playing_cards, that's the entire deck including in hand, played, and discarded, you could change that to G.deck.cards to only change cards in the deck currently

earnest creek
#

which is arguably weaker because it adds cards, not transform

storm oar
#

ah hm

merry raven
#

Finally figured out how to solve ghost cards on destroying Enhancements

[[patches]]
[patches.pattern]
target = "functions/state_events.lua"
pattern = "if destroyed then"
position = "before"
payload = "if (scoring_hand[i].config.center == G.P_CENTERS.m_fm_volatile) end"
match_indent = true
storm oar
# earnest creek it creates 15 new cards now lol
calculate = function(self, card, context)
  if context.selling_self and not context.blueprint and #G.hand.highlighted == 1 then
    local valid_cards={}
    local selected_card = G.hand.highlighted[1]
    if #G.playing_cards>1 then
      for i=1,#G.playing_cards do
        if G.playing_cards[i]~=selected_card then
          table.insert(valid_cards,i)
        end
      end
      for i = #valid_cards, 2, -1 do
        local j = math.random(1, i)
        valid_cards[i], valid_cards[j] = valid_cards[j], valid_cards[i]
      end
      local maxCards=#G.playing_cards>15 and 15 or #G.playing_cards-1
      for i = 1, maxCards do
        copy_card(selected_card,G.playing_cards[valid_cards[i]])
      end
    end
  end
end

try this, instead of using a while loop it adds all card indices except for the selected card, shuffles the indices, then grabs the first 15 or number of cards-1 if it's 15 or less, also doesn't run if for whatever reason there's only 1 card in the deck

earnest creek
#

Oh my lord, it works perfectly.

merry raven
# merry raven Finally figured out how to solve ghost cards on destroying Enhancements ``` [[pa...

But the sequence of events is a bit messed up, when scored:

  • Displays the custom message from card_eval_status_text
  • Scores normally, giving chips and Mult
  • Scored chips added to the total chip score
  • Card gets destroyed

What I want to do is to have it score first then display the custom message and destroy at the same time, any insights?

if context.cardarea == G.play and not context.repetition then
            if card.ability.extra.mult > 0 then
                effect.mult = card.ability.extra.mult
                G.E_MANAGER:add_event(Event({
                    trigger = 'after',
                    func = function()
                        card.destroyed = true
                        return true
                    end
                }))
                card_eval_status_text(card, 'extra', nil, nil, nil, {
                    message = "Blasted!",
                    sound = "fm_volatile",
                    colour = G.C.PURPLE
                })
            end
        end
earnest creek
wooden nexus
#

Okay question: I have a deck I'm working on and i need the starting deck to have 6 of each card, How do I make it so that it is that

#

Also I want a nominal to be a number (so it's in order) but I want the chips to be 0 for the rank

nocturne garnet
#

i dont know how retriggers work

dreamy thunder
#

i need help on making custom rarities. I've been reading the wiki but i cant get my head arround it

wooden nexus
dreamy thunder
#

i already have that. It just displays Error

wooden nexus
#

oh,

#

your problem is with the localization then

dreamy thunder
#

i'll check

stiff locust
#

how to overwrite vanilla localization with a mod
I can't understand what makes the fish mod work

#

i promise this is ethical and it's gonna be really funny

wooden nexus
#

Fish mod?

stiff locust
#

the one that changes flush five to fish

wooden nexus
#

ah

#

I got too many in-progress stuff right now lol

zealous glen
#

Fish Mod mentioned

stiff locust
#

i can't understand what makes that mod work
I tried the same "method" (their lua file has 1 line of code and it's a debug message, they just have default localization that overwrites vanilla somehow)

stiff locust
stiff locust
#

yeah how'd you get it to work

edgy reef
#

Just cook

#

🔥 🔥 🔥

stiff locust
#

but how do I do it

#

it's not working

zealous glen
#

So I just have a localization file that replaces the entry in the vanilla localization

stiff locust
#

well yeah i have that too

#

but mine's not working

#

the mod is loaded, but the localization file doesn't overwrite vanilla

dreamy thunder
zealous glen
stiff locust
#

the same method as your mod did it (by just having the localization file there) and uhhh

#

the entire localization file is getting overhauled

#

or at least, every joker and consumable and voucher and tag and blind

#

i'll probably stop after that this is very draining

zealous glen
#

Some Steamodded update seems to have broken it v_v

stiff locust
#

well that's

#

annoying.

#

how do we do this now

zealous glen
#

@frosty dock bug?

rancid perch
#

is it possible to change the backgrounds?

#

or there colors per scren

zealous glen
#

There are a few mods that do it

rancid perch
#

was thinkingn of doing a persona 5 royal overhaul theme was all

#

making the shop into the velvet room

zealous glen
#

that means nothing to me :<

rancid perch
#

wrong one oops

zealous glen
zealous glen
#

If you just want the colors a Trance palette might work

rancid perch
#

will it work per setting/section

#

like differnt per area

#

maybe that background?

#

its pretty sick

karmic kelp
#

are there better ways to do these (randomly pulling from a table, constructing a consumable's ID if I know it's from my own mod)?

rancid perch
#

so how would i do a background like that on the play/hand but swirl color in shop

tepid crow
karmic kelp
#

yeah, options is a subset of consumables I want to pull from

wintry solar
#

you can use pseudorandom_element

karmic kelp
#

I knew it was something along those lines... arguments are the table and the pseudoseed?

#

and the weight of each individual Normal Buffoon pack is 1.2, right? I'm wanting to mimic the same weight scaling as those packs for my own consumable boosters

shell tangle
#

Anyone that knows UI, any idea if there's an easy way to make a toggle call a secondary function? I want to do the toggle thing, but I also want it to call a function that spawns/removes an object when toggled, and I'm reluctant to make my own button because I don't fully get how the ref_value, ref_table, and callback all work together in the create_toggle function.

zealous glen
karmic kelp
#

I see no mention of poll in SMODS.Center, so I've got no idea what you might be talking about

shell tangle
#

Also you can probably search SMODS for poll_ and find the code for each one.

karmic kelp
#

that... looks like it's pulling from a pool? I'm wanting to insert with the same weight as something else

#

oh yeah my consumables are also doing this when pulled from a booster pack and I have no idea why
and I don't know the details of making a loc file to localize the booster pack text either

shell tangle
#

I think that error text requires a loc file, just style it like how the source code does it.

karmic kelp
#

yea that's what I was getting at, not sure where I'd look for that

shell tangle
#

localization/en-us.lua.

#

And, to double check, you're trying to figure out a way to fill the booster pack with cards from your custom consumable type?

karmic kelp
shell tangle
karmic kelp
#

a subset of my consumables, I think we're getting lost in more general options here

shell tangle
#

Then yeah, you'd probably have to define that subset yourself in advance and use pseudorandom_element to pull from that list.

karmic kelp
#

do you have any thoughts as to why my consumables might be swarmed by green particles when spawned via booster?

shell tangle
#

I thought it was something you might've added yourself, I don't remember encountering them, you could maybe try a skip_materialize = true in the create card funtion and see if that helps? There's probably a more solid answer that I don't remember, though.

faint yacht
#
-- extra.active is true currently.
if card.ability.extra.active and context.end_of_round and game_over then
  return {
    saved = true
  }
end

doesn't appear to "save" the run. Missing something?

karmic kelp
# teal estuary chemistry? 👀

yup, 26 elements have been chosen to have rank-manipulating effects
please ignore the fact Silicon doesn't change ranks and Element X is one of the chosen elements

#

and the artist and I have been pretty split on if we want to have a release with just the 26 elements, or if we should hold off for jokers or the spectral card as well

wintry solar
teal estuary
#

every metal as an enhancement

karmic kelp
#

particles isn't listed as a parameter in SMODS.Booster, so that probs needs to be documented then

faint yacht
edgy reef
#

Also particles controls sparkles that randomly appear around the booster pack, not the cards

#

Hold on, someone else had a problem like this and wasn't it fixed?

faint yacht
#

Now to replace this...

edgy reef
#

Also looking back it seemed to be fixed from specifying parameters on SMODS.create_card (no other info specified by them)

karmic kelp
#

I really do wonder if there's some better way to organize this page

edgy reef
#

There's been thoughts of changing how SMODS.Center page works

#

Especially since there's definitely undocumented stuff tied to info that's available for everything extending SMODS.Center, but since there's no section to put it it's undocumented.

karmic kelp
#

bah, what are the things I need to pass to SMODS.change_base to make it change to a given face card

#

tried J, Q, K, and 11, 12, 13, both just give me an error

cyan dune
#

I think it's Jack Queen and King, full words

karmic kelp
#

Ace too?

cyan dune
#

Yeah

#

That's just based on my experience with DeckSuit but I don't think they would change the way ranks are referenced elsewhere

faint yacht
#

...alright, how do I define the pattern for patching ..localize('ph_mr_bones')..? Figured I'd try adding something there to try changing the "saved" text.

zealous glen
#

Any name suggestions for this Blind?

zealous glen
faint yacht
#

I'd rather keep the original as is, trying to allow custom text to be grabbed instead if a global variable is defined.

cyan dune
zealous glen
cyan dune
#

An episode of a show that only uses 1 scene and a small number of characters to save on production costs

zealous glen
#

And swap back on a toggle

karmic kelp
#

I imagine just rigging up the lovely patch they're illuding to would be less hassle, honestly.

zealous glen
#

I don't imagine it

tidal steppe
#

double or nothing

faint yacht
#

I don't want any replacing to be forced, like with my sound patch I already use.

zealous glen
#

And as I said you can replace it back

karmic kelp
#

do I need to do anything special to make my new localizations load in? Or just put them in my mod like this?

zealous glen
#

Are you only adding text to custom objects?

dreamy thunder
#

how do i make it so if i score anything between 2 and 9 (2 and 9 included) i get +chip and +mult?

karmic kelp
#

nope, I've got that loc file specifically for the booster pack text

#

everything else has a loc_txt defined on it

zealous glen
#

in theory it should work but I get the impression it's bugged

karmic kelp
#

now I need to figure out what the key I need is...