#💻・modding-dev

1 messages · Page 358 of 1

glad osprey
#

yea you can

manic rune
#

🤔

glad osprey
long sun
#

oh ya, was wondering, what is this for?

next elk
#

tbh rn its only a test joker

#

i havent figure out the logic yet

glad osprey
#

ah gotcha

next elk
#

ill probably make a consumable card like “Storm” and it will gain mult with every redeem or sth

glad osprey
#

like all jokers are in the "Joker" pool

long sun
#

ah i see

#

ough wait i think i found the error -w-

glad osprey
#

tarots would be in both the tarots and consumables pool (i think)

long sun
#

i changed my key to phanta_Zodiac, but when creating cards for the booster, it uses just Zodiac

next elk
long sun
#

hopefully that solves it

#

oh wait it's just a case issue i think ^^ i did have the prefix

glad osprey
#

(ive never played)

next elk
#

||which is known for.. dying a lot||

glad osprey
#

pretty shit spirit animal imo

next elk
#

chloe price would kill you

glad osprey
#

joking i genuinely do not have that opinion 😭

next elk
glad osprey
#

just thought it would be funny to have beef with a butterfly

next elk
#

😭

hardy viper
#

i beef with no bugs

next elk
#

rn im wondering if im gonna make this mod like gaming-reference themed or just references to stuff i like

hardy viper
#

they interesting

next elk
glad osprey
#

i only have beef with bugs when they fly towards me at 50 miles an hour

hardy viper
#

actually there was a really big like fly like thing in my room a bit ago

#

i think he was asleep

next elk
hardy viper
#

i don't like that dude

next elk
hardy viper
#

he could've picked a better spot 😭

glad osprey
#

small things moving towards me fast triggers my fight or flight response faster than anything else in the world

red flower
#

are we hating on bugs

#

can i join

glad osprey
#

not particularly

long sun
#

ohhhhhh we're so gamingggg

glad osprey
#

moreso evolution of humands

glad osprey
long sun
#

indeed ^^

hardy viper
#

i like bugs when they just like walk on my arm

#

like little fellas

glad osprey
#

same

#

i had a little firefly friend once :)

hardy viper
#

peak

golden lake
long sun
#

peak!! i remember seeing those :D

zealous glen
golden lake
#

wdym? there's no issue

#

these work smoothly

zealous glen
shell timber
#

if two mods add a "Zodiac" consumeable type then they can't be distinguished in say pack pulls

golden lake
shell timber
#

True...

next elk
#

wait

#

how well does rust integrate with lua

shell timber
#

uh you can do rust ffi but it's not worth it for most mods

golden lake
#

Luckily Balatrostuck has no plans of accomodating modpacking celebratecongratulationsyayyippe

zealous glen
#

To be fair there were like 3 non-Consumable Zodiacs

zealous glen
next elk
shell timber
#

i think someone's tried to optimise talisman by using a rust version of omeganum?

next elk
#

well i guess we have to make steamodded rust api /j

golden lake
#

Jocker solos every single Joker /j

shell timber
#

finally a mod to compete with Joyous Spring

zealous glen
golden lake
#

That's preposterous and would never happen

zealous glen
#

Though if Balatrostuck can Dagger Cryptid I'd be happy :P

golden lake
#

You underestimate the 413 Terezi sleeper cells

#

That will awaken once the mod drops

zealous glen
#

413 Terezi sleeper cells going to sleep: honk shoo mimimi

golden lake
#

this is factually wrong

#

they would not go honk

#

they whould just go SHOO M1M1M1

zealous glen
#

Terezi did go honk tho

#

She regretted it

#

But she did

golden lake
#

we do not talk about the Game Over timeline

zealous glen
#

Terezi 🤝 Jane
going honk

hardy viper
#

but mostly fine with luajit

next elk
#

we need rust steamodded (actually we dont but it would be pretty cool)

hardy viper
#

you have rust lovely jimbo_spin

golden lake
#

do not put Rust in the Balatro, there's such a thing called "restraint"

hardy viper
#

i once saw someone call rust useless because people don't use it for ios apps

next elk
#

:3

golden lake
#

Rust is very useful, but I don't think it's a smart idea to interop two languages like Rust and Lua

hardy viper
#

interop every language tbh

next elk
shell timber
#

rust could probably be useful for optimising talisman, yeah

hardy viper
shell timber
#

yeah the only issue is making it interop

hardy viper
#

i don't think it'd be too much faster tbh

next elk
#

Rust seems like it would be useful for changing the game at its core moreso than just adding content

golden lake
#

you're using the outdated cool :3 language, everyone's moved onto Zig

hardy viper
#

no thanks

next elk
golden lake
#

Actually no, the og :3 language is Haskell but you're too afraid for that conversation

next elk
golden lake
#

Moving the goalposts

#

Fallacious argument

next elk
#

rust is the :3 of :3 languages

golden lake
#

Appeal to :3

#

Another fallacy

next elk
#

nuh uh

golden lake
#

Circular reasoning

next elk
golden lake
#

Appeal to nuh uh

next elk
#

nuh uh!!!!!!!!

zealous glen
#

I thought the new cool language du jour was Julia

red flower
#

php

rough furnace
#

I thought the new cool language was lua

cunning barn
#

getting back to coding king of town. once again asking where the piece of code i was given would go

vale glen
#

@scarlet thorn , Axy has some time at PC to describe the issue now, but not enough time to iterate on the code. The first attached picture shows the desired effect of the Joker. The second shows futile attempts to read the lovely dump and figure out how to load playing cards into the shop, and eventually re-doing this for a random Joker in the pool with a negative edition set on it.

#

As it is now, it tries to index local 'card' and complains it's a nil value, on line 514 in the code.

royal ridge
echo sky
#

j_chris_griffin= {order = 151, unlocked = true, discovered = false, blueprint_compat = true, perishable_compat = true, eternal_compat = true, rarity = 3, cost = 20, name = "Chris Griffin", pos = {x=1,y=9}, set = "Joker", config = {mult = 500}},

red flower
#

you shouldnt use the vanilla structure

golden lake
echo sky
red flower
#

you probably need to change Card:calculate_joker

#

but i would recommend just using smods unless you really cant

echo sky
thorn flame
red flower
shut crater
echo sky
#

ah damn

shut crater
#

Plus there's no benefit to doing things the vanilla way, but there is benefit to doing things the smods way

#

Particularly mod compatibility

#

And documentation

next elk
#

anybody knows how to do a bonus based on sth like "each time ante is lowered"?

spring socket
#

i'm trying to do something with the Card.juice_up function, but when Talisman or Cryptid are loaded the card isn't juicing. What might be happening here?

cunning barn
#

ok im just gonna cave would anyone here be willing to extend programming help to me for jokestar in like a GC or dev server? i am STRUGGLING here every joker i try to make

next elk
manic rune
#

ah

#

well, a bad but sure-fire solution is to check when ante changes in update

a better but not too sure-fire solution will be to hook to ease_ante

#

the second one won't guarantee because some people might directly change antes instead of using ease_ante, so the effect won't account for that

#

the first one is a bit more memory-consuming, but it ensures that the effect will always work, so it depends on which you want :p

next elk
#

thanks

#

ill figure it out then

manic rune
#

no prob

smoky seal
#

Hey everyone! I'm new here to modding Balatro. I made a mod a few months ago all thanks to the amount of content on this server. So thanks for that! I have an idea for a new mod but don't think I can do it alone. Does anyone fancy working with me on it?

zealous glen
#

Which mod did you make

next elk
smoky seal
# zealous glen Which mod did you make

I didn't publicise it, but it went alongside a Home Assistant integration I made to share the game state and events. I paired it with my smart lighting and LED strips around the TV to make it more immersive

#

I can dig out a video if you're interested

zealous glen
manic rune
# next elk actually, could you link to wiki page explaining it? (if there is any)
Klei Entertainment Forums

In LUA, it is a very important concept to understand that everything is a variable and all variables may be edited in runtime. This includes functions. With modding other peoples' LUA files, like Klei's basegame code, you may find yourself wanting to run your code before or after the original fun...

#

this is for hooking to ease_antw

#

as for the other approach - SMODS.Joker has update built in, you will want to use it

next elk
#

ill probably use the update then

smoky seal
manic rune
# smoky seal

im currently a bit busy with my studies and my own mods rn - but that's really sick

smoky seal
#

The new mod idea is to do some sort of time trial. You have x number of seconds to do things. 6 seconds in the shop, 2 seconds blind selection, 5 seconds per hand (these are just example times).

If you go past 0 seconds, you get $1 removed. Maybe there's a thing where for every second you have left, you gain $1 too (idk yet).

It would be paired with a joker to slow down time (or disable the timer for x rounds), but also a voucher to double the timer

hushed field
#

I dont know if Id be able to help with setting up that system broadly, but Ive been trying to improve the time trial jokers in Balatro Goes Kino, which would be code very easily transfered to a system like that

zealous glen
smoky seal
#

It might well be this exists already, but I couldn't find anything

zealous glen
cedar stream
#

anyone looking to help out with making the example mod im working on have better explanation

zealous glen
#

With a Boss Blind

smoky seal
#

Ohh I see.

zealous glen
#

I had also joked about a SUPERHOT mod

smoky seal
cedar stream
red flower
hushed field
#

Biggest issue for a time-gate mod would be having a neat UI, I think. Most of it would easily handled with a dummy joker and a timer in an event!

smoky seal
zealous glen
# smoky seal Haha, that sounds cool

The joke was just that it would make the game awful/impossible to play 😅 maybe it could be made into something playable, but then it wouldn’t be a joke

smoky seal
#

Also my other mod idea that I did have working was "Balatro Sabotage". It actually worked well but I got blocked by the UI system as it was too confusing. Basically, it starts a webserver and allows your friend to sabotage your game. I have video for that too. Hold on

hushed field
cedar stream
red flower
zealous glen
# smoky seal

There was a mod to connect Balatro with Twitch I think

smoky seal
# smoky seal

I made a nice little web UI for it which I was proud of but yeah, I was skill-checked when it came to making Balatro do stuff

hushed field
manic rune
#

why and how did this person appear out of nowhere and started posting extremely cool stuff

#

😭

#

what

zealous glen
hushed field
manic rune
#

yeah, you

#

those are all amazing

smoky seal
#

Haha, thank you. I'm looking for someone to work with

cedar stream
hushed field
manic rune
#

i really hope you will find one soon, because these projects are super amazing - and it actually shocks me that I've never heard of them before

manic rune
smoky seal
#

I expect the clock to be somewhere in the UI, same font as the game. I want it to look native. I can probably do most of it but get blocked on:

  • The best way to write logic outside of Joker calculation functions (for things like global events or general state checks)
  • I am pretty sure I can't do the art. Else it would look like a 5 year old did it
hushed field
smoky seal
red flower
hushed field
#

Haha, I get it. I just mean that there's a lot of people who share their stuff with friends, or only when it's finished, compared to a lot of people that are active here basically logging the entire mod process from not knowing how anything works up until a release

zealous glen
manic rune
#

before you released balatro goes kino :3

#

i think it was about the uhh cards with popcorn + theatre curtains?

smoky seal
#

I see. This is insightful. I thought I was proud of my mods until I tried Cryptid and saw the Code Cards and then cried inside

smoky seal
hushed field
#

Cryptid's cool to play with, but also a huge community project with a lot of spaghetti code, haha. I tend to be as impressed by the people that write that code as those that are still able to read it and get what it does, haha

red flower
#

new project: cryptid remade

zealous glen
#

New project: Cryptn’t

smoky seal
#

Cryp-dont

hushed field
#

But the UI stuff for a clock seems pretty doable 🤔

Also, to see some impressive code in a Balatro mod, I'm going to plug #1338302514616995892 again, haha

brazen tusk
#

Crypt-idn't

smoky seal
#

Make a Ned Flanders version - Cryp-tiddly

#

Okay, I made myself laugh too much at that

maiden phoenix
hushed field
#

I'd also be up to do some pixel art for jokes and such, Darren

smoky seal
hushed field
maiden phoenix
hushed field
#

On that note, I should figure out why this alien Abduction stuff keeps crashing. I was gonna debug today but instead I've just Clair Obscur'd

red flower
#

im going to add banish to playing cards

#

abduction 2

hushed field
#

I suspect Kino and JoyousSpring are already a nightmare mod combo anyway, so bet few things can make it worse haha

maiden phoenix
#

If I want a nightmare mod combo I put on Brainstorm and Saturn balatrojoker

red flower
#

what happens with incantation + saturn

cedar stream
next elk
#

okay fire, havent coded logic yet and i think ill leave it for later

smoky seal
#

Maybe I should make forum threads for the Sabotage and Time Trial mod ideas

hushed field
rotund ridge
#

hello im looking for a dev that would be more ui centred for my mod i need like title screen changed and some other miscellaneous things i will pay you dm me if interested

wheat pulsar
#

hi, someone have a sample of triboulet or any joker when a card score do something?

wheat pulsar
#

omg ty!

sonic cedar
#

does anyone know enough about smods to tell me why this doesn't work now so i can fix it? (it did on an older version but more recent versions dont)

maiden phoenix
red flower
#

im only missing the sprite manipulation stuff

and testing

maiden phoenix
#

Just wondering, is it safe to call a value from context.scoring_hand in the first check?

#

for hanging chad

runic pecan
next elk
#

steamodded vscode extension when

maiden phoenix
sonic cedar
runic pecan
crisp coral
red flower
next elk
red flower
maiden phoenix
crisp coral
#

would it? idr if it would crash

maiden phoenix
#

I think it does that's why I'm asking

runic pecan
red flower
#

repetition seems to be always called with scoring_hand in G.play

red flower
maiden phoenix
#

Oooh I was wondering why in my early days of modding some context would crash randomly (I wasn't familiar with lua at the time)

wheat pulsar
#

hi, im trying to make a card that upgrade each time you play a hand with stone cards, i think i need to add a context to know when a stone card triggers

frosty rampart
#

so do you want the card to upgrade every time a stone card is scored, or once if the entire hand contains any stone cards?

red flower
frosty rampart
#

yea that's all you'll need to do

wheat pulsar
#

is any documentation of how the context works?

#

btw thanks its working now

#

: )

red flower
maiden phoenix
#

Any reason you'd use in_pool instead of the enhancement_gate? SMODS has it too

red flower
#

to have an example

maiden phoenix
#

If it's just to show in_pool that's nice too

#

Fair

red flower
#

same with the unlocks

maiden phoenix
#

Right

plain apex
#

bruh i just got on to test a new thing i made and you really out here giving me the soul NOW?

#

don't know if modded codes even correspond to anything unmodded but instant soul if they do lmao MG9744A7

sleek cliff
#

lmaoooo

#

should I change the context to if context.before and next(context.planet_use) or something like that

red flower
#

what do you want to do

sleek cliff
#

every planet card used, gain +5 mult (currently +0)

red flower
#

oh then use context.using_consumeable

sleek cliff
#

ooo I forgor abt that jonker

sleek cliff
#

wait hold on here

sly python
#

can i get help in this channel or nah bc nobody will help in the chat channel

sleek cliff
#

this is the help channel yeah

sly python
#

yay

#

so like i use bmm for mods cuz i really only play vinella+ and somtimes cripted but i want saturn and its not on bmm and when i downloaded it idk how to get it into bmm

sleek cliff
#

oh, this is for coding help

sly python
#

guh

#

where do i get modding help?

wintry arch
#

question for anyone who has stared at the source code enough: where do the magic numbers in the pseudoseed function come from?

limber blaze
#

im pretty sure they are just chosen/generated to give random enough looking results

#

idk if they mean anything

wintry arch
#

im mostly interested in reverse engineering the rng algorithms to try and find cool bugged seeds

next elk
#

i dont really get how to make joker descriptions like Steel Joker, can anyone explain pretty please

next elk
#

(Im dum dum and wont understand without seeing it in actual code)

sleek cliff
sturdy compass
#

Random question since it seems to be undocumented and I wanna check before I try, but can I run context.individual through G.consumeables?

wintry solar
#

Yes

#

Every context that goes through a joker will go through your consumables too

wintry arch
#

my mathematical understanding of the function is that it is a chaotic function which will likely not have more than one or two true fixed points (besides nan). but those fixed points as well as some cycles could still exist, floating point rounding willing.

sleek cliff
brazen tusk
#

is there anything about events on the smods wiki? been trying to find smth

daring fern
brazen tusk
#

ty

maiden phoenix
#

@red flower I saw your comment where key_append allows an added card to identify its source. Where is it actually on a card? Like card.key_append ?

spring thistle
#

I am trying to make a joker that gets stronger for each consumable held in a specific set using this:



function get_arrows()
    local arrowCount = 0   
    for i = 1, #G.consumeables.cards do
        local card = G.consumeables.cards[i]
        print(card, card:getQty())
        for i, v in pairs(card) do
            print(i,v, type(i), type(v))
            if card.set == 'Arrow' then
             arrowCount = arrowCount + (card.getQty and card:getQty() or 1)
            end
        end
    end
    return arrowCount
end

I'm not sure how to check the set, as it seems to be absent from the cards.

red flower
spring thistle
#

thanks

maiden phoenix
red flower
#

yeah

maiden phoenix
#

Damn

red flower
#

maybe I could make that more clear

glad osprey
#

is there a flipped E (Ǝ) in the balatro font

brazen tusk
#

the delay here feels like its taking way longer than it should, if after not the correct trigger to be using?

shut crater
#

that feels right based on vibes

glad osprey
#

why are you flipping thunk

shut crater
#

(I don't see any errors)

brazen tusk
#

cant use context's inside events afaik

glad osprey
brazen tusk
sleek cliff
red flower
#

try doing everything in an event

brazen tusk
#

so after in the events thing takes place after everything?

#

makes sense i just wanna clarify

red flower
# sleek cliff

you name it center in the loc_vars parameters but use card after, stick with one (preferably card)

red flower
daring fern
#

How does one stop particles from being created?

hard needle
#
G.E_MANAGER:add_event(Event({
                        func = function()
                            held_card:start_dissolve()
                            
                            return true
                        end
                    }))
                    G.E_MANAGER:add_event(Event({
                        trigger='after',
                        delay=0.7,
                        func = function()
                            held_card:remove()
                            card.removed = true
                            return true
                        end
                    }))

i don't think this is properly destroying the cards.. it seems like it still remains in G.playing_cards?

red flower
#

is this during scoring?

hard needle
#

it's in context.selling_self

brazen tusk
red flower
#

or something it's a bit trial and error

daring fern
red flower
#

hmm make the card invisible?

brazen tusk
quick kraken
#

Does anyone know Extra Credit's policy in terms of looking at their code for reference?

#

Extra Credit, the mod by the people in Balatro University's community

brisk rose
quick kraken
#

"policy"

#

I just want to know if they'd be ok with it

#

Something in the past happened with Polterworx about "stolen code" and since I plan on eventually releasing the mod I'm developing I'd prefer if that didn't happen

brisk rose
#

Not cods

quick kraken
#

I remember it being also code

daring fern
brisk rose
#

Though don't look at extracredit for anything enhancements related. They use the quantum enhancements stuff which is pretty unstable

quick kraken
#

I was interested more so about how to make something "can't be debuffed"

wintry solar
# quick kraken I remember it being also code

I’m pretty sure almost everybody here will be fine for you to look at their code, and if you copy it to use yourself just put some credit somewhere stating where it’s from - it stops all discontent from happening straight from the off

quick kraken
#

I'd feel safer if there was an official statement, I could ask one of the developers, or I was told how to do the thing I was aiming to do without having to look at it

brisk rose
# wintry solar What do you mean by this

Well, the very fact hay extracrwdit uses the newer (get_enhancements instead of has_enhsnvement seems to be why that one stack overflow only happens when it is installsd

#

The one with aetherjokers

#

And I presume that's not the only such isssie

cerulean bane
wintry solar
#

No that’s a coding issue in aether jokers

brisk rose
chrome widget
#

Curious, why exactly is it preferred to use G.GAME.Blind instead of self within the SMODS Blind methods?

daring fern
wintry solar
#

Without seeing your entire mod list, I’d assume extra credit is your only mod that’s enabling quantum enhancements

brisk rose
wintry solar
#

As long as mods do their calculations correctly quantum won’t cause any issues at all other than a slight performance hit, hence why it’s optional

daring fern
brisk rose
#

I mean... Mods that don't tale into account he was that get_emhancements existing chamgr how has_emhsnvement works aren't really doing anything 'wrong.' He documentation isn't clear on the fact that happens

wintry solar
#

It’s not that, it’s calculate functions they aren’t targeting specific contexts that is the issue, and there are lots of other things that will crash when you do this anyway. Because of how calculation works with using one function over and over, you must be very specific on how you ensure you are only having your code called at the correct timings

brisk rose
#

Artherjokers has a fix for its issue j haven't been able to test yet because when I update everything in my nodpzbk, it just crashes at boot, lol

#

It isn't caused by aether either

#

Idk what's doing it

#

And yes this is the who I e tracebsck. It's a hard crash

#

It persists when I restart my computer

hollow sphinx
#

trying to make a joker that sets hands to 1, but it just sets it to zero. replacing nil with +1 just makes the game crash

wintry solar
#

This is taking away the number of hands you have left

#

X-X=0

hollow sphinx
#

yeah fixed it on my own by doing this

glad osprey
#

is this too op

sage crater
glad osprey
#

yea

#

its also legendary

sage crater
#

If you made it the same increase as campfire, i think it would still be legendary-worthy

#

Especially because you can reroll the shop and get hella jokers to sell

#

Oh wait, it’s every 3 jokers

brisk rose
#

Yeah

#

And only jokers

sage crater
#

Ok yeah I think the 0.5 is good

brisk rose
#

I think onus a good legendary

sage crater
#

Lots of jokers are cheap, and riff raff exists

brisk rose
sage crater
#

That’s fair

#

With each added joker, synergies between two specific jokers become harder to acquire

#

Also a riff raff doesn’t even give x0.5 per round

#

So it’s not a major synergy

#

Also also, you need space to hold the jokers

shut crater
hollow sphinx
#

trying to make a joker that sets hands to one, but if you have 2 of them / blueprint the effect will activate twice and you will usually have negative hands. tried to fix this with the "and G.GAME.current_round.hands_left >= 2" but both still activate

red flower
#

you need to calculate the amount inside the event instead of outside i think

hollow sphinx
#

changed to this, both still activate

sonic cedar
brazen tusk
shut crater
raven forge
sonic cedar
sonic cedar
sonic cedar
shut crater
sonic cedar
#

like I said it used to work but I forget when I did but I updated smods and now it doesn’t work

raven forge
#

the code relies on calculate_joker(), better calc might mess with things then

#

hm, in theory it should still do something. hm

chilly hull
#

this is absolutely doing absolutely nothing i have no idea why :(

sonic cedar
raven forge
#

what is the card.ability.extra.chips > 1 check doing?

sonic cedar
#

talisman

raven forge
#

if it starts at 0 how could it ever gain chips?

wintry solar
#

Use SMODS.calculate_context instead of doing a calc joker call

#

You don’t handle the return table here

sonic cedar
#

(i literally have never seen that in my life)

wintry solar
#

It should still gain chips though

raven forge
#

it has two conditionals, and both are guarded by a >1 check. I think it does nothing

sonic cedar
#

all i did was comment it out when it stopped working

#

only now am i actually changing stuff

raven forge
#

the intended check was probably: if the joker's chips > 0 in the first part, give +chips; no condition for the second part

next elk
#

how can i make an enhancement which copies itself to another card?

sonic cedar
#

the chip gain is before the scoring though

wintry solar
# sonic cedar

Instead of the whole loop you do SMODS.calculate_context({context table here})

sonic cedar
#

ohh

#

where do i reinclude the if statement

wintry solar
#

The only if statement you need is the first one thet compares the mult values

#

-# ewww to_big 🤮😂

sonic cedar
raven forge
#

yeah not even that. if to_big() < to_big() then SMODS.calculate_context({...})

wintry solar
#

Yeah, just send the context to everything anyway

sonic cedar
wintry solar
#

You can narrow it down to only when you have your joker if you really want to, but it isn’t necessary

shut crater
sonic cedar
#

i think it was like that before as a "just in case"

raven forge
wintry solar
#

If you did want to do that though, I’d suggest using if SMODS.find_card('joker key') then

wintry solar
#

Oh snap you are right

sonic cedar
#

was about to say i need next() right

wintry solar
#

Mobile typing whilst tired is not the thing 🤣

red flower
#

i forget all the time

raven forge
#

this chat moves so quickly. comments get lost

raven forge
wintry solar
#

I’d need to see more of the code

sonic cedar
#

dude selling_self is so weird stg

wintry solar
#

It looks like it’s nested within a different condition

raven forge
#

it might be a bit more difficult than normal. what do you want to happen

chilly hull
next elk
brisk rose
# brisk rose

could this have been happening because i forgot to close balatro on my other pc?

#

that sounds so strange if true

sonic cedar
#

IT WORKSSSS 🙏 thank you guys

brazen tusk
#

adding context.before makes this not work but i want it to change the rank of the card before scoring, anyone know how i could do that?

raven forge
next elk
# next elk dw lol

i worded it iffy tho, its not really coping, moreso changing enhancement

shut crater
# brazen tusk

context.before and context.individual are not friends, and context.other_card only exists in context.individual

brisk rose
raven forge
#

well I was a very private person. until recently

shut crater
brisk rose
zealous glen
#

buy your ejwu2 stocks now

shut crater
#

ejwu2coin hype

wintry solar
#

bring back ejwu!

raven forge
# next elk dw lol

the trouble with adding enhancements to cards specifically during scoring is that Midas Mask has this weird thing with adding enhancements, but then not displaying them until animation time. but I think you can go with Midas Mask as a reference for adding enhancements

wintry solar
#

I think that account had a blue default profile pic

zealous glen
maiden phoenix
#

Soon ejwu2 will have a pfp

#

Maybe i'm crazy

raven forge
#

who knows

brisk rose
next elk
wintry solar
#

Oh he was grey 😢

zealous glen
#

You're getting this wrong

#

ejwu2 is shiny

#

Their market value is through the roof

sonic cedar
#

5 whole dolar

brisk rose
#

yknow.... git commit should just default to git commit -a -m "updates" :P

#

I'm sure that wouldn't be a terrible idea at all

#

lmao

maiden phoenix
brisk rose
marble flint
zealous glen
#

I like git tree

#

which could be git dog or git god

#

git log --graph --oneline --decorate (actually I don't remember if it's one or two hyphens)

primal robin
#

...just press button is vscode to commit

red flower
#

just upload all the files manually to github

brisk rose
zealous glen
#

(pre-github)

brisk rose
marble flint
#

(or in cmd, for /f "usebackq tokens=*" %i in (`git rev-parse --show-toplevel`) do git add %i && git commit -m "updates")

marble flint
#

which is why it's a footgun

brisk rose
#

lol

unkempt thicket
#

Whats the var for the total mult right before its calculated with chips?

sonic cedar
#

is it possible to have a variable that persists change between runs (yes) AND even when the game itself is reopened? (the variable will reset anyway otherwise)

i figure it's something to do with storing information in the prof- holy shit

brisk rose
#

ngl

raven forge
marble flint
brisk rose
sonic cedar
brisk rose
#

i think

unkempt thicket
raven forge
brisk rose
brisk rose
sonic cedar
raven forge
#

ok it should just be something like G.PROFILES[G.SETTINGS.profile] = ... I think

marble flint
frigid blaze
#

Can you tell me how to make j5 when appearing on your hands remove for example j_mad and j_you?

brisk rose
#

just recently learned how to change the branch of a submodule properly

marble flint
#

they also make life awful for anyone else downloading your code

#

the github download as zip button Does Not Work

brisk rose
#

with everything already cloned

marble flint
#

git clone URL Does Not Work

#

it's just a massive pain point for anyone used to doing it a certain way

brisk rose
#

I know

marble flint
#

yes i know that but it's painful to figure that out

brisk rose
#

I don't target git users anyway, especially saying as main is never stable

#

hence the release zip

raven forge
brisk rose
# brisk rose hence the release zip

which I am aware is a violation of any non-OSS license, but I'm still convinced that steamodded mods have to be gpl compatabile. Regardless if I get any complaints i deal with them respectfully

frigid blaze
raven forge
#

do you have a language you would prefer to english?

brisk rose
#

which is weird

frigid blaze
brisk rose
#

damn love.https

raven forge
brisk rose
#

unforutnately

raven forge
#

wait, you HAVE to speak english???

brisk rose
frigid blaze
daring fern
#

How does one get the return of a vanilla joker without having a card to input?

brisk rose
#

it's a gimmick I've seen before

raven forge
#

yes, it's clear

frigid blaze
brisk rose
#

but also yes

raven forge
#

the rules of the server say you have to speak english, to be clear

#

I didn't realize

frigid blaze
frigid blaze
raven forge
brisk rose
raven forge
brisk rose
#

you use set_ability, not add_to_deck because add_to_deck retriggers when it's undebuffed

#

afaik

daring fern
frigid blaze
raven forge
brisk rose
#

my bad

raven forge
frigid blaze
brisk rose
#

delete one of each of them (incause you have more than one cause showman)

raven forge
# daring fern All jokers in one joker?

hm, in that case you probably can just pass the one omni-joker as the card. but forcing the requisite calculation functions to run even when card.ability is not actually equal to the one in question might be slightly awkward?

frigid blaze
brisk rose
#

unless it itself can be a pre-req

raven forge
peak void
#

where are the consumables in the source? i can't find them in card.lua

brisk rose
daring fern
brisk rose
#

or else people will be kinda boned with showman

peak void
#

ah i spelled it wrong

raven forge
#

thunk misspelled it, really

brisk rose
#

if you can spell, then coding isn't for you anyway

#

it's like doctors and handwriting

peak void
#

i cannot find for the life of me the suit changer tarots

#

i found sigil at least 😭

brisk rose
raven forge
#

they're not there directly. look for suit_conv

#

they're looking for where their effects are defined I think. not the original definition

brisk rose
#

ah i see

peak void
#

yeah im just trying to see how card suits are changed

brisk rose
#

but it should still have the keys there?

peak void
#

change_suit keeps breaking

raven forge
#

all of them use the same logic so searching for moon unfortunately doesn't work. suit_conv I think

brisk rose
#

damn thunk and his schizo codebase /j

peak void
#

ok it IS just change_suit("[Suit]")

#

i have no clue why this wouldnt work

brisk rose
peak void
#

i see

brisk rose
peak void
#

wait why is there a semicolon in there

#

uhh

#

thats my bad

brisk rose
# brisk rose

also wait... what if a suit and rank have the same key?

#

that seems problamatic

peak void
#

like a club of clubs? a king of kings?

edgy reef
#

Probably not a problem, actually.

brisk rose
vale glen
#

Internally, that function just writes 'S_R' as part of the card key, so it doesn't affect anything

brisk rose
#

that's what i meant

#

oh nil

vale glen
#

Where s is suit and r is rank

brisk rose
#

nvm

#

I didn't see that you passed nil for the ommited param

#

I see now

peak void
#

yeah you omit it by using nil for the suit

worthy stirrup
#

How could I make my own consumbable tab for my own consumables?

#

like this

brisk rose
#

consumabletype constructor rather

frigid blaze
#

Tried it like this, it doesn't work

brisk rose
#

because if you just mean a tab for each new type, that happens automatically

worthy stirrup
#

I want to make a type of consumable, called Objects of Power, and I want my Objects of power to be found in it. If that makes sense

worthy stirrup
#

Okay, thank you

brisk rose
#

SMODS.ConsumableType

daring fern
#

How does one prevent this?:

brazen tusk
# worthy stirrup Okay, thank you

can use this base if you want

SMODS.ConsumableType({
    key = "key",
    loc_txt = {
        name = 'name',
        collection = 'collection name'
    },
    primary_colour = HEX('000000'),
    secondary_colour = HEX('000000'),
    collection_rows = {6, 6},
    shop_rate = 1,
    default = 'c_prefix_key'
})
worthy stirrup
#

Thanks!

brisk rose
brisk rose
sonic cedar
brisk rose
#

is that an eternal playing card?

#

no it is a joker

#

so yeah idk why that happened

brazen tusk
#

bro is squished

#

actually

#

just looks rotated

next elk
#
SMODS.Enhancement {
    key = "infected",
    loc_txt = {
        name = 'Infected'
    },
    atlas = 'enhancement',
    pos = { x = 0, y = 0 },

    calculate = function(self, card, context)
        if context.final_scoring_step then
            for _, scored_hand in ipairs(context.scoring_hand) do
                if scored_card() then
                    scored_card:set_ability('m_infected', nil, true)
                    G.E_MANAGER:add_event(Event({
                        func = function()
                            scored_card:juice_up()
                            return true
                        end
                    }))
                end
            end
        end
    end
}

how can i make this one work like a consumable? as in trigger the action when played

daring fern
brisk rose
#

it really does show that love2d is a 3d framework, lol

#

becayse the floating of the sticker is real and in the 3rd dimesnsion

daring fern
#

Also you need your mod prefix.

brazen tusk
#

if im in context.before how would i assign a card that returns true on an if a variable?

next elk
#

but first i need to make it work like an enhancement lol

daring fern
next elk
#

oh ok

raven forge
daring fern
brazen tusk
gusty sequoia
#

I touched my atlas (to change where it gets the pngs and such) and now its broken

#

Idk what to do :(

brazen tusk
#

what did you change?

gusty sequoia
gusty sequoia
# daring fern Code?

SMODS.Atlas{ key = 'TahModAtlas', path = 'DahrinJokers.png', px = 1208, py = 1616 }

next elk
#

not whole file

gusty sequoia
raven forge
gusty sequoia
#

Fuck

sonic cedar
#

how would i check for if it's the end of the round but outside of a joker?

gusty sequoia
next elk
brazen tusk
gusty sequoia
daring fern
vale glen
brazen tusk
#

oop

#

mb

#

get those mixed up

gusty sequoia
#

I'm gonna hope that fixes it

brazen tusk
#

should help at least lol

gusty sequoia
#

Hopefully

sonic cedar
gusty sequoia
#

It didn't fix it, but I do wanna know, my jokers are that size so is it gonna break their images when it does eventually work?

frigid blaze
brisk rose
sonic cedar
#

(ignore the intellisense)

daring fern
sonic cedar
#

with hammers you are killing me

tall apex
#

Hammers.,,,

sonic cedar
#

would you prefer rocks

vale glen
#

What are you trying to do with the crimson count thing, anyways?

raven forge
#

aah link

brisk rose
sonic cedar
#

but if i dont save it to profile itll reset if i reopen the game

brisk rose
daring fern
sonic cedar
#

it's for an unlock so im not sure

#

the hook maybe i'd have to actually look at Blind:defeat

vale glen
#

Mmh, a hook for Blind defeat seems good here

daring fern
sonic cedar
#

just gotta make sure to put it OUTSIDE of the for loop lmao

#

do not need it hitting on every joker

worthy stirrup
#

is there a way to force my Object's of power to use a specific shader?

brisk rose
#

kinda a shame

daring fern
sonic cedar
#

so it saves to the profile

gusty sequoia
daring fern
#

G.SETTINGS.profile

raven forge
worthy stirrup
zealous glen
sonic cedar
zealous glen
#

I know there's a limit to how big they can be

raven forge
sonic cedar
#

nono

gusty sequoia
#

I can make multiple Atlas's right?

zealous glen
#

Yes

sonic cedar
gusty sequoia
#

I'll be back with results asap!!1!

raven forge
#

oh, init_game_object. shouldn't need anything related to it; you can just assume the value is nil to start, and do the classic x or 0 pattern

brisk rose
#

but that was just through the debugplus console and not in a run or anything

raven forge
#

right, sorry. you should probably force a save

#

also hopefully there's no race condition with savescumming defeating the boss. I wouldn't worry too much about that though

brisk rose
#

I think it saves the profile whenever you exit a run, so it's fine

worthy stirrup
brisk rose
raven forge
gusty sequoia
#

I wish I knew enough to be able to help other people

worthy stirrup
#

ive checked, i havent seen aynthing

brisk rose
#

I'm still shcoked that the blinds have literally zero stats tracked in the profile

#

nothing

#

the only thing boss related is 'boss_streak'

#

which wouldn't be surprising just looking at the stats screen, but there's all sorts of unused values there

#

in the profile itself

raven forge
frigid blaze
#

What other functions are there besides calculate?

worthy stirrup
#

ive only seen draw(self, card, layer) but, i dont know where to go from there

#

i just dont know how to have it apply a shader

daring fern
worthy stirrup
#

ill try that

#

just to check, should i sent the shade key

raven forge
hollow sphinx
#

making a joker that sets hands to one, but when i have more than one of the joker/blueprint it activates on both, leading to negative hand size

worthy stirrup
#

ah, got it

#

i send Prefix_Key

brazen tusk
#

currently trying to make this in context.before so i need to use a for and go through the cards

if context.individual and context.cardarea == G.play and SMODS.Ranks[context.other_card.base.value].key == card.ability.extra.currentrank then
    babacard:flip()
    assert(SMODS.change_base(babacard, nil, card.ability.extra.newrank))
    G.E_MANAGER:add_event(Event({
        delay = 0.1, 
        func = function()
            babacard:flip()
        return true 
    end }))
end

not sure how to add the applicable cards into a table

#

this is where im at this it 💀

hollow sphinx
#

oh that's what you meant, my bad

daring fern
hollow sphinx
frigid blaze
#

Here's what worked for me, I just added it to each joker)

hard flume
cobalt arrow
#

Can someone help? I'm creating a Joker that whenever a joker is sold, there's 1 in 3 chances to a joker from a table to be created...but I am having problems to "creation" part . How i'm suppose to make this?

shut crater
#

you won't use a return for that effect

cobalt arrow
#

oh

shut crater
#

instead you'll use SMODS.add_card

cobalt arrow
#

CHASEOQUESO

shut crater
shut crater
cobalt arrow
#

remember the Tralalero Tralala joker?

shut crater
#

uh

cobalt arrow
#

you helped me somedays ago...

#

i got it to make it work!!

shut crater
#

oh yeah

#

nice!

cobalt arrow
#

thank you very much

#

your loop idea was right

shut crater
#

glad you got it working!

cobalt arrow
gusty sequoia
#

To add another Atlas I can just copy the first Atlas and change the needed parts, right?

daring fern
cobalt arrow
#

oh i got it

shut crater
#

create_card just creates it

cobalt arrow
#

like this?

shut crater
#

you need curly braces

#

but pretty much

cobalt arrow
#

o7

red flower
#

card instead of self on the odds

shut crater
#

good catch

cobalt arrow
#

i have one doubt about this...

gusty sequoia
#

I just solved the problem I was about to ask about

cobalt arrow
#

can I specife this in the key = (...)?

rapid stag
#

keys for jokers added via SMODS are always j_[your mod prefix]_[your joker's key]
but yes

shut crater
#

key would be for a specific card

#

not for a group of cards

cobalt arrow
shut crater
#

so you want it to create a joker from a table of jokers?

cobalt arrow
#

yes

#

but no, because the table are jokers with "_brainrot" in their names

#

i used this to tralalero tralala

shut crater
#

the way I would probably do it is by using key, but in order to make it a random joker from the list, you'll need to randomly select a joker using pseudorandom_element or something similar

cobalt arrow
#

not a set table

shut crater
cobalt arrow
#

okok

cobalt arrow
#

perfect

#

thanks chaseoqueso

#

i'll try

sonic cedar
raven forge
#

er, basically (x or 0) is a way to say, if x is nil, the result is 0, otherwise the result is x. to avoid an error

#

it wasn't very specific no. put whatever you want in x

shut crater
#

variable = variable or 0

sonic cedar
shut crater
#

or in general just the second part to ensure no nil values

brazen tusk
#

pretty sure other_card wont work in here, how could i get this to function otherwise? (also idk that it would)

sonic cedar
shut crater
#

unless currentrank is a string and not a number

brazen tusk
#

its a string

#

im using the keys

shut crater
#

regardless v is the replacement for context.other_card

#

in that loop

tall apex
#

I like keys they make good noises

brazen tusk
#

aight ty

gusty sequoia
#

Is there an example mod thing for enhancements?

cobalt arrow
#

how i make loc_vars for an odd?

#

or better, how I correct this "nil in nil"?

shut crater
#

do you have a loc_vars function yet?

shut crater
daring fern
gusty sequoia
shut crater
#

I stand corrected

gusty sequoia
#

Thank you mate :D

cobalt arrow
shut crater
#

return { vars = { odds = card.ability.extra.odds } }

sonic cedar
# daring fern

so how would i do a hook for blind defeat here
it's not in init game object right so how

shut crater
#
local defeat_ref = Blind.defeat
function Blind:defeat(self, silent)

  return defeat_ref(silent)
end
low parrot
#

Hi, so i was wondering if there's a way so a joker changes all hands played into High Card??

daring fern
cobalt arrow
frosty rampart
#

You don't need to define an odds variable outside of the return in the first place

sonic cedar
cobalt arrow
#

it's already defined

frosty rampart
brazen tusk
#

my logic here is probably very wrong, could i get a proof read pls

        local baba_cards = {}
        if context.before and context.cardarea == G.play then
            -- Sort cards into baba_cards
            for k, v in ipairs(G.hand.cards) do
                if SMODS.Ranks[v.base.value].key == card.ability.extra.currentrank then
                    baba_cards[#baba_cards +1] = v
                end
            end
            -- Convert cards in baba_cards to newrank
            for i = 1, #baba_cards do
                local babacard = baba_cards[i]
                babacard:flip()
                assert(SMODS.change_base(babacard, nil, card.ability.extra.newrank))
                G.E_MANAGER:add_event(Event({
                    delay = 0.1, 
                    func = function()
                        babacard:flip()
                    return true 
                end }))
            end
        end
worthy stirrup
#

How do i make this a 3 x 3?
I have the code like this rn

SMODS.ConsumableType({
    key = "OOP",
    loc_txt = {
        name = 'Objects Of Power',
        collection = 'Objects Of Power'
    },
    primary_colour = HEX('000000'),
    secondary_colour = HEX('000000'),
    collection_rows = {4, 4},
    shop_rate = 0,
    default = 'c_o'
})
#

i tried 3, 3 but it didnt work

manic rune
#

collection rows

worthy stirrup
#

oh

#

it just hit me

brazen tusk
#

how would that even work actually

worthy stirrup
#

its {3, 3, 3}

worthy stirrup
#

its how many you have per row

brazen tusk
#

i moreso meant how would it look

worthy stirrup
#

ohh

#

1s

brazen tusk
#

o7

worthy stirrup
brazen tusk
#

oh it just changes the box size

worthy stirrup
#

yea

brazen tusk
#

v cool

gusty sequoia
manic rune
brazen tusk
#

^^

cobalt arrow
#

This is how I make selling a card create a random joker?

worthy stirrup
#

I wont lie, they are placeholders that were ripped from the game Control and then shrunk down

brazen tusk
#

understandable

shut crater
brazen tusk
shut crater
brazen tusk
#

wait what is G.hand.cards again?

shut crater
#

the cards in the player's hand that they didn't play

brazen tusk
#

ah i am doing it in the wrong place then

cobalt arrow
shut crater
smoky seal
#

Does anyone have a good example of have to make a fake joker. I assume there's a way to hide it and stop it coming up in games

cobalt arrow
#

I added two "Oops All six"

shut crater
shut crater
cobalt arrow
#

I have this now

daring fern
#

Also you don't need area I don't think.

smoky seal
#

Is pos required if you don't provide an atlas

shut crater
smoky seal
shut crater
smoky seal
#

What about cost, rarity, etc.

smoky seal
#

Ohh yeah. Sorry didn't see the split in params for optional

shut crater
#

technically only key and a localization entry are required

cobalt arrow
shut crater
cobalt arrow
shut crater
#

and can you show the whole joker just so we can see easier

brazen tusk
cobalt arrow
#
    key = 'bombardino_brainrot',
    loc_txt = {
        name = 'Bombardino Crocodilo',
        text = {
          'When a Joker is sold,',
           '{C:green}#1# in #2#{} chance of creating',
           ' a {C:attention}Italian Brainrot Joker{}'
        },
    },

     atlas = 'Jokers',
    pos = {x = 0, y= 1},
    config = { extra = {odds = 3} },
    rarity = 2,                                          
    cost = 5,                                          
    blueprint_compat = true,                              
    eternal_compat = true,                               
    unlocked = true,                                     
    discovered = true,                                  
    effect = nil,                                          
    soul_pos = nil,

         loc_vars = function(self, info_queue, card)
          local odds = card.ability.extra.odds
          return {
             vars = { G.GAME.probabilities.normal,
             odds
             }
            }
            end,

    function(self, card, context)
      if context.selling_card  then
        SMODS.add_card {

          set = 'Joker',
          area = G.jokers
          
        }
      end
    end```
shut crater
cobalt arrow
#

BRO HOW I MISSED THAT

#

😔

#

sorry chaseoqueso

shut crater
#

lol all good

shut crater
cobalt arrow
#

trying again now

#

IT'S WORKING CHASEO

#

adding the randomness now

shut crater
#

based on the current code I think it will probably still create jokers if you sell consumables

#

you should test that

cobalt arrow
naive raptor
#

i need help with a joker effect. when the joker is triggered, i need the game to pick either seals, enchancements, or editions, and then apply a random one of the chosen modifer onto the current card

shut crater
cobalt arrow
#

added the randomness code

shut crater
#

but I'm not at my pc rn so I can't check specifically what you're looking for

shut crater
naive raptor
#

also how does pseudorandom work? what does it output?

brisk rose
#

just in case

shut crater
shut crater
naive raptor
#

alright

cobalt arrow
shut crater
#

can you show the full crash log

naive raptor
brazen tusk
shut crater
naive raptor
#

lol ok

shut crater
#

idk how lua stores floating point numbers

cobalt arrow
daring fern
#

It'll auto send as a file.

cobalt arrow
smoky seal
#

Sorry If I'm being stupid again. How can I get the fake joker to trigger on every hand.

I can see it loaded but want to make it fire every time a hand is played.

daring fern
smoky seal
#

Whenever, before or after. I just want it to trigger. I am just testing my first fake joker

#

The right image is in my collection, not my current deck. I presume I need to tell the game to add it

daring fern