#💻・modding-dev

1 messages · Page 57 of 1

rough furnace
#

I'll have to investiage further

night pagoda
#

Is there any documentation on custom configs or maybe I can borrow from something? 👀

languid mirage
#

yes and I'm saying that it's effort for every qol mod to set up

frosty dock
#

cryptid for custom tabs

night pagoda
#

ty!

#

🫡

frosty dock
#

and idk, like galdur or something for a more normal config tab

languid mirage
#

and additionally it's all cool when it's one tab that you add in settings, but when the end user has 5 mods that add tab in settings, it makes the menu cluttered

frosty dock
#

is this where steamodded splits into a loader and a coremod API?

languid mirage
#

😹

frosty dock
#

i mean I'd rather not

languid mirage
#

I dunno

frosty dock
#

it's harder to maintain

languid mirage
#

yeah it is

#

I don't really know what a good solution for this would be

frosty dock
#

idk, just... embrace smods as a standard?

#

/j i do get that it's overkill and mostly not needed for some qol mods

#

the lazy solution is to have config UI be steamodded-exclusive and only support non-smods through editing the cfg file

red flower
#

I literally only use SMODS.load_file and the mod description/config tab stuff but I'd rather people install steamodded and avoid some headaches

wintry solar
#

Having config options that change position in the menus depending on what’s installed seems a sure fire way to confuse the hell out of everyone who even struggles with basic reading comprehension to install any mods

rough furnace
#

Maybe someone has to just make a lovley mod that adds support for smods config via some api and then just integrates with smods if it exists

frosty dock
#

we should call that MoreDependencies

wintry solar
#

Hey I know a lovely mod that adds support for smods config already!

rough furnace
#

The issue is it's hard to get users to install a separate mod for a mod to work

wintry solar
#

It’s called Steamodded 🙃

frosty dock
rough furnace
#

Honestly I would just recommedn people get steamodded. It isn't obtrusive by itself and most mods already depend on it so most people already have it

#

You could alos just not have config if smods isn't installed

wintry solar
#

Everyone has to install lovely anyway, I don’t see how adding an extra step makes it particularly more complicated for people

frosty dock
#

I stand by the position that multiple different core mods are a bad idea

rough furnace
frosty dock
#

yeah that's mainly what I'm concerned about

rough furnace
#

Unless one is just straight-up a replacement for the other such as when one is abandoned

#

Speaking of modifying core mpds I had a cursed idea to fork love2d and integrate lovely functionality into it so that we don't get anti virused

frosty dock
#

actually brilliant

edgy reef
#

How would we make Balatro use that version of Love2D?

rough furnace
frosty dock
#

me when i replace love.dll

rough furnace
#

Balatros exe is a zip and can be loaded by any version of love

#

Well at least across the same major versiin

#

Its a shame meth is busy and no-one else really understands how to modify lovely that much.

frosty dock
#

I'd like to see a feature where patches also get run through lua_load instead of just luaL_loadbuffer, I just don't even know rust properly

rough furnace
#

Like I think I know the root cause of the restart issue but I just can't fix it cause I'd have to rewrite a decent chunk of lovlet and my rust skills aren't that good.

#

Also rust seems like the wrong language for a dylib injector

wintry solar
#

didn't meth use rust because that's what was most familiar to them?

rough furnace
lament fjord
#

Steamodded made love.event.quit('restart') work, at least if that isn't borked somehow

#

I saw it in the commit history

#

Probably needs testing to make sure it actually does its thing tho

frosty dock
#

pretty sure it didn't, we just made our own version that completely restarts the process

wintry solar
#

I do SMODS[mod_id] to check for existance of a different mod right?

frosty dock
#

SMODS.Mods[mod_id]

#

or you can put it in an object's dependencies if you're trying to create an object that needs another mod to exist

wintry solar
#

nah just building in mod compat for galdur

frosty dock
#

the mod object may exist without the mod being loaded

wintry solar
#

ah yes I have just discovered this

frosty dock
#

So technically what you need is something like (SMODS.Mods[mod_id] or {}).can_load

#

at least that's the shortest way to phrase it

wintry solar
frosty dock
#

hard to judge balance-wise

#

but the jumps from 6->7 vs. 7->8 seem too irregular

#

quadratic vs. exponential means antes 6 and 7 will diverge quickly

#

scaling level 6:
5: 45.000
6: 180.000
7: 810.000
8: 1.600.000

wintry solar
#

yeah I was concerned about 7 and 8

frosty dock
#

i guess what feels wrong is that the scaling (i.e. first derivative) is constant between ante 7 and 8

wintry solar
#

maybe 50000 and 100000 incrementing is better

frosty dock
#

hm lemme experiment with it

wintry solar
#

it's just thunk numbers are kinda random

#

🙃

lament fjord
#

Then endless rolls around and suddenly you're facing faster-than-exponential ante scaling

#

Doesn't quite sit right with me that you end up at the superexponential score wall soon after winning, rather than after much longer

#

Even if it was merely exponential up until ante 20, most builds would stop being able to keep up before then

wintry solar
#

how dare you find issue with this calcullation

#

at least this scaling is consistent throughout the stake difficulty though

frosty dock
wintry solar
#

ante 4 and 5 😠

frosty dock
#

yeah...

#

this holds up somewhat nicely

#

the cubic sort of keeps things connected better

#

the exponential ante 8 is still gonna outscale it, obviously

#

but it feels right to have the final boss ante have the score jump instead of ante 7

wintry solar
#

yeah that looks smoother

frosty dock
#

here's n=10 for reference

wintry solar
#

it's almost identical at 4 and 5, I've noticed

frosty dock
#

1: 300
2: 1700
3: 7400
4: 31000
5: 65000
6: 450000
7: 3000000
8: 26000000

#

4 and 5 is way too flat compared to the rest

lament fjord
#

Is a score of ~100000 where builds that can't figure out a way to fit in xMult start to fall off even if they are very good in other ways? That might explain the peculiar ante requirement curve

frosty dock
#

maybe ante 5 can live between linear and quadratic and just scale as nlog(n)

wintry solar
#

I think it taking off at 6 is probably okay, it still gives you time to assemble a working play space

frosty dock
#

log_2 is definitely too harsh

rough furnace
frosty dock
#

consider 15000+5000n*ln(n):
n=4:

4: 13700
5: 42700 (start rounding off?)
6: 92000
n=5:
4: 16600
5: 55200
6: 132000
n=6:
4: 19500
5: 68800
6: 180000
n=10:
4: 31000
5: 130000
6: 450000

#

it sure looks smoother

wintry solar
#

yeah that looks a lot better

#

now to figure out getting significant figures T_T

frosty dock
#

yeah i rounded these quite arbitrarily

lament fjord
#

What's the working formula at this point

frosty dock
#
1: 300 
2: 700+100n
3: 1400+600n
4: 2100+2900n (jank)
5: 15000+5000n*ln(n)
6: 12000+8000(n+1)(n/2)
7: 10000+25000(n+1)(n/3)^2
8: 50000*2^(n-1)
#

oops

lament fjord
#

What does n stand for? Some kind of difficulty level?

wintry solar
#

ante 4 is super jank

#

yeah

#

well that doesn't seem accurate

frosty dock
#

uh what did you do

wintry solar
#

I multiplied by 10^string.len-2 but the number was a recurring decimal 🙃

lament fjord
#

2^((log n)^2) gives a growth rate faster than any polynomial, but slower than exponential

mellow sable
#

ok so here's an idea

frosty dock
#

I'd say n=10 is within the limits of where this formula doesn't make the jumps between 7->8 vs. 8->9 look ridiculous

mellow sable
#

what if they all used the same degree polynomial

#

just quadratic line-of-best-fit them all

lament fjord
#

You could probably tune it somehow to give a formula that is slightly gentler at ante 8 very high stakes

frosty dock
#

anything beyond that is just off

wintry solar
#

I suppose the other option is to include the ante level in the formulas

lament fjord
#

Also, a bit more description about how the ante 4 formula is jank?

frosty dock
wintry solar
#

this is default ante 4 values 5000/8000/9000. I don't know how you make a similar formula out of these

#

I just ended up ignoring them 🤷‍♂️

mellow sable
#

I'm just going to make ante 4 2nd one lower

#

for quadratics

lament fjord
#

(it's asymptotic, you probably will need to tweak constants around to make it work)

mellow sable
#

same for other ones that dampen

#

highlighted: n=1,2,3,5,10,30

#

n=4:
300, 1100, 4400, 12500, 38000, 92000, 185000, 350000

#

n=5:
300, 1200, 5000, 17000, 55000, 132000, 285000, 550000

#

n=10:
300, 1700, 8000, 54500, 200000, 452000, 1160000, 2300000

wintry solar
#

can you put the ante 9 values on the graph too for reference?

mellow sable
#

n=30:
300, 3700, 20000, 454500, 1780000, 3732000, 10910000, 21800000

mellow sable
#

I can add the endless formula tho

frosty dock
#

3->4 seems a little harsh

mellow sable
#

4 is one that I kinda filled the gaps on, I can try and make it less harsh

wintry solar
#

3 should be 600x + 1400 too

mellow sable
#

tried to make ante 4-5 smoother

frosty dock
#

ante 8 being quadratic quickly gets to a point where it doesn't feel like a single level of ante scaling matters that much (2.3 mil at 10, 2.8 mil at 11)

lament fjord
#

1.5^(log_2(n)^2)*80000 gives something more reasonable for ante 8

mellow sable
#

sending a new link, also added 9-12 for reference

mellow sable
#

you could maybe then set it to whatever level you want if you want a big challenge

wintry solar
#

I feel like 6, 7 and 8 don't occupy enough space

mellow sable
#

although maybe it is an issue

mellow sable
edgy reef
#

...huh

#

I haven't touched size how tf did this happen

mellow sable
#

but ideally the space gaps would increase ye

wintry solar
#

I am not nearly well practiced enough in math to manipulate these graphs right now

maiden phoenix
#

Is it me or the way tooltips are handled was changed recently?

frosty dock
#

yeah it was

#

i gave them columns and made them align on the right side of the popup if the card is on the left side of the screen

#

trying a quartic for ante 8, issue is that ante 9 is way too close

mellow sable
#

You could always change the endless formula

#

To scale faster if x>3

wintry solar
#

that's true

lament fjord
#

Plotting the logarithms of the scores might help with visualizing the curves

frosty dock
#

could swap out the constant 1.6 for A_8/A_7

zealous glen
frosty dock
zealous glen
#

Instead of making curves for each Ante, have you tried making curves for each Stake?

frosty dock
#

these formulas are in terms of ante though

#

we're not defining what the scaling would be for fractional ante, so such a curve doesn't exist

zealous glen
#

I think you’re missing the point

#

I said to make curves for Stakes, not Antes

wintry solar
#

what would a curve for a stake even do?

zealous glen
#

I feel like the lowest Stake is a_n ~ 300*2^n, then a_n ~ 300*4^n, and finally a_n ~ 300*6^n, where a_n is Ante n

frosty dock
zealous glen
wintry solar
#

but that's not what we're trying to do?

frosty dock
#

that literally isn't flexible enough

zealous glen
#

You can extrapolate from this pattern to new Stakes

#

My point is: I think the base score of each Ante grows exponentially, so if you want to create new Stakes, they should also scale exponentially

frosty dock
#

it's not that simple

#

maybe if you look at the 3 data points we have for ante 8, that looks exponential

#

but within one stake?

zealous glen
#

Yes, as I said, I think each Ante is in the same order of magnitude as a constant times the previous Ante

#

Like here

#

Also the assumption that thunk started with the lowest Stake following the pattern a_n = 300*2^n and then tweaked it until it worked sounds reasonably human behaviour

frosty dock
#

sure

#

it's just that we don't get that level of tweaking with a "nice" formula with this approach

zealous glen
#

The tweaking was human made by adjusting the values manually. I think trying to adjust the numbers automatically is missing the forest for the trees

wintry solar
#

I mean if you want to sit down and tweak numbers for an infinitely scaling system, go ahead

zealous glen
#

Do you only want to fit a small number of extra Stakes?

#

Even then I think starting from the next even exponents make sense

#

Or you can make it superexponential if it’s for like Cryptid or something

#

Thunk adjusted the numbers via playtesting, which I think makes more sense than trying to overfit a formula to 24 points on a grid

wintry solar
#

which you can do for a closed system of 24 points, you don't get the same luxury when designing an infinitely expandable system

zealous glen
#

I mean that’s what I said

#

Don’t try to adjust 🤔

lament fjord
#

Quick, what does the next "antes scale faster" stake ante 4 score requirement look like

frosty dock
zealous glen
#

Maybe relative/log residuals instead of absolute residuals

frosty dock
#

I'm not entirely sure what the 0.75 is supposed to mean, but I think the 1.6 has to do with fitting the scaling of antes 7 and 8 as a starting factor

unkempt ridge
#

Tryna make a Joker right here, whole effect is gonna be that every poker hand now contains a straight (or higher)
So, a flush house now contains straight, high cards are straights, flushes are straight flushes, cuz they have straights... Uhhhh
How would we define this gourmflop

wintry solar
#

this graph looks better

frosty dock
#

Still not fully happy with ante 6

#

it stays a bit too close to ante 5

#

hear me out

#

looks better asymptotically imo, but is a bit close to ante 7 at the low end now

#

also sqrt(ln(x)), ew

wintry solar
#

I think 8 might go a bit too fast too

#

unless I am misreading, thats 800000 on scaling 4

#

compared to 200000 on 3

frosty dock
#

yeah fair

#

how about this

wintry solar
#

that looks better

frosty dock
#

I'll leave it there, gonna go to sleep

wintry solar
wintry solar
#

oh nice, a function that is never used

rough furnace
maiden phoenix
#

Damn lovely stealing the credit

rough furnace
#

I mean lovely doesn't have a method of telling me the author

#

thoughts?

wintry solar
#

looks good

rough furnace
#

I could also do this

#

or maybe some variation of it

hallow forge
#

"dang this Lovely Mod guy makes a lot of mods"

wintry solar
#

maybe the grey lovely mod text could be on the second line

rough furnace
#

yeah but then I would have to figure out how to put it there

wintry solar
#

is that second image not putting it there already?

rough furnace
#

I mean the size and colour

wintry solar
#

oh right yeah

rough furnace
#

ok eval time

#

maybe I should add a way to grab a ui element in debugplus

#

but that mgiht be a bit too much work

stray warren
rough furnace
#

I should make it smaller

wintry solar
#

🔥

rough furnace
#

lovely mods in the crash log

wintry solar
#

there's a note!

rough furnace
#

yeah the notes have been there since the new crash handler

#

just noone uses them

wintry solar
#

huh

rough furnace
#

mod.debugInfo as a table of strings shows like the crashing example there (<key>: <value>) or just a string just shows whatveer your string is

#

the version field I put there is kinda useless since we got offical version info now

#

but I am too lasy to chnage it

static juniper
#

Does anyone know where the documentation for the create_card function is? I keep seeing it everywhere but I don't know what all the parameters do.

opal spade
static juniper
#

Oh jeez I didn’t even know this existed

#

Thanks for telling me

unkempt ridge
#

Unsure what we're messing up here. Saying something about line 45 (blue dot on left) not having curr_obj defined.
Are we improperly defining f(), which defines curr_obj? This was working a bit ago so

unkempt ridge
#

Fixed
We forgot a return{} function

static juniper
#

Is there a way for a Joker to add a specific Tarot Card?

rough furnace
#

like spawn one?

#

look at how the fool spawns it's tarot

#

you should be able to use the same code

languid quiver
#

how do i go about making a language mod? (so i can just simply change text string like balatro university)

static juniper
rough furnace
#

Sure but just pass your own thing instead if that variable

static juniper
#

What would I pass?

rough furnace
#

I don't gave my computer to check but see what is stored in that variable

#

Its probably either the slug or the center if I had to guess

static juniper
#

Found it, just have to pass the slug in that argument instead

#

Thanks for the help!

wary crescent
#

Hey guys, does the Joker art need to created at 142 x 190 or 71 x 95? a bit confused

frosty dock
#

there's always a 1x and a 2x file that you need, so technically both

#

usually the 2x is a basic upscale of the 1x

wary crescent
#

I see, that makes sense then

#

So just make it 71x95, then just resize it to 142 x 190 for 2x file 👍

#

Is there a template image somewhere for the Joker card borders?

maiden phoenix
#

Pins in fan art channel

wary crescent
#

Im assuming the best way to learn how to code Jokers is by looking at other Joker mods files and unraveling the process that way.

languid mirage
wary crescent
#

will do, ty

wintry solar
languid mirage
#

oh yea I forgot about that

dim nimbus
#

hmm, would there be any way to add a glass-card like effect to all cards in hand?

#

by that i mean give each individual card a chance to break

maiden phoenix
languid mirage
dim nimbus
#

oh no i mean like

#

have a joker that has a chance to destroy a played card

languid mirage
#

that's easier

#

just look at sixth sense

dim nimbus
#

ill see what i can pull up

night pagoda
#

Is it possible to make a shader that applies to everything underneath the card? (for ex. making a glass that blurs things)

wintry solar
#

What do you mean by things underneath the card?

languid mirage
#

not possible

#

shader only processes pixel on the sprite itself

#

so you could have semi transparent card + blur applied to the card's sprite, but it wouldn't blur the stuff from another sprite/canvas, so it wont dynamically change

night pagoda
#

damn, no postprocessing

wary crescent
#

lol we all gotta start somewhere..

#

Honestly surprised it even works but it does

dim nimbus
#

love the logo on it

wary crescent
#

lol. My wife is an artist so shes gonna do all the art if I can wrap my head around how to code them

maiden phoenix
wary crescent
maiden phoenix
#

Mmh I dont think there's a context to fetch your interest? You'll have to make your own context during payout, but that requires knowing how to do lovely injection

#

Still it should be achievable

#

I wonder if G.GAME.interest_amount resets to 0 after payout

#

A more tedious solution would be calculating the interesting, saving it somewhere and apply it at the end of round

rain imp
#

The problem may be that interest is calculated after the blind defeat, since there are factors that can reduce or increase your money, like Golden Joker or that one boss blind that takes money for each card

#

So yea, calculating the interest on the go would be better, not like there are many factors applied

wary crescent
#

Yikes, i have so much to learn

rain imp
#

All you need for that actually are 3 parameters: your current amount of money, jokers held in hand and vouchers purchased

primal robin
#

Manually checking this kind of staff sounds not really cool because in this case joker incompatible with other mods, if they decide adjust interest calculations

wintry solar
#

ugh, how should finding the max stake work with non linear stakes

frosty dock
#

pool order

rain imp
#

In theory you can make it call the interest function during the scoring, but idk if it will work properly

wintry solar
#

pool order as in the first one with the highest level or the last one with the highest level?

wary crescent
#

I will try when I get more experience and confident enough to try n make it happen, I imagine i would probably need the help of others if possible, but here is the concept mockup art and description we threw together for this Joker. (Not the correct size or borders, just thrown together for fun)

dim nimbus
#

oh, i remember seeing that on the reddit!

wary crescent
frosty dock
wintry solar
#

I guess it doesnt really matter

dim nimbus
#

im not entirely sure where to go about getting the functions of this joker to work, i know i need to use eval_card in some way but i have found very little in either the game source code or on the discord about that

SMODS.Joker {  -- Mini Hakkero
    key = 'minihakkero',
    loc_txt = {
        name = 'Mini Hakkero',
        text = {'{C:green}#1# in 8{} chance to {C:attention}destroy{}',
        'a randomly played card.',
        'Permanently increase payout by {C:money}$#2#{}',
        'when card is destroyed.',
        '{C:inactive}(Currently earn{} {C:money}$#3#{} {C:inactive}at end of round.){}' }
    },
    config = {extra = {money_mod = 1, money = 1}},
    rarity = 3,
    pos = {x = 2,y = 0},
    atlas = 'jokeratlas',
    cost = 9,
    unlocked = true,
    discovered = true,
    blueprint_compat = false,
    loc_vars = function(self, info_queue, center)
        return {vars = {G.GAME.probabilities.normal, center.ability.extra.money_mod, center.ability.extra.money}}
    end
}

closest thing that comes to mind is the glass stake in the cryptid mod but im still looking at it to see how it works

primal robin
#

Question. Can I somehow rotate boss blind chip?

zealous glen
#

Yes

surreal marsh
primal robin
#

And this even don't broke blind:wiggle() ?

zealous glen
#

what

primal robin
#

Uhh...
I have this blind. I want on specific moment rotate sprite by 180 degrees.

zealous glen
#

You can do the same thing you’d do to rotate cards

primal robin
#

Which one, if not secret?

zealous glen
#

I think you can just set the blablabla.T.R or whatever it is to the value you want

#

I think it might be measured in radians but I’m not sure

wintry solar
#

how does lovely patch priority work?

frosty dock
#

from least to greatest iirc

#

negative priority is unsupported on beta6

crisp coral
#

oh.

#

i have all my patches on 1 prio

#

🥀

wintry solar
#

do cryptid decks work with shaders in galdur for you?

crisp coral
#

the edition ones?

wintry solar
#

yeah

crisp coral
#

yes they have shaders

wintry solar
#

I must have broken it on my local version

hushed cradle
#

whats the best way to check if another mod is loaded?

crisp coral
#

SMODS.Mods["mod_id"]

wintry solar
#

that won't tell you if it's turned off or not though

#

(SMODS.MODS['mod_id'] or {}).can_load

hushed cradle
#

ty

crisp coral
#

heck

wintry solar
#

oops I left caps on

frosty dock
#

Mods not MODS

hushed cradle
#

also if i have a localization file no i not have to put any loc txts in my code?

frosty dock
#

yes

hushed cradle
#

cool

wintry solar
#

I think I've finished the stake stuff 🎉

hushed cradle
#

🥳

frosty dock
#

amazin'

#

btw I got rid of palettes for the time being

wintry solar
#

there are some errors when you continue a run after installing or removing stakes

#

omg thanks

#

I'll take another look at my alt texture rewrite at some point

frosty dock
#

yeah, really isn't top priority to have in though

wintry solar
#

yeah exacvtly

#

oh no a crash

opal spade
#

how major are the stake changes

bleak rain
opal spade
#

didnt eremel say they were going to do stake stuff for smods in general unless im misremembering?

#

considering smods' stakes are currently unfinished

wintry solar
#

It’s mostly just adding support for non linear stakes

opal spade
#

yeah i tried doing some of that but looking back i should've learned more before trying to contribute

#

for non-linear stakes currently smods doesnt check whether the run info should have "stakes" button (its coded to put the button if the stake is anything but white) and the "also applies" ui in that menu is coded to check if its G.GAME.stake > 2 instead of checking if the stake itself needs an "also applies" list

wintry solar
#

I haven’t touched any of the in run menu stuff at the moment

crisp coral
#

does anyone know how shop loading from save file works? i have added this patch of code after the if not shop_exists then block which adds a value to a card's ability. after loading from file, that card no longer has that value in its ability

languid mirage
#

it's loaded later

#

there's a debug when you load save file while in shop

#

smth like couldnt find shop area or whatever

#

and that forces area to be loaded later

#

I dont remember where exactly the code is, but you can probably find it by searching debug message

rigid moss
#

Hi guys, does anyone know how to get jokers description, both localized and unlockalized? I need to create a function that checks if there is word "currently" in the description.

tidal edge
#

i want to make this happen twice

#

how

#

how do i make it like, make 2 of the planets instead of one of them

opal spade
#

to get just the raw text you can do localize{type = "raw_descriptions", set = "Joker", key = "j_joker"}

opal spade
opal spade
#

for example you can do for i = 1, 2 do <code> end if you need it to happen twice

#

although you should probably add a check in the code to see if there's space in the consumable slots before creating the card

regal wolf
# tidal edge how do i make it like, make 2 of the planets instead of one of them
    if self.ability.name == 'The Emperor' or self.ability.name == 'The High Priestess' then
        for i = 1, math.min((self.ability.consumeable.tarots or self.ability.consumeable.planets), G.consumeables.config.card_limit - #G.consumeables.cards) do
            G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.4, func = function()
                if G.consumeables.config.card_limit > #G.consumeables.cards then
                    play_sound('timpani')
                    local card = create_card((self.ability.name == 'The Emperor' and 'Tarot') or (self.ability.name == 'The High Priestess' and 'Planet'), G.consumeables, nil, nil, nil, nil, nil, (self.ability.name == 'The Emperor' and 'emp') or (self.ability.name == 'The High Priestess' and 'pri'))
                    card:add_to_deck()
                    G.consumeables:emplace(card)
                    used_tarot:juice_up(0.3, 0.5)
                end
                return true end }))
        end
        delay(0.6)
    end

Have a look at what the game does for emp, and hp.

#
 for i = 1, math.min((self.ability.consumeable.tarots or self.ability.consumeable.planets), G.consumeables.config.card_limit - #G.consumeables.cards) do

specifically

wintry solar
#

it makes me cry everytime I see someone setting an edition with {edition = true}

wary crescent
#

How exactly do i look at the vanilla jokers code within Balatros game file

static juniper
frosty dock
languid mirage
#

<@&1133519078540185692>

frosty dock
#

💀

karmic creek
#

yeet

grand violet
#

🔫

languid mirage
#

ty

karmic creek
#

oh someone got it before me

grand violet
#

Ah

karmic creek
#

egg!!!!!

grand violet
#

we both got it

languid mirage
frosty dock
#

lmao ty guys

#

fast as always

grand violet
#

This isn't a kill steal

#

we'll call it uh

karmic creek
#

team kill?

#

no wait

grand violet
#

vonnegut + Egg Gun that guy

frosty dock
#

xD

karmic creek
static juniper
#

Probably an easy question, but is there a way to get the slug of a tarot card used from context.consumeable?

wary crescent
static juniper
frosty dock
#

context.consumeable.config.center_key

static juniper
#

Thank you!

frosty dock
#

trying to test the stakes PR rn, but talisman overrides get_blind_amount so i can't easily test with cryptid stakes 💀

wintry solar
#

💀

#

That is a much better way of rounding than I did hahaha

frosty dock
#

yeah like cmon

#

you even did it the right way for endless

#

it was right there lmao

wintry solar
#

Haha it was late

#

I was bamboozled by the graphs

frosty dock
#

lol nws

#

just thinking about what to do with talisman

#

the override probably has to stay, so do we make SMODS.get_blind_amount talisman-compatible?

#

or should talisman need to have its own override of that function too

wintry solar
#

Cant talisman just hook the function instead of overriding?

#

And just throw the return from get_blind_amount in tobig()?

frosty dock
#

not really

#

if the result is above 1.7e308, there's no more saving it

wintry solar
#

I see

frosty dock
#

comment on the talisman override

wintry solar
#

Maybe talisman just needs to override this too then

frosty dock
#

i hate these types of overrides, but I'm also not sure how I feel about having the compat be on smods' side

wintry solar
#

Yeah I don’t think the compat should be on smods side

#

That’s a slippery slope

frosty dock
#

fair enough

ancient grove
#

heyo. Is there some modding resources collection somewhere or is my best bet just running of smods examples

#

(Ive been struck by alcohol fueled inspiration)

frosty dock
#

there's a good chunk of mods you can take inspiration from in here

ancient grove
#

honestly fair enough

#

guess im dissecting cryptid

wintry solar
#

What do you want to make?

ancient grove
#

A gunslinger themed joker set

wintry solar
#

Look at this and the messages from stupid a couple of posts above

ancient grove
#

tldr:
Guns: Can be reloaded, burning a bullet joker and inheriting it's effects. Up to 5 bullets. Reloading any more will override the first bullets added.

  • Golden gun. Destroys any golden cards playe and gains x0.4 mult per card destroyed like this.
#

Havent thrown anything else onto paper yet, but you get the general idea

ancient grove
#

also btw galdur is amazing

#

im a software dev by trade, mainly just lacked a place to start chewing away from xd

gaunt thistle
#

What you get through is really great safety assurances and (more importantly) a really good toolchain

rough furnace
#

Idk it just seems odd you gave to declare a bunch of c methods and unsafe code, feels like it defeats the point of rust

#

But idk I'm not a professional on the matter

humble tartan
#

I have an updated version of the luasteam library I want to package with my mod. Is there a way I can patch this in to override the existing luasteam?

frosty dock
#

it's possible to load DLLs from arbitrary locations using the FFI library. If you want to avoid having users replace DLLs in the game folder, you can do that and replace require 'luasteam' with the code for loading your lib instead

rough furnace
#

I was truing to do that at one point and couldn't get it to eork

#

The game kept crasbing

frosty dock
#

it worked for tolk

rough furnace
#

I probably was skill issued

#

It was also quite early on in modding and I wasnt so familiar with lua

humble tartan
#

That could work for sure. But how could I package platform specific binaries with the mod?

#

I guess I could have separate download paths for different platforms

rough furnace
#

I think you could just include all copys and point the game to them manually (?)

frosty dock
#

you can get the OS via love.system.getOS() and just load the different binaries conditionally

humble tartan
#

Can give that a shot. New to lua modding but this is kinda the last step before I can release a (very early) first build so I’m hoping to get it working

hushed cradle
#

does G have a list of all the in game suits and ranks?

hushed cradle
#

including ones w mods

frosty dock
#

SMODS.Suits / SMODS.Ranks

regal wolf
#

^

hushed cradle
#

that includes base game as well i take it

frosty dock
#

base game by itself doesn't have anything of the sort actually

#

it's all just hardcoded

hushed cradle
#

oh

frosty dock
#

it's one of the first things I wanted to change

hushed cradle
#

theres quite a lot of stuff hardcoded tbf

#

like play size

regal wolf
#

it doesnt matter that the base game is hardcoded cuz i doubt we getting Deck of Cards V2 any time soon.

hushed cradle
#

probably not

frosty dock
#

no it's just a pain to work with, so i replaced it

regal wolf
frosty dock
#

mhm

#

ranks and suits are fully rationalized unlike some other stuff

#

cough cough deck effects

gaunt thistle
#

... which to be fair lovely does not do lmao

rough furnace
#

So wait does this mean your available to make lovley changes now?

gaunt thistle
#

yeah, my vacation ended

#

I was out from 7.11 to 8.11

frosty dock
#

ah yes

rough furnace
#

Nice

#

Hope you enjoyed your vacation

frosty dock
#

thoughts on this?

gaunt thistle
#

wtf forwarding messages now

frosty dock
#

based feature actually

gaunt thistle
# frosty dock

you're talking about lovely intercepting load() calls?

gaunt thistle
#

I can't imagine it would be too difficult but it does rely on consistent chunk names

frosty dock
#

I have consistent chunk names

#

for the most part, this came up because I switched to load()ing most smods files instead of lovely injecting them for better crash readability, rn this means mods can't patch steamodded's overrides

gaunt thistle
#

Basically, the main issue is that the lovely module get's de-registered
That module gets injected during lovely's runtime init phase, prior to patch application.

#

Runtime init is started through DllMain, which is fired when the lovely dll is initially loaded into the Balatro process.

rough furnace
gaunt thistle
#

Yeah, if the runtime is restarted but the process does not then the lovely module won't be re-injected.

rough furnace
#

Yrs I would like it to be

gaunt thistle
#

Simply because the event chain for lovely module injection is only fired when the process is created

#

Yeah, shouldn't be too difficult

rough furnace
#

I couldn't figure it out

#

Oh also the test case has been removed you'll have to patch smods to test it

frosty dock
#

can't you just debug eval it

rough furnace
frosty dock
#

love.event.quit('restart')

rough furnace
#

You nerd to kill the threads too

frosty dock
#

ah right

#

mb

#

no need to call me a nerd tho

rough furnace
#

I'm bad at typing

regal wolf
#

😭

wintry solar
#

Being bad at typing seems unfortunate for a dev

rough furnace
#

O have spell check in my ide

wintry solar
#

Those syntax errors T_T

gaunt thistle
#

General workflow is

  1. Inject some sort of fn hook into whatever reloads the lua runtime
  2. Inject the lovely module as a part of rt init as normal.
  3. If the reload hook is hit then we unset the runtime init flag which, on the next lual_loadbuffer call, will cause the lovely runtime to be reset and reloaded.
gaunt thistle
rough furnace
#

Hold on I can find the method

#

Loves main thread is a loop and it doesn't exit if restarted

gaunt thistle
#

just found it too

#

give me like 20 mins

rough furnace
#

Also you'll probably have to run the main function of the platform lovely code as well

#

Iirc

#

But it's not nessicary

#

Just reloading patches would be handy

#

And I think fixed stdout

glass scaffold
#

How do I add to the Hands count on the left?

rough furnace
#

G.GAME.hands iirc

glass scaffold
#

so I just do G.GAME.hands = G.GAME.hands + 3?

rough furnace
#

Try it and see

glass scaffold
#

ok

rough furnace
#

There actually might be a function like ease_hands which does the effect on the display

#

Not sure

glass scaffold
#

and destroying a joker is just self:start_dissolve() according to the Mr. Bones code

#

unless that's not how SMODS handles it

#

yea?

wintry solar
#

any mods that have smods dependency I can snoop through?

rough furnace
#

Wdym?

wintry solar
#

you can depend on certain smods builds now

#

but I don't remember how to format it

rough furnace
#

Oh

frosty dock
wintry solar
#

ah cool

frosty dock
#

just --- DEPENDENCIES: [Steamodded>=1.0.0-ALPHA-0812c]

wintry solar
#

12c is current version right?

frosty dock
#

yeah, the one including stake update

wintry solar
#

👍

#

I will update galdur

rough furnace
#

Wow do we have version comparision now?

frosty dock
#

yeah

gaunt thistle
#

thefuck that's too professional

#

are dependencies namespaced?

frosty dock
#

just mod IDs

rough furnace
#

Wow that means I can remove the version.lua I have in my smods directory that's untracked me messing with versions

frosty dock
#

lol

#
V_MT = {
    __eq = function(a, b)
        return a.major == b.major and
        a.minor == b.minor and
        a.patch == b.patch and
        a.rev == b.rev
    end,
    __le = function(a, b)
        if a.major ~= b.major then return a.major < b.major end
        if a.minor ~= b.minor then return a.minor < b.minor end
        if a.patch ~= b.patch then return a.patch < b.patch end
        return a.rev <= b.rev
    end,
    __lt = function(a, b)
        return a <= b and not (a == b)
    end,
    __call = function(_, str)
        str = str or '0.0.0'
        local _, _, major, minor, patch, rev = string.find(str, '^(%d-)%.(%d+)%.?(%d*)(.*)$')
        local t = {
            major = tonumber(major),
            minor = tonumber(minor),
            patch = tonumber(patch) or 0,
            rev = rev,
        }
        return setmetatable(t, V_MT)
    end
}
V = setmetatable({}, V_MT)
V_MT.__index = V
function V.is_valid(v)
    if getmetatable(v) ~= V_MT then return false end
    return(pcall(function() return V() <= v end))
end
rough furnace
#

Wait in your version comparison algorithm is 1.0.0 greater than or lesser than 1.0.0-ALPHA-0812c?

frosty dock
#

lesser, since the empty string is the least of strings

rough furnace
#

Fun

frosty dock
#

it's not fully semver-compliant in that

rough furnace
#

Debian has it where if you do ~ehstver it lower than just emoty

#

So 1.0.0~beta1 is lwer than 1.0.0

#

For example

frosty dock
#

yeah i probably should have an empty revision compare as greater than any non-empty revision

rough furnace
#

Well no

#

Cause 1.0.1 is greater than 1.0

frosty dock
#

that's the patch number though

rough furnace
#

1.0.0 is lesser than 1.0.0-1 which would be like a hotfix

#

I would reserver a character that is lower than empty space like debian does

frosty dock
#

ah

wintry solar
frosty dock
#

hm okay

#
V_MT = {
    __eq = function(a, b)
        return a.major == b.major and
        a.minor == b.minor and
        a.patch == b.patch and
        a.rev == b.rev
    end,
    __le = function(a, b)
        if a.major ~= b.major then return a.major < b.major end
        if a.minor ~= b.minor then return a.minor < b.minor end
        if a.patch ~= b.patch then return a.patch < b.patch end
        if a.beta ~= b.beta then return a.beta < b.beta end
        return a.rev <= b.rev
    end,
    __lt = function(a, b)
        return a <= b and not (a == b)
    end,
    __call = function(_, str)
        str = str or '0.0.0'
        local _, _, major, minor, patch, rev = string.find(str, '^(%d-)%.(%d+)%.?(%d*)(.*)$')
        local t = {
            major = tonumber(major),
            minor = tonumber(minor),
            patch = tonumber(patch) or 0,
            rev = rev,
            beta = rev:sub(1,1) == '~' and -1 or 0
        }
        return setmetatable(t, V_MT)
    end
}
#

so this ig

#

1.0.0~ALPHA-1208d

rough furnace
#

Yeah something like that

#

I'd also like to use it for my mods dev builds so if someone depends on v1.2.0+ then v1.2.0~beta1 won't match

frosty dock
#

this is gonna break existing version dependencies though

#

not too big a deal since idk that too many mods are doing it yet

#

I'll change the example mods though

static juniper
#

Why does this effect crash the game?

    return {
        x_mult = card.ability.extra.Xmult,
        card = context.other_card
    }
end```
#

Nvm, found out why, I was missing context.individual in if statement

coarse peak
#

how does the joker text work

unkempt ridge
#
  name = ' ',
  text = {' ' , ' '}
}```
coarse peak
#

yeah im referring to the substitution into the text

#

with curly brackets

#

i just dont know what any of the individual things mean

#

how would I include the number of jokers they have in the text for example

static juniper
#

Is there a way to set current chips and/or mult to a certain number, regardless of what it was before?

olive shoal
#

rook (background wip)

edgy reef
#

cba

olive shoal
#

cba?

crisp coral
#

cba

edgy reef
#

cba mod sounds good but iirc someone already did that

#

😭

crisp coral
#

there's a chess piece mod which idk where it went

#

and there's a cba joker in morefluff

hushed cradle
#

is there anything on the wiki about joker atlases with floating bits

#

like legendaries

#

i swear i remember the term soul pos from somewhere

#

but i cant find it

rough furnace
#

i belive it's just soul_pos

#

doesn't seem to be properly documented though

hushed cradle
#

ah thank you

static juniper
#

I'm trying to test this Joker effect by making it set base chips and mult to 0 at the start of the hand. Right now, it doesn't do anything, though.

    hand_chips = 0
    mult = 0
end```
gaunt thistle
crisp coral
rough furnace
#

so I was messing around and I made it possivle to unlokc blinds with DebugPlus but I can't get it to redo the text without a lovely patch or some super jank code (blame thunk). WOuld you all be okay with it just not showing up or should I try getting it to do the text?

#

it is properly unlocked so you can back out and go back in to the collection to work it

#

if your curious it;s because this peice of code uses a local variable for discovered instead of the blinds (which is where it gets the local varible from)

#

also get softlocked

tepid eagle
#

my first modded joker :o

hushed cradle
#

damn the art is insane

#

and a cool idea too

tepid eagle
#

thanks! :D

olive shoal
#

is there like an aseprite plugin or sojmething that allows you to export sprites at both the 1x and 2x resolution in the proper folders and stuff? so i dont have to like keep exporting it twice whenever i wanna do stuff? its a little slow rn

languid mirage
crisp coral
#

heck

night pagoda
olive shoal
#

would you be able to share the latter?

olive shoal
#

finally got this working

#

does the wording make sense? you can include any other card in the hand, but there can be no more or less than one king if u want to gain mult

frosty dock
#

yeah that's clear enough

olive shoal
#

splendid

crisp coral
#

joker not capitalized

#

smh

#

smh

olive shoal
#

OOPS

night pagoda
#

wtf is the old_center and why it haunts me

frosty dock
crisp coral
#

G.Jokers = G.jokers

frosty dock
#

splendid

frosty dock
remote coral
night pagoda
#

I can't even consistetly get the crash but it happened like 3 times already in total

wintry solar
#

Accidentally make white stake unplayable 💀

opal spade
#

looking at smods stake update is kinda my joker moment bcos im looking at the code and its like
just a lot of the things ive messed with myself for the stakes in archipelago

#

the timing is unfortunate cus i'll have to rush an update by tonight, but im very glad that i'll be albe to trim and simplify a lot of code

crisp coral
#

is it stable enough to play in slightly bigger asyncs

opal spade
#

i mean it was

#

rn no idea on how compatible it is with current smods after the stake update, but i'll get on that tonight

crisp coral
#

i'm stuck in an async with every muse dash song so it'll be a while until i can play a game with this

wintry solar
opal spade
frosty dock
#

i thought it would adjust the hand eval as if the card wasn't there to begin with 💀

#

that would be too evil

crisp coral
#

lobcorp reevals

#

:3

opal spade
#

it would normally but when implementing the devour i decided to keep the empty space for effect

frosty dock
#

not talking about the space

opal spade
#

(the devour effect was made for a joker and im just reusing it because i can)

opal spade
frosty dock
opal spade
#

mechanically the card is still there, just unscored

crisp coral
#

oh my god is white stake still broken

opal spade
crisp coral
opal spade
#

damn

frosty dock
opal spade
frosty dock
#

if it's not updated, maybe..

crisp coral
#

well it's on the latest commit rn

frosty dock
#

not getting it unless there's some further specifics?

crisp coral
#

it's cryptid

frosty dock
#

then why can't i reproduce it

#

i can't work on fixing it if i don't have a setup to replicate

crisp coral
#

uhh tf i can't repro either

wintry solar
#

Yeah I was sure I’d tested white stake

#

Maybe it’s a borked install

zealous glen
#

Cards destroyed on earlier antes have more impact

opal spade
#

there will definitely be a weaker version of it as a normal boss so longterm effects of removing cards will be there for the other boss

zealous glen
#

Otherwise, debuffing a single card from scoring seems quite weak

#

I think the Boss could be a non-Showdown Boss as is

opal spade
#

with the showdown blind the intent is going after builds that rely on strong card-related effects

zealous glen
#

Then you make a stronger Showdown version

opal spade
#

or 1 in 3

#

so it has a chance to strike multiple cards (or not strike anything)

zealous glen
#

I don’t like it

#

There’s no way to influence it

opal spade
#

what if the check is reversed

#

so 1 in 2 to score, otherwise destroy it

#

wait

#

what if the chance of destruction decreases with each destroyed card

languid mirage
#

theres no difference xd

opal spade
languid mirage
#

ig

zealous glen
wintry solar
#

new config screen 👀

frosty dock
#

btw shouldn't all stakes be unlocked regardless of the setting if you're playing an unlocked profile?

wintry solar
#

errr probably yeah

#

I think there were some people who didn't want that, I'm not sure what base game does?

frosty dock
#

base game lets you select stake freely on unlocked profiles

opal spade
#

does smods.blind have any way to store variables that persist when loading a save?

crisp coral
#

hook to Blind:save and Blind:load

frosty dock
#

there's no 'free' table like extra for blinds unfortunately

crisp coral
#

but if you don't want to, these variables G.GAME.blind.hands_sub, G.GAME.blind.discard_sub are saved automatically

frosty dock
#

you could misuse something like the boss table though

#

or debuff

crisp coral
brisk quartz
#

another challenge

wintry solar
#

@night pagoda I think it was you who requested this

night pagoda
#

yup, awesome!

wintry solar
#

it aligns a bit funky, but it works!

#

above is better or worse?

frosty dock
#

looks a bit weird, idk

wintry solar
#

it does allow the main deck description to stay in the same place though 🤔

night pagoda
#

tbh I like this alignment much more

frosty dock
#

yeah that's not terrible actually

#

unrelatedly, looks like we borked something with saving runs

#

i can't get a run to save at all

wintry solar
#

oh?

#

mine seem to be working ok

wintry solar
#

new galdur release go and break it friends

opal spade
#

worlds most silliest boss

#

1 in (cards removed) to destroy
(cards in the deck) in (cards total) to NOT reset it back to 1 in 1

opal spade
tepid eagle
#

a classic tale

#

as expected it took several hours for me to figure out how to make this work

cedar flame
#

tried debugging this for a while but i'm not familiar enough with the way things work to understand why the old one isn't being replaced properly...

nocturne garnet
#

is this enough boss blinds

night pagoda
cedar flame
cedar flame
#

i could see the vision honestly

cedar flame
#

just need to figure out how to do that only for the eternal sticker without hardcoding it into the class method

opal spade
mellow sable
#

i can do you one better

maiden phoenix
nocturne garnet
#

am i cooked chat

mellow sable
maiden phoenix
#

Wow..... I mean uhm, yea I'm just that good

opal spade
#

randomly generated jokers 😭

#

IMAGINE

mellow sable
#

i'm going to try 1 million

#

game crashed though

opal spade
frosty dock
mellow sable
#

makes sense

frosty dock
#

luajit only gets the bottom 2gb

nocturne garnet
mellow sable
#

100,000 decks :O

nocturne garnet
glass scaffold
wintry solar
#

Imagine having to flick through all those one by one

frosty dock
#

procedural joker generation

wintry solar
#

Someone did that, right?

mellow sable
#

let's try the simplest possible one

mellow sable
#

you could just yoink that code

#

it almost worked

frosty dock
#

if you actually wanted to have that many objects, it might be needed to load them lazily lmao

#

I imagine the references alone almost take up too much space

mellow sable
#

good progress, the game told us what happened

nocturne garnet
mellow sable
#

i think i still need to lower the number tho

frosty dock
mellow sable
#

900k is still too much

#

trying 500k

frosty dock
#

500k might be more reasonable but should still crash

mellow sable
#

ok it crashed one frame after going to main menu

#

but much closer

frosty dock
#

31 bit references are 4 bytes by themselves, add another few for the key

mellow sable
#

also what do you think is the cheapest object to register

#

i'll try it after jokers

frosty dock
#

hm

mellow sable
#

we're in

#

at a ridiculous like 5 seconds per frame

#

Actually more like 2-3

#

And we’re dead

frosty dock
#

you can't actually construct a GameObject, so not that

#

the depth of the metatable chain also doesn't matter, the object itself just has one metatable reference

#

and keys are always required, so the only way to make it cheaper is to have something that doesn't insert into pools

nocturne garnet
mellow sable
#

I’m already down to 250k and still having issues

#

So close though

mellow sable
nocturne garnet
mellow sable
#

it crashed after this but that's the farthest I could get

frosty dock
#

filesystem things

#

I'm thinking either Blinds or UndiscoveredSprite, but the latter requires an atlas string and a pos table

wintry solar
#

Decks don’t have a pool, right?

frosty dock
#

they do

#

how else would they display in order when selecting one

#

generally all centers have pools

wintry solar
#

Oh shit yeah

analog spoke
#

I think I really think I need a tutorial or something to start doing this lol, all I did was change another joker to using ^mult instead of xmult and it was working fine for an entire day, now today without any changes my game crashes on startup for some reason, lol

wary crescent
#

Is there any jokers i can use as a reference that can both add AND reduce total Xmult based on specific conditions?

bitter sand
#

i have a question, how do i add a new type of consumable ?

frosty dock
analog spoke
bitter sand
frosty dock
#

then you need to ask more specific questions

static juniper
#

Asking this again because I didn't get a response the first time:
I'm trying to test this Joker effect by making it set base chips and mult to 0 at the start of the hand. Right now, it doesn't do anything, though. Is there a way to set base chips and mult at the start of the hand?

    hand_chips = 0
    mult = 0
end```
frosty dock
#

you need to also set the hand text iirc

bitter sand
#

i managed to make the new type, i made a undiscovered sprite but when i launch the game i get this error

static juniper
primal robin
#

Why debug panel binded to Tab button halepuma

frosty dock
#

ask thunk 🤷

frosty dock
primal robin
#

I want to make a bind for quick opening run info, Tab should be perfect, but it's occupied by debug panel. water
Maybe I should use "`" instead?

frosty dock
#

not all keyboards have that easily available

bitter sand
#

what should i put in the "pos" line ?

frosty dock
#

something like { x = 0, y = 0 }

bitter sand
#

oh okay

frosty dock
#

where these numbers are the x/y position of the sprite on the atlas, starting from 0,0 in the top left

shell tangle
primal robin
#

I'm curious that lovely mods doesn't have convenient place for settings

shell tangle
#

I think there's been a few mods that have keybind config options you could borrow from, but I can't name them off the top of my head. Unless you're doing a lovely mod.

primal robin
#

Unluckily yes, it's lovely mod

#

Like it's not require sprites, jokers, etc

unkempt thicket
#

does loc_txt work differently for stickers than other game objects? the loc_txt on this sticker does not seem to show.

unkempt thicket
#

i'm on 1.0.0-ALPHA-0731a-STEAMODDED

frosty dock
#

yeah you just need to update then

#

except for the badge, you need to add a label

unkempt thicket
#

would that just be label = "name"?

frosty dock
#

yeah

unkempt thicket
#

ok, thanks👍

static juniper
frosty dock
#

i think this: update_hand_text({delay = 0}, {mult = 0, chips = 0 })

static juniper
frosty dock
#

and you're assigning to mult and hand_chips?

static juniper
wary crescent
#

Im trying to make a joker that calculates a +0.08x Mult on 8s scored and a -0.04x penalty on all non 8's scored. How do I code it to check for MULTIPLE card ranks to penalize?

wary crescent
#

I see ty

shell tangle
shell tangle
unkempt thicket
#

how do you make custom consumable types show in shop?

maiden phoenix
#

Look for SMODS.ConsumableType in Steamodded

static juniper
frosty dock
#

you could hook Blind:modify_hand() to check for your joker instead

static juniper
#

I’ve never done anything like that before. How do you do it?

frosty dock
#
local bmh = Blind.modify_hand
function Blind:modify_hand(cards, poker_hands, text, mult, hand_chips)
  if next(SMODS.find_card('j_prefix_your_joker')) then
    return 0, 0, true
  end
  return bmh(self, cards, poker_hands, text, mult, hand_chips)
end
static juniper
frosty dock
#

prefix should be whatever your mod prefix is

#

if you didn't specify one, it's the first 4 characters of your mod ID in lowercase

static juniper
#

Do I need the j_?

frosty dock
#

yes

static juniper
#

Works now, thank you!

rough furnace
#

You can look at how talisman does it

#

Also you can have a dummy smod file that just adds a conifg using steamodded

#

I'm working on making a system that works with both steamodded and vanilla for DebugPlus but you pretty much have to roll something yourself for vanilla with lovley

#

The issue with a universal system for lovely mods is either you have to:

  • have all the code to do stuff yourself but also play nice with others (cryptid and talisman do this but are made by the same dev)
  • depend on sometbing else the user has to install (and if we're getting users to install other stuff, might as well use steamodded since most people already have it
  • everyone has their own way with an inconsistent user experience
analog spoke
#

how would I transform this into an effect that triggers on a club card's scoring rather than once per hand from the joker? I tried to look at the base game jokers but couldn't really tell what I was looking at, lol

lusty epoch
#

Context.individual is the one used when played cards are scored

#

Should help

analog spoke
#

ok! I will try checking in there

analog spoke
#

I feel like I'm close here now maybe, a couple crashes and some bizarre things with it being a held in hand effect for a bit somehow, but I think I'm getting there

#

something here is crashing it now, lol

#

hmm, I feel like I'm close, let me try seeing what happens without the cardarea again, cuz it wasn't crashing back then

#

I just realized it's also not scoring the mult anymore, huh

rough furnace
#

Seeing a crash log would hekp

analog spoke
#

here is crash log (I am using the example joker in joker evolution to for testing, since I don't really know how to set up my own mod yet, lol)

rough furnace
#

What's on line 44 of your mod's main.lua?

analog spoke
#

all I know about the crash so far is that without this line, it doesn't happen

rough furnace
#

Load file is returning an error. I believe assert(SMODS.load_file("data/example_joker.lua)()

#

Should throw the errir

analog spoke
#

hmm

rough furnace
#

Did you forget to put an end to your if statement?

analog spoke
#

I don't think so?

#

I think this is right, right?

zealous glen
#

the first and has nothing afterwards

#

also you need three ends but have two

#

If you merge the two ifs then it should work

unkempt thicket
#

how can i change shop_rate during runtime?

#

i tried this

zealous glen
analog spoke
unkempt thicket
zealous glen
#

One for each function scope, one for each if and do scope IIRC

zealous glen
analog spoke
#

I think I may have messed something up here

#

hold on, wait, I think my brain my be braining

#

nope, lol

#

wait, I merged and added but I think I only needed to do one, lol

zealous glen
#

It should have two

analog spoke
zealous glen
#

you have too many thens

#

one should probably an and

analog spoke
#

I have changed the first then to an and now, crash still appears 😭

zealous glen
#

but what's the crash

analog spoke
nocturne garnet
#

me whem cryptid deck

nocturne garnet
#

though i dont think you can actually win with this deck lmfao

nocturne garnet
nocturne garnet
#

i spent like 30 minutes trying to fix something

#

all i needed to do was add like 4 lines of code and change G.GAME.seeded to false

nocturne garnet
#

shit how do you check what your selected deck name is

#

nvm found out

wary crescent
#

Can someone look at my custom Joker? It is partially functional, very new to this so im certainly missing some key info to get it working properly!

frosty dock
#

if context.other_card:get_id() == not 8 then 💀

#

that's not quite how that works

#

just use else..

tepid crow
#

To add to that, not equal in lua is ~=
While == not doesnt crash, its not doing what I assume you want it to

frosty dock
#

most certainly not. not 8 is the logical inverse of the number 8, which is false

#

<Card>:get_id() however always returns a number, so the condition is never fulfilled

wary crescent
frosty dock
#

gotta start somewhere amirite

wary crescent
#

yes! ty for the help

frosty dock
wary crescent
#

Im honestly shocked that it even launched the game without crashing lol

#

I did make a couple other extremely basic jokers that just give +mult and chips so im heading in the right direction

#

Ok so the Joker as of now is calculating that 8s are being played and Xmult is being added to the total xmult counter on the card correctly, however, no Xmult is actually being applied to the hand score. Also "not 8s" lol which ive changed to ~= 8 are still not actually reducing the total xmult.

dim nimbus
tepid crow
#

Yeah I was surprised by that myself too

zealous glen
#

I realized this doesn’t quite work due to how ranks are checked for in the game. I’m trying to think of a rework

#

The best I came up with so far is making them all suits and Face cards but I’m not too satisfied

nocturne garnet
#

WORLDS SMALLEST CARDAREA

frosty dock
wary crescent
frosty dock
#

yeah like I said

#

you're still inside the if block that checks for exclusively 8s when you're looking for non-8s

#

Basically this is your structure

calculate = function(self, card, context)
    if context.individual and context.cardarea == G.play then -- individual scoring card
        if context.other_card:get_id() == 8 then -- card is an 8
            if context.individual and context.cardarea == G.play then -- does nothing, already checked for
                if context.other_card:get_id() ~= 8 then -- always false, since we know the card is an 8
                end
            end
           if context.joker_main then -- always false, still evaluating individual scoring cards
           end
       end
    end
end
wary crescent
#

Hmm, ok

frosty dock
#

this is what it should be like

calculate = function(self, card, context)
    if context.individual and context.cardarea == G.play then -- individual scoring card
        if context.other_card:get_id() == 8 then -- card is an 8
        else -- card is not an 8
        end
    end
    if context.joker_main then -- separate context
    end
end
wary crescent
#

! ok

wary crescent
frosty dock
#

have you made sure it's fully separate like in the structure I sent?

#

for preventing reduction below 1.0X, you can do something like this

if context.other_card:get_id() == 8 then
elseif card.ability.extra.Xmult > 1 then
end
wary crescent
#

I think the hardest part is the formatting, ill get it tho

dim nimbus
#

How would I make a joker that has a chance to destroy a played card?
glass cards seem to work on something that i cant really reverse engineer into a joker

regal wolf
#

if you want to find how to destroy the cards, or if you're struggling to figure out how to do it on card trigger, there's an event for that.

night pagoda
#

How do I put badge localization to a SMODS.Sticker?

frosty dock
#

if you're using loc_txt, loc_txt.label

night pagoda
#

ty!

dim nimbus
#

not sure if im not ordering things correctly here or if theres something else not working

    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play and not context.blueprint and not context.before and not context.after then
            local destroyed_cards = {}
            if pseudorandom('minihakkero') < G.GAME.probabilities.normal/self.config.extra.odds then
                for i,v in ipairs(context.fullhand)
                for i=#G.play, 1, -1, do
                    destroyed_cards[#destroyed_cards+1] = G.play[i]
                end
                    card.ability.extra.money = card.ability.extra.money + card.ability.extra.money_mod
                    card_eval_status_text(card, 'extra', nil, nil, nil, {message = localize('k_upgrade_ex')})
                    return {calculated = true}
                G.E_MANAGER:add_event(Event({
                trigger = 'after',
                delay = 0.2,
                func = function() 
                    for i=#G.play, 1, -1 do
                        local card = G.play[i]
                        if card.ability.name == 'Glass Card' then 
                            card:shatter()
                        else
                            card:start_dissolve(nil, i == #G.play)
                        end
                    end
                end
            end
        end
    end
wary crescent
frosty dock
#

look at my structure again

#

you still have

if context.individual and context.cardarea == G.play then
  -- ...
  if context.joker_main then
    -- ...
  end
end
shell tangle
# wary crescent

Some major errors,

  • Too many checks. You have a check to if if a card is 8 already, and else only activates if that if fails the check. You don't need to check again.
  • You also don't need another context.individual check, you're still in the if area from the initial check of if context.individual
  • Also, your if context.joker_mainwas inside of that if context.individual, which are mutually exclusive. If context.individual is true, then context.joker_main can't ever be true, but it's only being checked for while context.individual is true.
frosty dock
#

also this is lua, else if is elseif

shell tangle
zealous glen
#

;P

frosty dock
#

i mean yeah

#

but it creates the need for an extra end

#
if condition1 then
else if condition2 then
else if condition3 then
else if condition4 then
end end end end
wary crescent
#

Thank you guys, i see what you mean about the else check, oof, im looking through now and learning my mistakes, my first time trying an even somewhat complex joker

shell tangle
# dim nimbus not sure if im not ordering things correctly here or if theres something else no...

Pretty sure you don't need the context.before and context.after if you already have context.individual, but, my guess would immediately be to try switching self.config.extra.cards to card.config.extra.odds, and I'm pretty sure fullhand is spelt full_hand. Try using some sendDebugMessage('Whatever string you want here'), and then see what stage it's getting stuck on, and then look at that area more closely.

frosty dock
#

also there's an improper double for loop that's returned from

dim nimbus
#

oh thank you for the debug message i was sort of wondering to myself how i could do that

#

ive gotten it to almost work? it doesnt crash on startup but when i play a hand with the joker the game just locks up

shell tangle
dim nimbus
#

i just removed one of the for statements since i dont think it was actually doing anything