#💻・modding-dev

1 messages · Page 654 of 1

tidal hemlock
#

mayhem dev is really against this person named jen iirc

pastel kernel
#

if you mean the fiasco between mayhem and pw, it's been resolved lredy

red flower
#

im assuming that its the same jen

pastel kernel
#

fucking keybord

#

this shit won't let me type z or a

#

does this work?⁨```lua
-- local pool = {}
-- for _,v in ipairs(G.P_CENTER_POOLS.Consumeables) do
-- if v.hidden and not v == "jen_omegaconsumable" then pool[#pool+1] = v.key end
-- end
-- local random_key = pseudorandom_element(pool, "random_rare_consumeable")
-- if random_key then SMODS.add_card{key = random_key} end
-- return {
-- message = "Har Har Har!",
-- sound = "busterb_gfreddygiggle",
-- colour = SMODS.Gradients["busterb_GoldenFreddyGradient"],
-- card = card
-- }

#

i mean it's still in comments but would it work

red flower
#

idk if it will work but it should probably be v.key ~= "c_jen_omegaconsumable" instead of not v == "jen_omegaconsumable

dreamy vector
#

Struggling a lil bit here with Jokerforge (I'm very much a begginer, bear with me)
I'm trying to create a joker that has a 1 in 3 chance of creating a Negative Tarot Card and 1 in 10 chance of creating a Negative Spectral Card once a Tarot Card is used. However, I only want this joker to activate if the Tarot card used is itself NOT negative, meaning that these chances only happen if it's a normal Tarot card. The way it's set up now, though, makes it so Negative Tarot cards can generate more cards. I've tried messing with stuff a bunch in the jokerforge editor, but how can I basically tell it:
1 in 3 chance of creating a Negative Tarot Card and 1 in 10 chance of creating a Negative Spectral Card once a NON-NEGATIVE TAROT CARD is used

pastel kernel
red flower
shell timber
#

that's how you'd blacklist a specific one

red flower
#

then v.set

#

and remove the c_

#

assuming theyre a consumabletype idk pwx

pastel kernel
#

Let me check

white hull
dreamy vector
white hull
#

Joker Forge is still a wip, so maybe there just isn't. They're planning on implementing everything from the vanilla game, but it takes time

dreamy vector
#

I don't have much programming experience and I just started messing with jokerforge a few hours ago so there's definitely a lot of stuff I don't know about yet, but if it doesn't have it I'll figure out a workaround

white hull
#

Welcome to the modding scene :)

dreamy vector
#

Thanks! I'm already having fun

white hull
#

That's the important part <3

dreamy vector
#

Ok just got confirmation that this is in fact not doable in Jokerforge

#

However I could export the joker from jokerforge and edit its lua script in a text editor to make that check functionality

#

How do I find out what this check would look like in scripting, though?

red flower
pastel kernel
#

the idea was that you can spawn any consumable except if they're an omega consumable

fervent rampart
#

I am losing my mind.

return { key = key, vars = {localize({key = self.config.voucher, set = 'Voucher', type = 'name_text'})}}

This works and gives me a voucher.
But when I try the exact same code for a different deck it doesn't work anymore. Is this even valid code for generating a voucher? I'm starting to think it isn't.

shell timber
#

this doesnt give you a voucher

#

it just shows a voucher in a description

still hedge
pastel kernel
#

idk```lua
if v.hidden and not v.set == "jen_omegaconsumable" then pool[#pool+1] = v.key end

#

do you write it like this?

fervent rampart
# shell timber this doesnt give you a voucher

Thank you... But now I have no idea how I am getting a voucher then. I straight up don't have any code for it at all then, and yet it's appearing. So, I dunno, but at least I can start looking elsewhere now.

dreamy vector
shell timber
#

whats the crash log?

red flower
dreamy vector
#

I think it has something to do with me editing the script generated from jokerforge?

#

Running the mod generated from jokerforge without changing anything manually in the code works fine

#

Ok nevermind I must have messed something else up, doesn't crash anymore

dreamy vector
stiff locust
#

whats the internal value for the rounds number

red flower
#

g.game.round

#

but capitalized properly

pastel kernel
#

do i write it like this```lua
if v.hidden and not v.set == "jen_omegaconsumable" then pool[#pool+1] = v.key end

#
local pool = {}
                    for _,v in ipairs(G.P_CENTER_POOLS.Consumeables) do
                     if v.hidden and not v.set == "jen_omegaconsumable" then pool[#pool+1] = v.key end
                    end
                local random_key = pseudorandom_element(pool, "random_rare_consumeable")
                    if random_key then SMODS.add_card{key = random_key} end
#

or is it still wrong

random basin
#

how would I get an animated joker atlas to only play once instead of looping?
and if not possible can I delay an event function the exact number of frames to change the sprite position?

dapper sun
#

testing having the floating sprite large than the centre but i can't figure out how to move the pivot point to the correct point

rapid stag
#

i don't understand what's causing this error.

was it some change in the past half a year's worth of steammodded development? '-';

#

i released my mod to the public today and no-one's able to play it because of this and i don't understand this error in the slightest

#

and if i comment that out, it just moves onto the table declaration below.
these are standard table declarations
and if i comment all those out, it doesn't like an if statement that's looking at a boolean variable

what was changed????

#

was the entirety of lua massively updated while i wasn't paying attention???

#

...turns out i had an extra comma earlier

true jasper
#

how do i level up a random hand

frosty rampart
#

SMODS.PokerHands is a complete table of all available hands, hit it with a pseudorandom_element

#

@true jasper

true jasper
#

thank you

frosty rampart
#

apologies, give it a gentle tap with a pseudorandom_element

rapid stag
#

does anyone remember how to spawn jokers from collection via debugplus? i forgot

shell timber
#

3 or ctrl+3

#

depends on if you have a setting enabled

rapid stag
#

ok so i am crazy. doesn't work

#

help

#

nvm, my game was being screwy, it's fine girldmDead girldmDead

#

i'm just cursed today

#

PSA: do not work on balatro mods while heavily sleep deprived

vernal path
#

I forget
can you use debugplus to print something? Like printing the current state of G.consumables?

rapid stag
#

eval

vernal path
#

ah, sick

rapid stag
#

eval will basically just run whatever you put after it and print out stuff if it gets a string or table, but you can just use it like a print function

true jasper
frosty rampart
#

I'd hope there's a table of only visible hands in G.GAME somewhere, but I don't know off the top of my head
worst case you can make that table yourself first by looping through smods.pokerhands and checking the hand's visible value/function

daring fern
#

granite apex
#

Are there any guidelines as to how posts are worded and organised in modding, aside from the obvious? Trying to prepare for my first public mod upload, planning on keeping my more basic modding questions in that mod's thread and I'm trying to get most of it right on my first try

sturdy compass
sturdy compass
granite apex
#

Got it

rigid solar
daring fern
rigid solar
#

What's the diff

#

Because what I sent works

true jasper
#

how would I override the effect of an previous voucher without unredeeming the previous tier

faint yacht
pastel kernel
#

what am i doing wrong with this voucherlua redeem = function(self, card) local rarity_map = { busterb_Grandiose = 'busterb_Dreamy', busterb_Secret = 'busterb_Fantastic', Common = 'Rare', Uncommon = 'Rare', cry_cursed = 'cry_exotic', crp_abysmal = 'crp_mythic', unik_detrimental = 'unik_ancient', valk_supercursed = 'valk_exquisite', jen_junk = 'Rare', jen_omegatranscendent = 'cry_exotic', jen_omnipotent = 'cry_exotic', jen_transcendent = 'cry_exotic', jen_wondrous = 'cry_exotic', jen_ritualistic = 'cry_exotic', jen_miscellaneous = 'Rare' } local _, key = pseudorandom_element(SMODS.Rarities, "cogito").key key = rarity_map[key] or key local card = SMODS.add_card { set = "Joker", rarity = key, edition = 'e_negative' } create_shop_card_ui(card, "Joker", G.shop_jokers) card:set_cost() card:start_materialize() G.shop_jokers:emplace(card) end, calculate = function(self, card, context) if (context.reroll_shop or context.starting_shop) then local rarity_map = { busterb_Grandiose = 'busterb_Dreamy', busterb_Secret = 'busterb_Fantastic', Common = 'Rare', Uncommon = 'Rare', cry_cursed = 'cry_exotic', crp_abysmal = 'crp_mythic', unik_detrimental = 'unik_ancient', valk_supercursed = 'valk_exquisite', jen_junk = 'Rare', jen_omegatranscendent = 'cry_exotic', jen_omnipotent = 'cry_exotic', jen_transcendent = 'cry_exotic', jen_wondrous = 'cry_exotic', jen_ritualistic = 'cry_exotic', jen_miscellaneous = 'Rare' } local _, key = pseudorandom_element(SMODS.Rarities, "cogito").key key = rarity_map[key] or key local card = SMODS.add_card { set = "Joker", rarity = key, edition = 'e_negative' } create_shop_card_ui(card, "Joker", G.shop_jokers) card:set_cost() card:start_materialize() G.shop_jokers:emplace(card) end end,

#

wrote create_card instead of add_card

pastel kernel
#

ok its not giving me non common or non uncommon jokers

pastel kernel
#

removing .key works

wanton jolt
#

holy shit its the vintage christmas lights guy

pastel kernel
daring fern
#

errant arrow
#

is it possible to strike out text in smods?

mystic river
#

i don't think that currently exists

errant arrow
#

damn

mystic river
#

it seems like it could be added, they added underline

errant arrow
#

guess i'm putting a pause on one of my jokers, that's fun

torn goblet
#

how would one use take_ownership on a Joker from a different mod? is it even possible?
i tried just using the ID of the Joker from the mod with it, but that didn't seem to work and would give errors
even running a check beforehand to see if the mod was loaded and then trying to take ownership didn't seem to work

daring fern
wintry solar
torn goblet
# daring fern Yes, the key would be `j_modprefix_key`

when I try and do something like SMODS.Joker:take_ownership(j_modprefix_key), the debug console just says [W] [Joker] Cannot take ownership of j_modprefix_key: Does not exist.
checking if the mod is loaded beforehand yields the same results.

mystic river
#

try removing the j_

#

take ownership skips class prefixes

elder rune
#

How do I add a "use" button to a joker?

red flower
elder rune
#

of course vanilla remade would have it

#

and thx

torn goblet
mystic river
#

bizarre

#

do a check right before the take ownership to see if G.P_CENTERS[item key] exists?

torn goblet
#

with or without the j_? I imagine with, but just to be sure

mystic river
#

with

red flower
torn goblet
#

sample of the code!

red flower
#

not relevant but C:hex code doesn't work

mystic river
#

i meant just like, print the result, not make the take ownership conditional on it

but the answer is the same, the item doesn't exist yet. odd

#

just to make sure the timing isn't super wack, try running a similar check on your own joker immediately after you load it

red flower
#

ah if this is in the main file then P_CENTERS is not populated yet

#

iirc

torn goblet
red flower
#

no thanks

#

but anyway i would try printing what minty said in the debugplus console

frosty dock
red flower
#

ah pwx was like really high prio right

frosty dock
#

yeah

#

you need to be higher

mystic river
#

inf, iirc

#

so uh

slim ferry
#

i love bad practices

red flower
#

I mean personally at that point I would respect jen's wishes and not do crossmod

mystic river
#

is it possible to delay taking ownership until after mods in general have loaded?

slim ferry
#

just with addons

red flower
#

well if he put prio that high then some problem he has lol

torn goblet
#

... okay

#

nevermind then

red flower
#

do you just want to change the text or the whole thing

frosty dock
#

you can just patch atp

slim ferry
#

i dont think theres even a reason for the prio being high

torn goblet
slim ferry
frosty dock
#

you can lovely patch the mod's lua files

frosty dock
#

like shader files are

slim ferry
#

what does it entail

#

to be "set up" to be patched

torn goblet
#

... interesting

frosty dock
#

it's an addition of lovely 0.9.0

slim ferry
#

i see i think

torn goblet
#

lovely patches are kinda confusing

#

i've tried to use them before, but didn't get very far

#

...until i realized that the solution could be done with standard lua

red flower
#

patches are just lua you put in the middle of another code

frosty dock
#

lovely is a very powerful tool

torn goblet
red flower
#

name and description can be done with a localization file but i think it needs to be loaded after jen's too

mystic river
#

does the event manager exist yet at this stage of loading? maybe you could put it in an event (<- grasping at straws)

red flower
#

i think you can take ownership after load but idk if the localization gets processed without doing something else

torn goblet
#

i should probably also say that i am pretty new to lua as a language, so i apologize if i'm being unhelpful "^^

red flower
#

i think patching is probably easier

torn goblet
#

if i'm going to use patching to replace the atlas of it, where is it going to load that atlas?

#

surely not from the polterworx directory itself

red flower
#

hmm true

mystic river
#

define your atlas in your earlier loading code, then replace the atlas in jen's code with yours (with prefix config set accordingly)

torn goblet
#

the define atlas i understand, but how exactly would i replace jen's atlas?

mystic river
# torn goblet the define atlas i understand, but how exactly would i replace jen's atlas?

in jen's joker code, there's something like atlas = "jokers"
you would replace that with the name of your atlas, with the mod prefix, and also a line to define prefix config to not automatically add the mod prefix (since that would result in it trying to look for jen_yourmodprefix_youratlas, which doesn't exist)

i forget exactly how prefix config works, but it's in the smods docs

#

this would be what the lovely patch does

torn goblet
#

hmmm, okay

mystic river
torn goblet
#

the define prefix config seems tricky

#

but thank you much for the continued help!

torn goblet
elder rune
red flower
#

did you do the drawstep part

mystic river
#

vr addresses that
scroll down a bit :p

elder rune
#

yeah

red flower
#

can i see

#

i didnt write that so i never tested it :3

elder rune
#

order is -30 like they said there

red flower
#

what about SMODS.draw_ignore_keys

elder rune
#

underneath the other one

red flower
#

hmm no idea

elder rune
#

and ive done barely anything to the ui definition except changing w, h and offsets

red flower
#

that shouldnt affect it i dont think

elder rune
#

tried changing the order to both -100000 and 100000, still rendered above both times

red flower
#

if you add a print to the drawstep what happens

elder rune
#

wait no I found the problem

#

forgot to change variables in Card.highlight

tawdry bloom
#

my jokers are using the wrong sprites for some reason?

#

WAIT

#

SOMEONE WARNED ME ABOUT THIS EARLIER

clear ocean
#

any way to make localization a folder of nest lua files similar to nh's joyous spring

#

probably i should ask him first

#

@red flower how did you do that

red flower
#

copy nh's joyousspring

clear ocean
red flower
#

loc files are just lua

slim ferry
#

do you know what youre doing

red flower
#

that's just there for very new people

slim ferry
clear ocean
#

uh frankly not really for this kinda of stuff

slim ferry
#

im inclined you kind of have an idea of what youre doing

#

at least

red flower
#

it's not complicated it's just so people use standard localization first

#

that code just merges all loc files into 1

#

probably in a dumb way because im dumb

clear ocean
#

yeah a bit not completely out of the dark but its more asking if theres a way to make it modular so it won't possibly become one BIG file

#

if that makes sense

red flower
#

i dont understand what you mean

clear ocean
#

like being able to have a folder of en-us with stuff like joker.lua, back.lua, misc.lua

red flower
#

yeah just copy that

#

you would need to change the hardcoded paths and the mod id

clear ocean
#

fair enough let me try doing that

primal robin
#

My locfiles in loc_txt folder jangschna

clear ocean
#

@red flower curious question what's with the numbers

red flower
#

shouldn't affect the localization order or anything

clear ocean
#

okay thanks

#

nh what's the second argument for the load_file meant to do

#

i figured out what that was, that's the id for post-launch file loading.

red flower
#

yeah loc files dont recognize what mod theyre from when loaded

hardy vessel
#

Weird question, but I'm trying to hide decks similar to how the Challenge deck is hidden from the deck selection menu. How would I go about that? I've tried no_collection = true and omit = true not working as I want

winter flower
#

how do i modify the shop price of every item, when doing something like a reroll

frosty rampart
#

i'm not sure if context.reroll_shop runs before or after the new shop items are generated
but if it's after, you can just use that context to run through G.shop_jokers and adjust the cost there

sour garden
#

i have a custom pool for Jokers, but i can't seem to select a rarity. this block of code is able to create common jokers. do i need to define rarity in my SMODS.ObjectType?

pale yarrow
#

Got a problem that's stumped us in the JokerForge Discord; my mod correctly loads and doesn't crash, shows the custom title card, is listed in the mods menu, however no additions are shown, no cards, no jokers, nothing.
All the files are in the asset folders that they should be, and the mod doesn't crash the game at all.

#

Anyone else experienced this?

mystic river
#

does your main file load your item files?

pale yarrow
#

Yes I believe so

red flower
#

probably not the issue but your smods is old

pale yarrow
#

I've tried many smods over the past few days to try and fix it

#

I can load Mika's modpack in perfectly fine

red flower
#

thats why i said probably not the issue

pale yarrow
#

I've tried it alongside mods, and on it's own, still nothing

red flower
#

you should show the code

pale yarrow
#

Could it be that the Lua is named differently to the JSON?

slim ferry
#

whay

#

What

red flower
pale yarrow
#

Ah damn it

frosty rampart
#

the contents of the json specifies what the main lua file's name is, and smods picks up any json it can find in the folder afaik

pale yarrow
#

If anyone would like to load up the JF mod and try it, feel free.
I've tried on 2 devices now and got the same issue

red flower
#

it seems to work fine

#

if you had jokers theyre not exporting

#

but thats a jf issue

red flower
clear ocean
#

is "earn $3" a good descriptor

red flower
#

when

clear ocean
#

when played or something

#

i guess smods is wrong about it because i get nothing when playing or cashing out

red flower
#

it only works for playing cards as far as i see

clear ocean
#

ohh

#

well then which would sound fairer

pale yarrow
clear ocean
#

when you play a hand or at cash out

#

like this for the latter

pale yarrow
#

Gonna try a completely clean install of Balatro tomorrow and see if that gets it going

frosty rampart
viscid talon
#

my localisation isnt working

clear ocean
#

so is earn $3 enough (i can make it work for both jokers and cards) or should it be something like "earn $3 when joker is scored" or something

viscid talon
#

its working for the decks but not for the jokers

#

oh wait its not working at all

#

HOW 😭

#

what the hell is going on

#

wait no fucking way i think the workspace screwed me over

#

ok nvm

#

hold on

#

things arent working for some reason

#

ok thats weird, the decks work but everything else is broken

red flower
clear ocean
#

yeah it is

#

idk if this is discord or actually how it is but your whitespace formatting on the brackets is uh wack

red flower
#

i really recommend formatting your code and checking if folding descriptions hides all the things that should be inside it

viscid talon
#

how do i fix this 😭

#

mm

clear ocean
# clear ocean it works

all i left is a sound effect for it (ill work on consumables similar to wheel of fortune and hex later) but is the description easy to understand

viscid talon
#

im wondering if its bc of the unlocks thing

red flower
#

what's wack

viscid talon
#

well nothings really showing up except the Back

#

im very new to localisation

frosty rampart
#

your indentation is kind of wack

#

but you now need to add another }, before Blinds = {

viscid talon
#

oke

frosty rampart
#

then there'll be more work to do but i dunno what it is exactly

clear ocean
red flower
#

dictionary and misc are also inside descriptions

viscid talon
#

o hm

#

idk what to do 😭

red flower
#

I would recommend starting the file again and copypasting the stuff one by one where it needs to go

#

think of it like folders

viscid talon
#

mmgh 😭 but thats effortttt

#

okay

#

ill do it tmrw

red flower
#

also get an auto formatter

viscid talon
#

whats an autoformatter

red flower
#

it auto formats the code :3

#

what editor do you use

viscid talon
#

vsc

red flower
#

then if you have the lua extension you can right click and then format document

viscid talon
#

oh wow

clear ocean
#

my first edition is complete for my mod rework but i am still not sure if "earn $3" is a good edition description

wanton jolt
clear ocean
#

it's similar to foil, holo, and poly where the joker and card is scored

frosty rampart
#

"Earn $3 when triggered" might be better

#

gold seal is explicitly "Earn $3 when this card is played and scores", but since editions can be on jokers condensing it to "when triggered" makes the most sense to me

clear ocean
#

which one do you prefer, this or

frosty rampart
#

2nd one, changing the size is just a bit offputting to me

true jasper
#

how do i make a voucher have a soul sprite since idfk how to make a drawstep

red flower
#

the soul in vanillaremade has one

true jasper
#

okay

torn goblet
#

(sorry for ping)

tough wharf
clear ocean
#

youre welcome larswijn

#

curious question is there a way to make a planet card that does something like for a pair do either +5 mult or +30 chips

red flower
#

yes

#

planets are consumables so they can run any code

#

and the new smods upgrade hands stuff lets you do individual modifications

clear ocean
#

any information on how to do that

red flower
#

probably the docs for the latest smods update

rapid stag
#

ok so i have a CTD issue that i'm trying to solve:

i have a consumable that turns a joker into another joker (via :set_ability("key")), of which those jokers are only accessible via that consumable and that's the intended way for them to be discovered. discovering a joker unlocked that way, then hovering over any card in the collection causes a CTD. subsequent launches of the game seem to randomly insta-CTD

how do i find out more about what's causing the CTD?

sturdy compass
#

I have a feeling this might be a pool-related issue. How are you generating a key to set the ability?

rapid stag
#

i have a table that stores functions that are named with the key of the original joker (as the key in the table), that return a either table with various information, primarily for use in the loc_vars of the consumable to let the player know whether the consumable can be used on that selected joker (or for use in whatever specific bit i've come up with for that selection), or just straight up the final joker key as a string.

so that way i just look jokerKeyTable[jokerReference.config.center.key] and if it's not nil, disambiguate further before doing anything with it

then if there's a final joker key as a result, i put that in a local variable and do jokerReference:set_ability(targetKey) and that changes the joker to the final joker

#

messy? yes. flexible? yes. works? yes.

i don't get why that would be related to crashes of discovered items in collections

clear ocean
rapid stag
#

like, if i force discover one of the other jokers obtained this way via debugplus, there's no crash

red flower
#

debugplus does some wonly stuff with atlas on discover

#

does it maybe have to do with the atlas

rapid stag
#

well it shows fine in the collection, but hovering over any joker causes a crash

red flower
#

are you doing anything with the description ui

#

like adding info queues to jokers

rapid stag
#

yes

red flower
#

check that they're not recursively adding each other

rapid stag
#

given that the only thing being added to the info_queue is a hardcoded table, i highly doubt it

sturdy compass
#

The method of it being added might be the issue is what's being proposed here

rapid stag
#

ohhh

#

i don't know how to check. the CTD is on hovering over any joker in the collection on the same page as that unlocked joker, whether locked, undiscovered or discovered

if the problem was with how i was adding to an info_queue with that specific joker, why are other jokers causing the crash

sturdy compass
#

using print() is your friend here

#

and really the only way to get more info

red flower
#

do you use git

rapid stag
#

yes

#

this is a public mod that i released 2 days ago

red flower
#

you can checkout commits until you find the one that doesn't have the problem

#

and then see what addition caused it

rapid stag
#

...well, i never tested potential issues with discovery after developing the consumable and the related jokers girldmDizzy i thought to and intended to, but just forgot

and someone found this CTD

so this has likely been an issue since i first implemented it

red flower
#

the problem is not when but what

#

unless you dont make regular commits in which case good luck

rapid stag
#

i haven't really changed this at all since implementation?

red flower
#

but are you sure it's that?

grizzled tide
#

(i think ill hold off my question for now-)

clear ocean
#

thinking on using these names (art can be added later) for the spectral cards for adding laminated to a joker or playing card

red flower
clear ocean
#

admittedly i found it by looking up synomons to talisman 💔

rapid stag
#

well i'm sure it's not that and i'm confident it's not particularly related to it, either

grizzled tide
#

o ok, i was wondering how to go about giving a card a temporary enchantment through the calculate function? (just something which lasts for a hand)

red flower
#

check the smods calculate wiki

grizzled tide
#

mm, looking at it, its not quite what i want, im trying to make a joker which temporarily gives a random card in hand an enchant for the hand

#

that or im drastically misunderstanding context.check_enchantment

red flower
#

it does that

#

unless you want to give it an enhancement and then take it away which would be just giving the enhancement in context.before and taking it in context.after

grizzled tide
red flower
#

you cant sell jokers during scoring

grizzled tide
#

ah

red flower
#

the only problem with other jokers that add enhancements

#

but you can just make the effect something like add steel and if it's still steel then you remove it

grizzled tide
#

maybe im misexplaining myself, i want the enchant to be there after the first hand is drawn, not once the hand is played

rapid stag
#

i'm stumped

grizzled tide
red flower
#

use SMODS.current_mod.calculate

rapid stag
#

would anyone else be willing to look through my mod and help me figure out what's causing this CTD? girldmDead

grizzled tide
red flower
#

it's global

grizzled tide
#

o? so it always runs?

red flower
#

yes

grizzled tide
#

huh, neat

red flower
#

i added it :3

grizzled tide
#

:o thanks n' :)

rapid stag
#

i tried making a minimum reproducible example but that doesn't reproduce the CTD

#

so i have no idea where the issue is if it's not something to do with set_ability

grizzled tide
#

oh, somewhat unrelated question, does G.hand:unhighlight_all() unhighlight force selected cards?

rapid stag
#

maybe i should take this to support actually, that's new since i last talked in here

#

...well, no - this is something endemic to something i wrote, but i have no clue where the issue starts or ends. i only know what causes it.

red flower
#

i dont think the people browsing the channels are different enough to matter lol

rapid stag
#

which rarity is what index? is common 0 or 1?

red flower
#

common is 1

clear ocean
rapid stag
#

i'm trying everything i can think of here. i really wish i had a crash log

i mean, i guess i do? the player that found the CTD found a crash log saying there was a stack overflow at line 1105 in misc_functions, but

what i mean is that i wish i had a crash screen

near coral
red flower
clear ocean
#

okay figured it out by looking at vanilla remade i didnt need the can_use

red flower
#

the problem was card.config... doesn't exist

clear ocean
rapid stag
red flower
#

are you saving a card somewhere or a function

#

inside a card

final jewel
#

why Spectral isnt working

#

like Tarot is working but not Spectral

red flower
#

ok that screenshot gives negative context

final jewel
#

i mean in the localize

rapid stag
final jewel
#

it says ERROR on the card

red flower
final jewel
#

looks like that

clear ocean
#

idk what the downside should be, any ideas?

final jewel
#

and in game

red flower
final jewel
#

oh yeah probably

red flower
red flower
#

fixed

#

also remove the labels thing i think

winter flower
clear ocean
#

i decided to go with "destroys all other jokers" since that's what hex and ankh does, and i think it can be a strong edition with testing

final jewel
clear ocean
#

also i rather not make anything rely on stickers as that means that it would only be work or make sense on certain stakes and higher

rapid stag
red flower
#

what's the mod again

rapid stag
#

cirno_tv & friends

red flower
#

can u link it

rapid stag
red flower
#

ok it's too long i will try to recreate it tomorrow

rapid stag
#

thank you

clear ocean
#

the second part of the text is more as a reference for me in the future when i start working on the art but idk if i want to commit to the "minor arcana" part or something

#

maybe hold on

#

nah

frail sigil
#

can anyone tell me why the following chunk of code enters the blind you just beat instead of the next one

SMODS.Keybind{
  key = "Select blind",
  key_pressed = binds.select_blind,

  action = function(self)
    if G.STATE == G.STATES.BLIND_SELECT then
      G.FUNCS.select_blind(G.blind_select:get_UIE_by_ID("select_blind_button"))
    end
  end
}
urban wasp
#

how do i get a card to stop juicing at the end of round for example

frail sigil
#

juicing?

urban wasp
#

and secondly how do i grab the current mult

urban wasp
frail sigil
#

ah

urban wasp
#

like with dna's jiggles

frail sigil
#

oh ok that makes sense

daring fern
urban wasp
# daring fern `mult`

ah; isn't chips something like ⁨current_chips⁩ or is it just ⁨chips⁩ as well

urban wasp
#

ah

pastel kernel
#

what's the key for gold seal again

#

i'm gonna use set_seal

shrewd cobalt
#

I know SMODS.calculate_round_score() gets your total chips for the hand, but is it possible to change the total score of the hand instead of just getting it?

pastel kernel
#

I’m unsure

shrewd cobalt
#

Im trying to make a boss blind that halves your total score (of the hand) when activated

grizzled tide
#

So the flint but after scoring rather than before?

pastel kernel
#

hmm```lua
if context.before then
if SMODS.pseudorandom_probability(card, 'busterb_lucky_vigi', 1, card.ability.extra.luckychance, 'busterb_lucky_vigi') then
local faces = 0
for _, scored_card in ipairs(context.scoring_hand) do
if scored_card:is_face() then
faces = faces + 1
scored_card:set_seal("Gold", nil, true)
scored_card:set_ability("m_gold", nil, true)
G.E_MANAGER:add_event(Event({
func = function()
scored_card:juice_up()
return true
end
}))
play_sound("busterb_vigi")
end
end
end
end
if context.individual and context.cardarea == G.play and not context.blueprint then
if SMODS.has_enhancement(context.other_card, 'm_lucky') then
return {
x_chips = card.ability.extra.luckyxchips,
dollars = card.ability.extra.luckydollar,
sound = "busterb_gunshot"
}
end
end
end

pastel kernel
#

how does the flint's code work again?

grizzled tide
#

<@&1133519078540185692> ^

#

O nvm

grizzled tide
# shrewd cobalt Yes.

I would refer to the flint code in vanilla remade and change the context to something like context.after

grizzled tide
pastel kernel
#

i fixed it finally

elder spire
#

i need someone to test this code

#

because i can't access my pc at the moment

#

common joker that might disable itself out of pure confusion.

    key = 'misunderstood',
    loc_txt = {
        name = 'Misunderstood',
        text = {
            "{C:mult}+20{} Mult",
            "{C:green}#1# in #2#{} chance to be",
            "{C:red}disabled{} for the rest of",
            "the round after each hand.",
            "{C:inactive}(Status: #3#)"
        }
    },
    config = { extra = { mult = 20, odds = 5, disabled = false } },
    rarity = 1, -- Common
    pos = { x = 0, y = 0 }, 
    atlas = 'Joker',
    cost = 4,
    unlocked = true,
    discovered = true,
    blueprint_compat = true,

    -- Variables for the card description
    loc_vars = function(self, info_queue, card)
        local status_text = card.ability.extra.disabled and "Confused..." or "Ready!"
        return { vars = { (G.GAME.probabilities.normal or 1), card.ability.extra.odds, status_text } }
    end,

    calculate = function(self, card, context)
        -- Trigger Mult only if not disabled
        if context.joker_main and not card.ability.extra.disabled then
            return {
                mult_mod = card.ability.extra.mult,
                message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } }
            }
        end

        -- Roll for the disability after the hand scores
        if context.after and not card.ability.extra.disabled and not context.blueprint then
            if pseudorandom('misunderstood') < G.GAME.probabilities.normal / card.ability.extra.odds then
                card.ability.extra.disabled = true
                return {
                    message = "Sorry!",
                    colour = G.C.RED
                }
            end
        end

        -- Reset at the end of the round
        if context.end_of_round and not (context.individual or context.repetition) then
            if card.ability.extra.disabled then 
                card.ability.extra.disabled = false
                return {
                    message = "Back again!",
                    colour = G.C.GREEN
                }
            end
        end
    end
}```
#

here is the example model

#

a joker that have 1-5 chance to disable itself on every hand played. and when the round end it comes back to life

rapid stag
#

i'll just use SMODS.shallow_copy() instead, that seems to fix it girldmDizzy

#

yay fix

red flower
rapid stag
wintry solar
#

Any table with an object in it is recursive

rapid stag
#

i see girldmDizzy

red flower
#

why do you need to copy it anyway

rapid stag
#

it was an info_queue thing

#

anyway it works now, i fixed and tested it

red flower
rapid stag
#

i wanted to put that item in info_queue with the fake_card bool, so that's why i needed to copy it.

red flower
#

i see

wild patrol
#

how do people edit/change the ace on the title screen

mystic river
#

annoying methods
but smods added a simpler method recently

wild patrol
#

Oh?

mystic river
#

(one of the reasons I'm hoping they do a release soon)

wild patrol
#

ty

#

I'm gonna try this see if it works

#

oh wow even lovely injector got updated

mystic river
#

you will need the dev version of smods

wild patrol
#

I know

#

cool

#

anything on editing the background color?

#

or does it still require hacky solution

mystic river
#

i don't think smods added a thing for that yet

wild patrol
#

is there more to this

#

or is it just restricted to sets and the numbers

#

is it atleast possible to remove the ACE

tawdry bloom
#

my jokers are using the wrong sprites, does anyone know how to fix this?

wild patrol
#

your offset is off

#

sprite sheet starts a 0 for both x and y

tawdry bloom
#

how would i change the offset?

wild patrol
#

pos = {
x = 1,
y = 0
},

#

in smods.joker

#

for whatever joker has the wrong sprite

#

x is left and right y is up and down

#

for example second row 3rd joker would be x = 2 and y = 1

tawdry bloom
#

is that for a spritesheet

#

cos im using individual sprites

wild patrol
#

it be easier if u made a sprite sheet

tawdry bloom
#

alr imma do that thx

wild patrol
#

then make an atlas

#

of that sprite sheet

wild patrol
#

does it support changing the x/y coordinates

#

having it slightly offcenter is annoying lol

mystic river
#

changing the position is probably doable by including a func entry, but idk how that would work

wild patrol
#

i guess last question is is it just restricted to 2 cards because been fiddling with it trying add another card but everything i try returns a nil value

#

looks so much better lol

wanton jolt
wild patrol
#

I guess all that's left for the main menu is getting more twitch theme'd colors

#

and updating the logo

#

since it was just couple random logos I found off google lol

daring fern
#

wild patrol
wild patrol
wanton jolt
#

i mean can it

#

lol

grizzled tide
#

do you guys know how to get the current blind's multiplier?

daring fern
grizzled tide
#

thx

tawdry bloom
#

I MESSED UP BADLY LOL THIS IS MEANT TO BE 20

mystic river
#

average cryptid joker

shrewd cobalt
#

How do you do the latter? A random chance for a playing card to not score

#

Alright

frosty rampart
#

no, just use context.modify_scoring_hand

#

returning remove_from_hand = true during that context will remove the currently-being-checked playing card from the scored hand

shrewd cobalt
#

ah okay

next timber
#

ok im confused, i hooked SMODS.calculate_individual_effect to add my own return key, but when I make a joker return a table using that key, when i make SMODS.calculate_individual_effect print the key it recieves, it never prints the modded one? why does it never recieve my new key? am i hooking the wrong function?

daring fern
next timber
#

i see

#

oh wait also ive hooked this function before already, i should probably merge the hooks while im at it

#

so can i just do table.insert(SMODS.calculation_keys, "hodge_partial_balance")

white hull
#

is there a way i can share a variable between a blind's calculate and disable functions? saving it to self.config.extra.var instead of blind.config.extra.var in calculate won't do the thing, yes?

next timber
#

cool

daring fern
white hull
#

alright but either way blind isn't passed into the disable function

#

only self

daring fern
white hull
#

ohh

#

duh

#

thanks!

#

so variables from config get copied into blind.effect?

white hull
#

neato

next timber
#

ok where am i meant to put the table.insert because just putting it in my main lua doesnt seem to be working?

wintry solar
#

put it in SMODS.other_calculation_keys

next timber
#

cool thx

dapper cliff
#

hi im trying to make joker decrease prices of a pool of jokers in the shop, what function do i use to modify prices in the shop

daring fern
dapper cliff
#

alright then

hardy vessel
#

Question about blind loc_vars, is it not possible to change the key used to get the loc text similar to how booster packs work (by removing the \_(number))?

white hull
#

How can I return a played card to hand ala beta blue seal behavior?

red flower
#

iirc it's a feature in the next smods version

white hull
#

👀

torpid flicker
#

how would i check what pool a joker is in? ive tried this thus far

context.other_joker.config.center.pools == "ExamplePool"

daring fern
torpid flicker
#

thanks!!

white hull
#

Why does this display "nil in nil chance" in the blind's desc in the collection? Works fine ingame

loc_vars = function(self)
    local num, denom = SMODS.get_probability_vars(self, 1, 4, 'nancy_wrench')
    return { vars = { num, denom } }
end,
white hull
#

oh wait there's a thing for this

#

yeah

torpid flicker
torpid flicker
#
        if context.other_joker and context.other_joker.config.center.pools and context.other_joker.config.center.pools['ExamplePool'] then
            return {
                cxmult = card.ability.extra.cxmult
            }
        end
    end,```
#

rip formattign

daring fern
torpid flicker
#

ah got it

#

vscode autocorrect

grizzled tide
#

How would you go about making a store have an exact copy of a joker (including edition and stickers)

lament agate
#

can i replicate glass breaking for non glass card?

slim ferry
#

What part

lament agate
#

the effect

slim ferry
#

If you mean the animation you can add shatters = true to the enhancement definition

wintry solar
#

hook SMODS.shatters

slim ferry
wintry solar
#

oh the breaking effect

slim ferry
#

It is code

lament agate
#

oh i have to hook?

#

yeah the breaking effect

wintry solar
#

you just tell the code to destroy the card

slim ferry
#

ts vanillaremade moment

lament agate
#

i thought this was it

#

here's what i was planning

slim ferry
#

Isnt that for checking glass joker triggering (?)

lament agate
#

oh is it?

#

damn

wintry solar
#

I think it's for checking if a glass card has been destroyed specifically, it's unused though afaik

lament agate
#

makes sense

#

so the effect for me was

XMult for each played cards, all cards other than this card is shattered

primal robin
#

Getting close I guess
Text wrapping will be a bit of a challenge probably

fading rivet
#

anyone know why this isn't triggering the effect when the text pops up, and is instead doing it as soon as the round ends (its during round end context)

lament agate
#

so i guess i can just call destroy card and then it will automatically shatters if i set shatters to true?

wintry solar
#

if you want it to actually shatter instead of dissolve you will need to hook

lament agate
#

fair

wintry solar
fading rivet
#

oh

#

thx

red flower
dapper sun
#

trying to make my copycat/blueprint enhancement work properly with debuffing boss blinds and i think something's wrong with my hooks

grizzled tide
dapper sun
#

because the copycat cards were getting photograph'd despite not copying a face card

#

here's the hook

local is_face_hook = Card.get_id
function Card:is_face(from_boss)
    -- Messy ass jank code
    if self.config.center.key == "m_elle_copycat" then
        local target = ellejokers.get_copycat_target(self)
        if target then return is_face_hook(target,from_boss) end
    end
    
    return is_face_hook(self,from_boss)
end```
grizzled tide
#

I don’t see how copying card.debuff would cause that 😭

dapper sun
#

it's not????

#

i just said why i'm not doing that

grizzled tide
#

OH

#

different hook mb

#

I thought you were hooking set_debuff

dapper sun
#

nope

shell timber
#

is_face_hook = Card.get_id ....

dapper sun
#

OH

#

that'd do it

torpid flicker
#

why wont this retrigger???

if context.retrigger_joker_check and not context.retrigger_joker then
            

            if context.other_card and context.other_card.config.center.pools['Smallpox_Pool'] then

                if context.other_card.config.center.rarity == 3 or context.other_card.config.center.rarity == "Rare" then
                    return {
                        message = "Again!",
                        repetitions = 1,
                        card = card,
                        xmult = card.ability.extra.rxmult,
                        sound = "smallpox_poxofthewild_pop",
                    }
                end

                if context.other_card.config.center.rarity == 4 or context.other_card.config.center.rarity == "Legendary" then
                    return {
                        message = "Again!",
                        repetitions = 1,
                        card = card,
                        xmult = card.ability.extra.lxmult,
                        sound = "smallpox_poxofthewild_pop",
                    }
                end
            end
        end```
daring fern
torpid flicker
#

yes i do

#

and ill try that

#

no dice. heres the full calculate.

calculate = function(self, card, context)
        if context.other_joker and context.other_joker.config.center.pools and context.other_joker.config.center.pools['Smallpox_Pool'] and (context.other_joker.config.center.rarity == 1 or context.other_joker.config.center.rarity == "Common")  then
            return {
                xmult = card.ability.extra.cxmult
            }
        end
        if context.other_joker and context.other_joker.config.center.pools and context.other_joker.config.center.pools['Smallpox_Pool'] and (context.other_joker.config.center.rarity == 2 or context.other_joker.config.center.rarity == "Uncommon") then
            return {
                xmult = card.ability.extra.uxmult
            }
        end

        if context.retrigger_joker_check and not context.retrigger_joker then
            

            if context.other_card and context.other_card.config.center.pools['Smallpox_Pool'] then

                if context.other_card:is_rarity('Rare') then
                    return {
                        message = "Again!",
                        repetitions = 1,
                        card = card,
                        xmult = card.ability.extra.rxmult,
                        sound = "smallpox_poxofthewild_pop",
                    }
                end

                    if context.other_card:is_rarity('Legendary') then
                    return {
                        message = "Again!",
                        repetitions = 1,
                        card = card,
                        xmult = card.ability.extra.lxmult,
                        sound = "smallpox_poxofthewild_pop",
                    }
                end
            end
        end
    end,```
torpid flicker
#

tried this still no dice

if context.retrigger_joker_check and not context.retrigger_joker and context.other_card ~= self then

red flower
#

do you have the optional feature enabled

#

also context.other_card ~= card

torpid flicker
#

still doesnt work\

#

agh

red flower
#

does it enter the condition

torpid flicker
#

what do you mean by that

red flower
#

ah this will crash too

torpid flicker
#

its not crashing its just not retriggering

red flower
torpid flicker
#

no

#

let me ad a print

torpid flicker
torpid flicker
red flower
#

can i see your optional features code

torpid flicker
#

--enable retrigger jokers
SMODS.current_mod.optional_features = {
retrigger_joker = true,
post_trigger = true,
}

red flower
#

does post trigger work on this joker

torpid flicker
#

i dont know

slow lotus
#

im making a joker where their xmult is the ante your currently on divided by 2.5

(ante 1 is 1.4, ante 2 is 1.8, etc)

what rarity would this be?

torpid flicker
#

id say probably about uncommon

slow lotus
#

alright

glass scaffold
#

how can I change the "YOU WIN" and "GAME OVER" text?

lament agate
#
calculate = function(self, card, context)
        if context.repetition then return end
        if context.individual and context.cardarea == G.play then
            local suit = G.GAME.current_round.suitwash.suit
            if context.other_card:is_suit(suit) then
                return { repetitions = card.ability.extra.wildrep }
            end
        end
    end
#

this doesnt retrigger, what happened

daring fern
lament agate
#

so like

#

if context.repetition and not context.individual then return end

#

?

daring fern
# lament agate ?
calculate = function(self, card, context)
    if context.repetition and context.cardarea == G.play then
        local suit = G.GAME.current_round.suitwash.suit
        if context.other_card:is_suit(suit) then
            return { repetitions = card.ability.extra.wildrep }
        end
    end
end
lament agate
#

im so sorry

#

thanks

torpid flicker
#

still cant get mine to retrigger

            
            print("retrigger check passed")
            if context.other_card and context.other_card.config.center.pools['Smallpox_Pool'] then

                if context.other_card:is_rarity('Rare') then
                    return {
                        message = "Again!",
                        repetitions = 1,
                        card = card,
                        xmult = card.ability.extra.rxmult,
                        sound = "smallpox_poxofthewild_pop",
                    }
                end

                    if context.other_card:is_rarity('Legendary') then
                    return {
                        message = "Again!",
                        repetitions = 1,
                        card = card,
                        xmult = card.ability.extra.lxmult,
                        sound = "smallpox_poxofthewild_pop",
                    }
                end
            end
        end```
#

im not getting the print or anything

torn remnant
#

is there a better way to check that a deck is properly effecting rarity weight than just... spamming rerolls

naive agate
#

how can i make these cards show the enhancement texture after being flipped over

daring fern
granite jay
#

Has anyone managed to find a workaround to make cards count as more than one rank?

daring fern
lament agate
#

why doesnt this work

granite jay
#

How do you use it?

daring fern
granite jay
#

Ahlol

lament agate
#

how do you use it

granite jay
#

Yeah I’m wondering the same

#

Cos I wanna make a joker that makes Kings and Queens count as eachother

clear ocean
#

i added a lovely patch to incorpate a "don't repeat yourself" on the decks i am working on and now the metadata is considered a lovely mod is that normal, any way to switch it back?

daring fern
clear ocean
#

yeah i checked my json and fixed it

#

thanks for the quick reply nevertheless

granite jay
#

Apologies for my lack of lua knowledge (I did try and read) but what line is this function in? Actually is it possible to hook it?

Also I saw some stuff about SMODS.optional_features at the bottom, I’m wondering if that allows multirank to be toggleable for potato players

daring fern
torpid flicker
#
            print('work')
            return {
                message = "Again!",
                repetitions = 1,
                card = card
            }
        end```
#

WHY DOESNT THIS WORK

#

AGH

#

I LITTERALLY STOLE THE CODE FROM MAXIMUS

glass scaffold
granite jay
torpid flicker
daring fern
torpid flicker
#

i tried to do it a more intelligent less jank way and actually check the rarity

#

but that didnt work

#

so i found this code in maximus

#

and added all the jokers to the correct pool for rare and legendary

#

thats what that code is doing

glass scaffold
#

May I suggest looking at Baseball Card's code to look through all Jokers and check rarity?

torpid flicker
#

thats where i started

daring fern
torpid flicker
#

i think its because the joker also needs to do other things before and they are intefering somehow

#

i dont know why that would be the case

#

but

#

im losing it

#

ive been on this one joker since 2:30 today

#

its 10pm

#

(in fairness ive done a few things in between but ive still worked on this for a solid 5 hours)

#

heres the calculate again

#

        if context.retrigger_joker_check and not context.retrigger_joker and context.other_card.config.center.mod == SMODS.Mods['smallpox'] and (context.other_card:is_rarity('Rare') or context.other_card:is_rarity('Legendary')) then
            print('work')
            return {
                message = "Again!",
                repetitions = 1,
                card = card
            }
        end

        if context.other_joker and context.other_joker.config.center.pools and context.other_joker.config.center.pools['Smallpox_Pool'] and (context.other_joker.config.center.rarity == 1 or context.other_joker.config.center.rarity == "Common") and not context.retrigger_joker_check  then
            return {
                xmult = card.ability.extra.cxmult
            }
        end
        if context.other_joker and context.other_joker.config.center.pools and context.other_joker.config.center.pools['Smallpox_Pool'] and (context.other_joker.config.center.rarity == 2 or context.other_joker.config.center.rarity == "Uncommon") and not context.retrigger_joker_check then
            return {
                xmult = card.ability.extra.uxmult
            }
        end

       
    end,```
daring fern
torpid flicker
#

trying now

torpid flicker
#

even though im setting it here?

--enable retrigger jokers
SMODS.current_mod.optional_features = {
    retrigger_joker = true,
    post_trigger = true,
}```
daring fern
torpid flicker
#

its the main file so yes

daring fern
torpid flicker
#

true now?

#

IT WORKS

#

im freeeeeeeeeeeeeeeeee

#

thank you very much

torpid flicker
urban wasp
#

simple question: is x_chips in steamodded or added by talisman

daring fern
urban wasp
#

does that include the sound effect?

shell timber
#

yeah

urban wasp
#

okay just checking considering i saw the sfx in talisman files specifically

shell timber
#

it used to be a talisman only thing

urban wasp
#

i see

urban wasp
#

any way to make this work? when i try to make this, it seems to just have the chips in the round reset when any other chips effect triggers

...
        if context.before then
            return {
                xchips = mult
            }
        end
#

this is literally all the effect is

faint yacht
#

context.initial_scoring_step

urban wasp
#

i RARELY ever see that context lol

#

how do i access the number of rounds that the player has completed?

urban wasp
#

i should've assumed such 😭

daring fern
#

ebon scaffold
#

does anyone know how to make the joker not play the hand

faint yacht
#

Cards not scoring or disallowing the hand entirely like a Boss Blind would?

ebon scaffold
red flower
primal robin
#

Well I guess I copypaste this entire function

wanton jolt
languid canopy
#

hey, i've been trying to make some boss blinds but the royalty (1st) crash my game and the oxide (2nd) just does nothing :/ am i doing something wrong ?

red flower
#

you can't index a number

#

if you want the key it's in card.base.value

languid canopy
#

its the key of each individual card ?

#

or sm

red flower
#

no it's the key of the rank the card has

languid canopy
#

oh yeah

red flower
languid canopy
#

👌

red flower
#

(or context.check)

languid canopy
#

yeah alright

#

ill try that thanks

red flower
#

also it's context.cardarea

languid canopy
#

oh just a woopla

red flower
#

i would really recommend looking at examples or the docs

languid canopy
#

i will

fading rivet
red flower
#

it is just context.debuff_hand

sand pike
#

anyone have any guides on how to put in card textures without overriding the already excisting ones

next grail
#

heres my jokers thus far

#

jokereforge is such a blessing sent its so much fun to use

slow lotus
#

what if there was a joker like bloodstone, but for other suits

#

plus the other gem jokers

#

like a spade version of rough gem

red flower
#

what if

stoic void
#

what if

slow lotus
#

yeah that would be cool

loud summit
#

how do you put items in a custom collection section

wild patrol
#

I made a joker with it that's supposed to increase chip mult for every bonus card played but it didn't work

#

And the code it spat out mentioned nothing about checking bonus enhancements

#

It just increases after every played hand

#

So be sure you check that it's actually spitting out what you're designing it to do

#

If there is a tool I wish that could be separated from joker forge it's how it makes it sprite sheets

#

Since that's all I use it for anymore lol

next grail
#

yeah fair enough

#

i mean its coded by one dude and its free

#

its ust a fun little thing

#

i think if youre serious about making jokers you'll have to learn to code a little

obtuse wraith
#

I'm cofindent there's a way to pick a random sound for an effect.

red flower
#

afaik

#

you would need to list all the sounds and pick from them

obtuse wraith
red flower
next timber
#

whats the variable name of the edition pool, and can i rely on it being in order? making a joker that upgrades cards from base to foil to holo to poly to negative

red flower
#

G.P_CENTER_POOLS.Edition
two caveats: it includes e_base (no edition) as one of them and they are in order but modded editions will be in loading order

next timber
#

ok cool

#

e_base being there might actually be handy

#

and ill probably stop it from progressing past negative anyways because all my mods editions have detrimental aspects lol

#

apart from lenticular

#

lenticular the goat

slim ferry
#

what in the return table specifies the per argument used in play_sound for returned sounds

#

i know vol is done with volume but i genuinely have no idea what per is even short for

fading rivet
#

anyone know how I can grab a cards calculate function?

slim ferry
#

card.config.center.calculate?

#

well for modded objects at least

#

vanilla objects dont store a calculate function at all

#

and keep in mind that because its a function youre quite limited in what shenanigans you can do

fading rivet
slim ferry
#

what is "mid round effects"

fading rivet
slim ferry
#

why cant you just

#

calculate them with joker_main

slim ferry
#

are you doing something that means you cant calculate it

fading rivet
slim ferry
#

well yeah

#

then you just calculate the specific joker with joker_main right

fading rivet
slim ferry
#

what method i stated above

fading rivet
slim ferry
#

no

#

that only exists for modded objects

fading rivet
#

how do I do it for vanilla then

slim ferry
#

directly calling calculate wont work regardless

#

since that wont parse the return table

fading rivet
slim ferry
#

theres probably some function that calculates an individual card and then does the return table stuff but i dont know what that would be

daring fern
# fading rivet .

No, card:calculate_joker({cardarea = G.jokers, full_hand = G.play.cards, scoring_hand = context.scoring_hand, scoring_name = context.scoring_name, poker_hands = context.poker_hands, joker_main = true})

fading rivet
#

thx

fading rivet
#

or just do the effects

daring fern
granite jay
#

When patching with .toml files, is it possible to disable patches via a config setting?

fading rivet
#

bet
thx

red flower
#

one i just wrote for example

granite jay
#

How possible would it be to allow poker hands to be affected by multiranks?

daring fern
wild bison
#

Is there some line of code I can use to make the game instantly lose?

daring fern
slim ferry
#

this is meant to balance a card's Xchips and Xmult (e.g. X1.5 Mult would become X1.25 Chips and X1.25 Mult), though the math is not working out. cards with neither of the bonuses just get X-nan for both and idk whats causing it. too many maths

#

following it by hand with both base values being 1 doesnt seem to bring up any issues

warped ocean
#

yo how would i detect if hand was the second hand played?

#

for a joker

red flower
#

G.GAME.current_round.hands_played == 2

warped ocean
#

ty goat

red flower
#

or maybe 1 i dont remember if it preadds the current hand

daring fern
slim ferry
#

doing that rn

warped ocean
slim ferry
#

okay everything is zero for some reason

#

ig i should just zero check

#

for the nonexistent values

#

or well

#

set them to 1 if zero?

warped ocean
#

yo chat how would i go about destroying the entire played hand?

#

cause now it just destroys like everything 😭

mystic river
#

what does your current code look like

slim ferry
granite jay
#
SMODS.Joker{
        key = "junklake",
        atlas = 'grasslanderJoker',
        config = { extra = {dollars = 20, count = 0, threshold = 3, active = true}},
        pos = { x = 1, y = 1 },
        rarity = 1,
        cost = 5,
        blueprint_compat=false,
        eternal_compat=true,
        perishable_compat=true,
        unlocked = true,
        discovered = true,
        effect=nil,
        soul_pos=nil,
        in_pool = function(self, args)
            return false
        end,
        calculate = function(self, card, context)
            if not context.blueprint then
                if context.end_of_round and context.main_eval then
                    card.ability.extra.active = false
                    card.ability.extra.count = 0
                end
                if context.setting_blind then
                    card.ability.extra.active = true
                    card.ability.extra.count = 0
                end

                if context.discard then
                    if context.other_card:get_id() == G.GAME.current_round.grasslanders_junklake_card.id then
                        card.ability.extra.count = card.ability.extra.count + 1
                    end
                end
                if context.discard and context.other_card == context.full_hand[#context.full_hand] then
                    if card.ability.extra.count >= card.ability.extra.threshold then
                        local target_cards = {}
                        for _, v in ipairs(G.playing_cards) do
                            if v:get_id() == G.GAME.current_round.grasslanders_junklake_card.id then
                                target_cards[#target_cards + 1] = v
                            end
                        end
                        for _, v in ipairs(target_cards) do
                            G.E_MANAGER:add_event(Event({
                                func = function()
                                    G.play:emplace(v)
                                    return true
                                end
                            }))
                        end
                        return {
                            dollars = card.ability.extra.dollars,
                            func = function() -- This is for timing purposes, everything here runs after the message
                                G.E_MANAGER:add_event(Event({
                                    func = function()
                                        SMODS.destroy_cards(target_cards)
                                        return true
                                    end
                                }))
                            end
                        }
                    end
                end
            end
        end,
        loc_vars = function(self, info_queue, card)
            local idol_card = G.GAME.current_round.grasslanders_junklake_card or { id = 1, rank = 'Ace', suit = 'Spades' }
            return { vars = { card.ability.extra.dollars, localize(idol_card.rank, 'ranks'), card.ability.extra.count, card.ability.extra.threshold} }
        end,
    }

Anyone know the best way to fix this? What happens rn is in #1468810499759145063 message

daring fern
#

The problem is because you're not removing the card from the area before emplacing it.

granite jay
#

Ah

fading rivet
#

bro im so confused
I added a debug print statement and now my code works

#

😭

daring fern
#

granite jay
daring fern
fading rivet
#

How do I add pool data to vanilla jokers?

#

like I wanna give a "Food" pool too all the food jokers

frosty rampart
#

check how paperback does it

daring fern
fading rivet
daring fern
primal robin
#

this guy discovered technology

red flower
#

speaking of which i want to make clickable text for my credits

#

someday

clear ocean
#

which do you prefer

#

this can also be an option for the latter

stoic void
clear ocean
#

the last thing is find some sort of unlock condition since all tier 2 vouchers has some sort of related condition

stoic void
clear ocean
#

im looking at the unlock stuff for the jokers

#

maybe something similar to one of these

stoic void
clear ocean
#

i see lol

#

uh brb

red flower
#

i will use this

#

i will see if i can add it as a formatting option

clear ocean
#

is there documentation on this? like the different options

#

here's my idea, but idk which formatting is better

granite jay
clear ocean
#

but rn i can just leave it blank and come back to it no worries

fading rivet
#
local p_rarities = {1, 2, 3, etc}
local valid_rarities = {}
for _, value in ipairs(p_parities) do
  valid_rarities[value] = true
end

--- in that if statement

if valid_rarities[v.rarity] ~= nil then
pastel kernel
daring fern
rapid stag
#

apparently crash on unlock animation for a joker

something to do with what i was doing to the multibox tooltip?

i'm just gonna implement a nil check to this for now for a release to patch it over while i wait for someone to get back to me and help me figure whatever's going on here

frosty rampart
fading rivet
minor anvil
#

does anyone has a code that modifies the starting money, hand, and discards?

clear ocean
mystic river
#

also, you can always run the function yourself if you want a custom unlock method

grizzled tide
#

For animated jokers, is there a way to get the current frame a joker is on?

red flower
vocal helm
#

Much like there is a card.children.center:set_sprite_pos, is there a card.children.center:set_pixel_size?

#

it doesn't seem like there is, but I need to do it for one of my Jokers

subtle hawk
#

Is there something like a soul_atlas or smth

minor anvil
#

im modifying the startting stats

true sky
#

is there a good way to force a challenge to use a specific stake?

lusty marten
#

i want to replace win.ogg in Balatro.exe to my ogg file by smods , how can i do that?

median veldt
#

hey does this work for consumables

and on that note is it just G.consumables

it's been a minute since ive modded balatro

daring fern
daring fern
median veldt
#

hm. erroring out.

median veldt
#

ah

#

nvm on the erro

lusty marten
bronze karma
#

does anyone know how to add name & text to a joker without using loc_txt?
i wanna use external localization files (like to grab from localization/en.lua) but i don't know how do you do it normally
i just started doing this thing so expect sorta stupid questions and answers
thank a bunch

daring fern
bronze karma
#

crab

#

uhhhh nope it doesn't do it

#

probably i did everything wrong then

vagrant finch
#

IS there any documentation for setting up the basis of a mod, e.g basic joker structure, challenges, decks etc etc

vernal path
bronze karma
#

nvm i figured it out it turend out that i messed up the joker key name somehow

next timber
#

what context would be the best to use for making a joker make a playing card do something as if it were an edition effect? like making holo playing cards also give foil's chips

daring fern
next timber
#

essentially yes, while this joker is owned

#

not essentially. thats exactly what i want to do

#

so yeah uhhh how would i make joker cause playing cards with an edition also count as other editions

daring fern
# next timber so yeah uhhh how would i make joker cause playing cards with an edition also cou...
GitHub

A mod that puts seals on everything. Contribute to Somethingcom515/SealsOnJokers development by creating an account on GitHub.

GitHub

A mod that puts seals on everything. Contribute to Somethingcom515/SealsOnJokers development by creating an account on GitHub.

next timber
#

i assume for the get_quantum_editions function i can gut that and replace it with my own logic for when they should have them

daring fern
terse merlin
next timber
#

woah what is the "times" argument in a lovely patch

red flower
#

if the patch targets more than one line then it does the first [times] lines

next timber
#

ohh i see

terse merlin
primal robin
next timber
#

the plant on crack

bronze karma
past spade
#

is there some reasonable way to implement sticker incompatibility?

daring fern
dense fulcrum
#

for some reason my mod that adds challenges is causing every challenge (even vanilla ones) to load into a normal run in the previous deck instead, even though I haven't changed the way challenges work and all of my challenges have deck.type set to "Challenge Deck". I'm starting to suspect that it's because all of the challenges are being loaded from different files, but I figured I'd ask around to see if anyone else might know what the issue is
https://github.com/ProotTheFoxCodes/Trials-of-the-protogen

past spade
quick kraken
#

I was gonna start work on Balatro Quest (name for a mod idea I had) but idrk where to start

quick kraken
#

You know those questbook Minecraft modpacks? The idea was to change joker and deck unlock conditions to follow a quest structure similar to those

#

That however involves defining what a quest is exactly, the UI necessary to show it on screen as its own menu, the matter of how do I write it to a persistency layer, how do I do the cryptid thing of spawning whole new savefiles, whether take_ownership is enough to change joker unlock conditions, etc

#

and I don't know which of these problems to attack first

dense fulcrum
#

also you can always read the repos that do the things you wanna do

quick kraken
#

In preparation of extending this to a larger modpack too, I also wanted to implement a joker bans system to make it easier to hunt for certain quest requirements

#

Where increase in ban limit is a quest reward in the first place

minor anvil
#

you can probably look at banner and see how they did the banning stuff

dense fulcrum
minor anvil
#

from what i understand its like a level progression and not roguelike, something like pvz

quick kraken
#

It's more like, making Balatro more roguelite?

minor anvil
#

oh..

quick kraken
#

Idrk how to explain it beyond "Minecraft questbook modpacks"

minor anvil
#

ive never played that so..