#Talisman - A mod to enhance high-scoring runs

1 messages · Page 2 of 1

main arch
#

Slightly less

scenic leaf
#

I guess I'll still wait

clever blade
#

im on another pc and my old one had talisman

#

i havent opened balatro yet

#

will i encounter some problems with talisman?

#

should i reinstall my mods?

#

as expected

wet warren
#

you can probably use other profile just fine without mods

clever blade
#

eh, im gonna get some mods anyways

wet warren
#

ait

clever blade
#

should i send save.jkr or nah

wet warren
#

it isn't really useful
runs with talisman are not compatible with vanilla

#

Because all numbers are stored in a different way

wet warren
#

talisman settings from previous version are not compatible with latest because value for bignum thingy changed from boolean to string

#

not that big of a deal but in case anyone experiences a crash after updating talisman via git, make sure to reset settings file to fix it

sharp mason
#

Does OmegaNum have a ceil() function, or is it exclusive to BigNum?

#

Got a compat crash from another mod that uses it and it seems like it's missing from OmegaNum.

#

Also, not sure that save related crash got fixed.

#

I was just rerolling the shop and it poped up.

scenic leaf
#

since when are error screens blue

sharp mason
#

Trance

#

Seems to recolour the crash screen as well.

scenic leaf
#

ah

sharp mason
wet warren
#

or its rare/random

#

something specific probably triggered it

sharp mason
#

Got it again from grabbing a D6 Joker from a booster pack.

#

Other one also had a D6 Joker spawning from the shop

#

I don't like the implication of this

#

Probably not correlated (mostly because h o w) but it might not be that rare.

main arch
sharp mason
main arch
#

What’s at game.lua:2810? Might help with patching

sharp mason
#

This, at the bottom of the Game:update() function.

main arch
#

I override save manager so could be an issue with that

#

and maybe it not loading properly?

#

Like from a corrupt settings file?

sharp mason
#

Ok this is seriously getting annoying.

#

Can't bugfix a joker cause opening the poker hands tab is just gonna produce this crash.

main arch
#

can you tell me what setting of talisman you have and how to reproduce it

#

i'll try and fix

sharp mason
#

Unfortunately I don't think you can, after it happened I can't reproduce it.

#

I still have a save from a different time, lemme see

wet warren
#

cooking something

#

kinda surprised money and other UI stuff wasn't formatted in vanilla game

smoky blade
#

probably because who would ever get this amount of money

green venture
wet warren
#

maybe

scenic leaf
#

commas in ui is a godsend

#

also i think we gotta have a rounding error visual fix

#

like only show idk 2 or 3 digits after the dot

wet warren
#

Idk UI so it's centered 😭

#

doesn't look that bad

wet warren
#

for like hands/discards?

scenic leaf
#

like idk if its exactly a rounding error but that first image

#

for everything

#

you used compound interest

#

had like 17 digits after the dot

wet warren
#

yea in 2nd screenshot

scenic leaf
#

we dont need that imo

wet warren
#

you can see that it's gone

scenic leaf
#

yeah thats why im saying we need that

#

like for everything

wet warren
#

ye it should format hands discards money ante

#

I think

#

I know money for sure

#

not 100% sure on other stuff

#

and all numbers in tooltips will be formatted as well

green venture
#

I know xmult cards can end up with like "×2.07999999999999"

wet warren
#

Everything I wanted to add should be finished

  • number formatting should be used (probably) for all UI numbers
  • off-screen cashout is hidden
wet warren
green venture
#

krusty the crown is very susceptible to this

wet warren
#

I tested it but maybe I missed something

#

and I'll create PR now

wet warren
#

not entirely sure if my changes should be in talisman, but
1 - I dont like idea of a mod that's just this small qol, and dont know if it fits with cartomancer
2 - I dont want to add another patch to make this qol talisman-compatible balatrojoker

wet warren
#

wait, one thing I forgot to test is hand chips /mult

#

tho tbh maybe it does fit in cartomancer if I look at it as game optimization mod 🤔

wet warren
#

Yeaa so I decided to include this in #1258438028800692224 instead, will push a release some time today.

@main arch I still created a PR for talisman, but it's only on your number_format function override, it should be pretty harmless without cartomancer, but if you don't want that compat to be there it's fine

main arch
#

ngl this is the sort of thing you might want merged with Steamodded, too

#

Because it’s a big QoL improvement in general for crazy modded runs

wet warren
#

Hmm, maybe

sharp mason
#

There are a lot of UI changes people want to make in Steamodded, like Emerel’s pitch for a whole new Decks menu.

#

I could imagine this could be added.

wet warren
#

btw Math, what do you think of hand values switching to scientific notation at 1 million? makes the tab slightly cleaner balatrojoker

main arch
#

Looks good

wet warren
#

uh, also if I were to PR the scientific notation stuff to steamodded, do you mind if I also include the lovely patch that makes hand values use number formatting?

#

from talisman

main arch
#

Sure

tawdry arch
wet warren
#

made a PR

slate aspen
#

Btw Math, what's the reason the talisman dir has to be named Talisman exactly?
Is it only the nativefs.read/nativefs.loads in Talisman itself or other stuff too?

coarse vessel
#

Its because it is a lovely mod and lovely doesn't provide a way to get your own path, so you either need go do some complex stuff to try and figure out where your mod folder is (which might not even work), of just assume some sane default.

wet warren
#

ye

slate aspen
#

yes I assumed as much, I was just asking whether that's used anywhere outside of nativefs.read or nativefs.load

coarse vessel
#

I mean the same restriction happens no matter how you try reading the files

wet warren
#

I think it's planned to have dir path accessible with lovely soon™️?

coarse vessel
#

Lovely wa supposed to be updated to add if but then meth went on vacation and noone else seems to understand lovely enough to contribute to it

wet warren
#

yea Idk rust

#

I can only understand what the code does if I stare long enough at it

coarse vessel
#

Yeah and I believe this change needs a restucture of the code which I'm not smart enough to do

#

TBH it seems odd to me to do something like DLL injection in rust

slate aspen
#

otherwise it would probably be something like C/C++, no?

coarse vessel
#

Yeah

#

I mean DLL injection interfaces with c apis and requires unsafe rust to do

#

Maybe it's just a case of meth knew rust betger

tawdry arch
#

it could be reused as a workaround

coarse vessel
#

Also you're already scanning the entire mod foldsr so it's not that much more work

tawdry arch
#

previously it was integrated into the mod loading routine, but I decided to load core files through NFS instead of using lovely for improved readability

#

it's a lot more lazy though, it scans directories looking for a specific file name, and if it finds one it confirms the first line

coarse vessel
#

Yeah I figured something like that

tawdry arch
#

there's no top-level files to go off of, so it backs out to the parent directory, but that's easy to change

coarse vessel
#

But then everyone copoes that and then you have 2 mods with the same file name and then shit breaks.

tawdry arch
#

hence the check for the first line

coarse vessel
#

Oh I guess that helps

#

But someone is going to just copy paste it exactly if we're recommending it

#

And then chaos

#

Oh also you need to include NFS in every lovely mod then too

wet warren
#

people already do that

#

even the talisman balatrojoker

smoky lintel
#

yeah nfs is already the norm

coarse vessel
#

Yeah but I'm not the norm

slate aspen
#

fair enough I just thought lua would support getting the cwd

wet warren
#

nfs should just be loaded automatically with lovely balatrojoker

coarse vessel
#

Otherwise your code is injected into the games code and the cwd is known but not useful

slate aspen
#

righto

coarse vessel
#

Also because of that, rewuire doesn't work for modules in your local path

slate aspen
#

yeah I noticed that too

coarse vessel
#
[[patches]]
[patches.pattern]
target = "functions/button_callbacks.lua"
pattern = "ease_chips(0)"
position = "at"
payload = "ease_chips(to_big(0))"
match_indent = true
overwrite = true

[[patches]]
[patches.pattern]
target = "game.lua"
pattern = "chips = 0,"
position = "at"
payload = "chips = to_big(0),"
match_indent = true
overwrite = true
``` @main arch please add
main arch
#

Make a PR :)

coarse vessel
#

idk where to put them in hte lovely file

main arch
#

Anywhere

coarse vessel
#

okay

wild roost
#

When I try to add Mr. Bones (Or Perhaps any "Prevent death if score is x% of required score" joker) into my joker slots, the game crashes and gives me this error message:

#

Any help to fix/mitigate this issue?

main arch
#

This might be a JokerDisplay compat issue?

#

Actually lmk see what’s at line 250 of your mod where the crash is reported

#

G.GAME.chips / G.GAME.blind.chips >= 0.8

wild roost
#
--[[line 248]] calc_function = function(card)
--[[line 249]]            card.joker_display_values.active = (G.GAME and G.GAME.chips and G.GAME.blind.chips and
--[[line 250]]                G.GAME.chips / G.GAME.blind.chips >= 0.8) and localize("k_active_ex") or "Inactive"
--[[line 251]]        end
main arch
#

Alright so what you can do is somewhere in your code do
if not to_big then function to_big(x) return x end end

#

And wrap both sides of the comparison in to_big()

#

And it should work

steep drum
flint pollen
#

question: do i have to worry about to_big being nil or not amymore when using it in the current version?

main arch
#

if you have talisman as a dependency, no

flint pollen
#

oh ok

steep drum
wet warren
#

that sounds like a bug

nocturne ice
#

Am I missing something or is Talisman a bit useless if you pay with a ton of nodded jokers from various sources like I do? It seems from the readme like any mod that doesn't specially support talisman will have the scoring be incorrect once reaching the normal limit. Is really rather brave my run be forced to end and start a new one than have scoring go wonky and inconsistent like that. Am I missing something?

prisma nexus
#

Just disable mods with no talisman compat ig.

nocturne ice
#

So yeah not for me. Fair enough :3 Everyone plays the game differently

solar parrot
#

only very specific effects

nocturne ice
#

That kinds makes it worse. I tend to prefer kinds esoteric jokers, lol. So the jokers I build my run upon having a chance of randomly breaking down is... non ideal

solar parrot
#

i think most mods either don't have incompat in the first place or have it already implemented

#

only ones are ones that haven't been updated recently

#

maybe i'm missing something hmm

nocturne ice
#

The Readme for talisman makes it seem a lot more widespread so idk

#

In any case these are the boys I use

#

Slightly updated since I took this screenshot, but I'm not at my computer rn

solar parrot
#

Oh from the top of my head Boredom slayer from JankJonklers and a lot of the things in Mika's (the things that trigger based on blind score) is gonna be incompatible

#

Everything else i think shouldn't cause issues

misty widget
#

How do I get the 2.0.0 beta version

prisma nexus
#

this should probably override math.abs

solemn sail
#

is it normal that cards doesn't count, just counting the hand itself?

scenic leaf
#

I've had the same thing happen

#

Probably some bug

random plume
#

Can we make talisman works on joker abilities, money, hands or discards ?

main arch
#

Yes theoretically but I haven’t been adding that because of mod compat worries

#

We’re patching all the scaling jokers because of Scalea but there would be many crashes from putting big numbers in joker values

random plume
#

Ye

#

When we have inf money, the "inf" isn't inf, is a nil value. This makes a run completely unplayable.

tawdry arch
#

it works so long as you don't exit and load back into the run

solar parrot
#

i feel like that might be more trouble than it's worth now

random plume
#

Buying or selling any items crash the game if you have inf money

wet warren
#

eh does it?

tawdry arch
#

from what I've tried it only becomes nil after reloading?

wet warren
#

I only ever crashed with bull and inf chips

random plume
#

I'll try a thing

#

Yes is after reloading

main arch
tawdry arch
#

attempt to compare number with table, part 2

sharp mason
#

inb4 attempt to compare number with number errors start dropping.

prisma nexus
#

@main arch you used “chips” in some of your evaluate_play patches instead of “hand_chips”. I made a PR for it

main arch
#

merged :)

prisma nexus
#

k ty

main arch
#

also blame jenwalter /j

prisma nexus
#

will do /j

clever blade
#

talisman is crashing me on startup and i have no idea why

hot axle
#

Was normal before ?

clever blade
#

before it was normal yes

hot axle
#

Did you update Tal?

clever blade
#

i did

hot axle
#

maybe also update your steamodded

clever blade
#

changed profiles, still broken

main arch
#

Check that it’s in Mods/Talisman exactly

clever blade
#

no fucking wonder

#

i didnt realize it had to be named talisman specifically 💀

#

i've just been leaving it as Talisman-main all this time

main arch
#

m

solemn sail
#

works on bigNum though

primal rapids
#

crypid doesn't seem to be working? even tho i have talisman installed?

#

i got the 1.0.2 ver rn

tawdry arch
#

you need talisman 2.0.0-beta3

primal rapids
#

u got a link by any chance?

tawdry arch
#

just the source code off github

#

here, i'll send a direct download link

primal rapids
#

ty

#

ayy it works :o

prisma nexus
#

pr for hand chips

raven pumice
#

hi i just had an idea

raven pumice
#

FUCK i thought i posted it already

#

@main arch what if u could mark a profile as "mods only" (and/or even with the signature gold seal visually) so that scores can save to it?

main arch
#

i could maybe make an option for that

coarse vessel
#

Honestly it wouldn't be that hard to make a save file in the profile called like talisman meta or smth and save your data there and then when the game doenst gave tailsman it just loads the normal onr and goes on its way

main arch
#

that's a good idea

wet warren
#

yeah, I also had this idea earlier today, but it's better if it's in a standardised folder, otherwise the more mods you have, the more setting files there will be

wet warren
#

I mean, steamodded does that already, so

main arch
#

m

coarse vessel
#

I mean the profile is a standardized location

past portal
#

is it normal that the game crashes if I use this seal but not if I disable the animations?

#
SMODS.Seal {
    name = 'dark_seal',
    key = 'dark',
    badge_colour = HEX('202124'),
    config = {exp = 1.1},
    loc_txt = {
        label = 'Dark Seal',
        name = 'Dark Seal',
        text = {'{X:purple,C:white}^#1#{} Mult'}
    },
    loc_vars = function(self, info_queue)
        return {vars = {self.config.exp}}
    end,
    atlas = 'Seals',
    pos = {x = 0, y = 0},
    calculate = function(self, card, context)
        if not context.repetition_only and context.cardarea == G.play then
            if not to_big then
                function to_big(x)
                    return x
                end
            end
            
            return {
                x_mult = to_big(mult) ^ to_big(self.config.exp - 1)
            }
        end
    end
}
#

the crash happens inside card_eval_status_text() at the line if amt > 0 or amt < 0 then

main arch
#

Status text doesn’t happen when anims are disabled

#

Probably not Talisman’s fault

past portal
main arch
#

that might just be a bug with the seal's status text though

#

since talisman literally disables that

past portal
wet warren
#

btw SMODS.get_blind_amount is added even without steamodded

#

so that causes an instant crash

prisma nexus
#

new PR

hasty harness
#

Hello everyone, I'm trying to install the Talisman mod, to then install the Cryptid mod but I keep getting this crash. I tried every version of the Talisman mod but it keeps crashing. On the shown video I'm using the direct link posted by "Assertion failed" (11/08/2024).

hot axle
#

The folder name should be exactly "Talisman"

hasty harness
#

You're the man ! No more crash at start, hope it stays that way

#

On my way to remove all "-main" on my mods Ahah

dire kiln
#

How the hell do you increase the score limit to 10##1000 when C# can barely handle 2^1024?!?

prisma nexus
#

dropping precision

#

at high numbers that is

dire kiln
#

Not surprising, but still! WTF does the code look like for that?! [DM me with that BTW].

prisma nexus
#

you can look at the code

main arch
hearty topaz
hearty topaz
#

Found it in the settings, i was using latest release rather than talisman-main

#

its working perfectly fine now

leaden dome
#

What is the most stable talisman + steammodded versions ? Gonna try doing a super high ante run vanilla-ish

main arch
#

Latest is probably best

#

Let me know if the level up naneinf issue still happens

leaden dome
#

ye still does

#

(could be a little loud)

wet warren
#

btw you don't rly need steamodded for talisman, there is a crash without steamodded rn but it's fixed in my PR

leaden dome
#

ik but wanted to debunk this aswell

wet warren
#

ooh

#

i see

wet warren
#

talisman should add config_tab if smods is present

coarse vessel
#

I have a fork with that basically

#

I need to add one thing to make it work right

past portal
#

is there somewhere a guide to what are e, m, array and sign?

#

what they represent?

main arch
past portal
#

thanks ❤️

main arch
#

yw

coarse vessel
#

I made a pr math

mossy crystal
coarse vessel
#

ok thanks

past portal
#

what changes now?

coarse vessel
#

SMODS mod page has settings now

dire kiln
#

Can someone tell me if I have the Extended Hyper-E notation pattern for e10##1000 right?
Example: 10##1000 = 10#10#10#...#10#10#10 (1000 10s)
Pattern: Reduce the last number by 1 (E10#10#10#...#10#10#9 [999 10s]), then replace the last two numbers in the original expression with the new one (E10#10#10#...#10#10#(E10#10#10#...#10#10#9) [998 10s in the first part, 999 10s in the second]).

visual python
#

That sounds right

#

I just think of it as (approximately) arrow notation with 1 extra arrow

dire kiln
main arch
#

Looks correct

dire kiln
#

Hoooo, boy.... Trying to figure how large E10##1000 is gonna be a massive pain!

green venture
#

incalculably

visual python
dire kiln
#

I managed to figure out a pattern. It winds up being E10#10#10#…(E10#(E10#10)), with 4,495,500 10s. They start out with 9 iterations of 999 “10#”s, the next is 9 iterations of 998 “10#”s, then 997, 996, and so on. Still incomprehensively large when finally calculated, but it’s a start.

visual python
#

How are you going to calculate it?

hollow socket
#

y

main arch
#

m

past portal
#

does the mod feature a to_int(BigNum) function that converts the number if it is in the lua integer range?

#

I need to print a value in the loc_vars but it is in bigNum notation

tawdry arch
#

Big:to_number()

wet warren
#

I don't think SMODS detection works

main arch
#

It doesn’t

sharp mason
#

It definitely won’t if it’s in the code that gets added through oatches.copy

main arch
#

It’s a hook

#

But it might load before SMODS, that might be why

uneven mist
#

Error. How to fix it?

Syntax error: game.lua:4: '=' expected near 'Game'

Traceback

[love "callbacks.lua"]:228: in function 'handler'
[C]: at 0x7ff80aa49a00
[C]: in function 'require'
main.lua:16: in main chunk
[C]: in function 'require'
[[[[[[[[[[[[[[[[C]: in function 'xpcall'''''
[[[[[[[[[[[[[[[[C]: in function 'xpcall'''''

wet warren
uneven mist
#

Folder has the name Talisman, but error remains

hot axle
#

Verify game integrity

wet warren
#

I think it would make sense if talisman could identify if save file uses vanilla,big num or omeganum
and gave you a warning whenever you load a run that is incompatible with current settings

coarse vessel
#

@main arch

coarse vessel
main arch
#

Thanks for the ping

fervent wolf
#

ewww why does talisman override math.max and math.min to only allow two arguments

main arch
#

💀

gilded python
#

how do i get the correct version of talisman to work with cryptid 0.5.1

#

@main arch

main arch
#

download from source code

#

or from the cryptid release

gilded python
#

i used the one in the folder and it still said it was missing the dependency

gilded python
#

i think i broke my whole game lol

#

nvm its working

wet warren
#

why does this even get called in a vanilla run

#

btw after installing talisman on vanilla run my ante always goes to nil. Even if I don't use bignum/omeganum

#

not entirely sure what causes it

errant smelt
#

is there a reason bignum is default and not omeganum

main arch
#

I think it was originally designed like that without thinking 99% of the active users will be from Cryptid

#

Because without any ^Mult mods, OmegaNum isn’t necessary

errant smelt
#

understandable

#

i guess bignum has slightly less performance overhead?

main arch
#

Yeah

coarse vessel
#

also bignum used to be exclusive wasn't it?

#

so when omeganum was added then we would be changing the default

main arch
#

Yeah true

slate aspen
#

would you like me to create a PR for this or rather do it yourself btw?

coarse vessel
#

if SMODS and SMODS.Altlas

viral charm
#

Hello there. I am getting attempt to compare number with table whenever i try to compare a number with G.GAME.blind.chips with Talisman installed. Does anyone know what could be causing that?

tawdry arch
#

because of how lua works, it's not possible to override comparison between different types of values, they just throw

#

so both values need to be bignums first

viral charm
#

I see. Thanks!

nimble dirge
#

So wait, if you run a profile with talisman enabled, you can't go back to unmodded? I noticed I wasn't getting achievements while playing

main arch
nimble dirge
#

ah, so I assume that any content mods disable achievements then

coarse vessel
#

Steamodded disables acheivments

nimble dirge
#

odd, I had more speeds installed and it still gave achievements

nocturne ice
#

With smods? Because that might just be a lovely mod. I don't recall

nimble dirge
#

I had smod, yeah

#

although I could be misremembering when I installed it

nocturne ice
#

The achievement enabler is included in example mods (you have to move it to /mods for it to work)

#

Did you do that maybe?

nocturne ice
#

And yes it's an smods mod. It's also one of the example mods

nimble dirge
#

I didn't do any of the file moving stuff myself

nocturne ice
#

Ah I see

nimble dirge
#

switched to manual install after I learned that 98% of the mods were here on the discord instead of on any mod sites

viral charm
# tawdry arch wrap the number in `to_big`

It still doesn't work. I have tried putting the to_big() function at a whole bunch of positions to no avail, it still gives the error at line 99. Which is weird because the comparison at line 96 works without to_big() 😦
Is there like a to_small or some function that turns the big number back into its original counterpart?

warm zephyr
#

I found putting to_number() helped

viral charm
#

Will try that

viral charm
main arch
#

I must’ve forgotten about this. I’ve been a bit busy so a PR would be great :)

misty obsidian
#

I started a run using talismans high scoring to go past ante 39, but now am at 32 and just scored naneinf. Might be cuz I played on my laptop and PC (that both had talisman with the setting on), but is there still a way to safe the run and get past ante 39?

leaden dome
#

If you go past e308 on a hand that is above level 1 it instantly goes naneinf

#

If that naneinf instawins or not depends on the other mods

#

My workaround was playing a run without using planet cards

#

If you want to salvage ur run check what hands you have leveled up and try scoring with the hands that are level 1 (three of a kinds, pairs idk)

coarse vessel
#

yeah or with crytpid if the one joker that scales scaling jokers if there values hit e309 they become inf

coarse vessel
#

oh good

main arch
#

Except for specific Jokers that are whitelisted

#

Which support bignum/omeganum

coarse vessel
#

was thinking could talisman just convert inf to e309 or whatever

main arch
#

For saves, it definitely should

coarse vessel
#

yeah just in to_big

main arch
#

And also “local inf = e308” in the savefile header

nocturne ice
#

So I didn't really expect to be able to continue my run, but unless I just missed it you should probably still at a dosclaimer to the number- size setting that of wipes any current run ro change

nocturne ice
#

Is there anything stopping talisman storing its config in the steamodded config folder like Trance does now?

coarse vessel
#

Mostly just the process of migrating it I think

rough oasis
#

here's an idea:

#

if at all possible, move score calculation to a love.thread.newThread, so it doesn't block the main thread and your game doesn't crash - maybe adding a Calculating... thing, which could be cancellable by exiting to the main menu

#

also i wonder if i could get ExpantaNum ported over to lua

#

although that is in alpha right now

smoky lintel
#

Considering how hardcoded everything is, possibly very difficult

prisma nexus
#

this has brrn suggested so many times

rough oasis
prisma nexus
#

but there truly is no point

rough oasis
#

ah, fair enough :P

errant smelt
#

but but but nyumber need go bigger.. ,,

main arch
rough oasis
#

even still

pulsar plinth
#

Is there a way to easily enable and disable the scoring animations during a run, if at all?

sweet basin
#

Menu > Mods > Talisman > Config

#

There's no quicker way as far as I know

#

And it doesn't change until the scoring hand if you do it in the middle of a played hand

pulsar plinth
#

Thank you

main arch
coarse vessel
#

Wait you were able to do that?

#

Hmm not familiar with corutines

#

Does this have side effects with the event queue?

main arch
#

event queue is unaffected

main arch
main arch
#

so it runs scoring in a coroutine with active memory management basically

errant smelt
#

i wonder if it's feasible to multithread omeganum, ive never personally done any multithreaded work but considering that's the bulk of the time spent for some jokers it might be worth it if it's possible

#

i would imagine not since every calculation is reliant on the previous

#

but who knows

errant smelt
#

well, returns false, i had a patch for that

#

unsure if the patch is the reason for that or not though

#

i don't exactly remember whether it's necessary but i just left it as a precaution

errant smelt
#

you ever think about how much faster scoring would be if jokers specified which contexts theyre relevant in and which can be skipped over (specifically context.individual
like you dont even need to do this manually as the modder you can just do something like

#

forgot to finish that message

#

but like not v.config.center.calculate or string.find(string.dump(v.config.center.calculate), "individual")

#

obviously this is slower than just calling a blank function but you only need to do this once as opposed to 400000 times

main arch
#

👀

#

string.dump works on functions?

errant smelt
#

that's like the entire point of string.dump

#

regardless, this has some issues (such as if a card for whatever reason called some external function to handle it's calculation) where it could cause problems

#

and im not in favor of adding something obscure like this that could potentially lead to an issue that would probably never get diagnosed

#

the more significant thing to note is that with a lot of joker retriggers the bulk of the cpu load sometimes comes from hundreds of thousands of unnecessary function calls that could be avoided if there was a way for calc to know whether to bother calculating the joker

main arch
#

Ok I just never knew string.dump existed lmao

errant smelt
#

one thing it's useful for is passing functions between threads (although I don't actually know if that works or not)

main arch
#

Maybe we could just add a bunch of “yes” contexts and “no” contexts

#

and if those tables exist for optimizing it, then it would run if some combo of the “yes” contexts are satisfied and none of the “no” contexts

#

You’d need the modders to oblige but this is something that could be done for vanilla and Cryptid at least

#

Joker/retrigger stacking could also work, I know Jen has discussed the possibility of adding the former to Incantation

errant smelt
#

retrigger stacking would be nice, just won't happen anytime soon

#

would be very breaking

#

it might be worth it to put a good chunk of effort into rewriting calculation entirely (speaking of, what's that dead "better-calc" smods branch about?)

main arch
#

Someone’s attempt at that…

errant smelt
#

clearly we should just make better-better-calc

sharp mason
#

I think

#

I haven't looked at it in a couple months.

main arch
#

Jokers like Wario wouldn’t be possible otherwise

errant smelt
#

doesn't wario just give $3 when a joker triggers during joker_main?

main arch
#

No

#

It’s in any context

errant smelt
#

ah

main arch
#

And it has to actually trigger, not be a dud

errant smelt
#

or what

#

(id look myself but im pacing around right now

main arch
#

Also I kinda want to think about a general ETA calculation for the scoring

#

I know you had some ideas, would be cool to get it working even if it’s just a percentage or something that’s very rough

#

Could give people an idea of if their hand will EVER score

errant smelt
#

lmao yeah

#

I was working on that earlier

#

messed up something somewhere and gave up

#

I will try again though

#

fresh eyes

main arch
#

I’m curious your logic behind it, might help me think about how to add it as well

main arch
#

Function that returns true if the Joker should be calculated. Always calculates if it doesn’t exist

prisma nexus
#

just write a program to check if any given hand will terminate or continue forever. wait...

errant smelt
main arch
#

If you’re wrapping an if statement into a function is that bad per se?

#

To save a lot of the work, especially in joker retriggers

errant smelt
errant smelt
# main arch I’m curious your logic behind it, might help me think about how to add it as wel...

essentially you count up number of card retriggers (which you can only do for the first card, since calc only asks jokers for repetitions on a card after the previous card has already been scored through. so you just count up the first card and multiply by however many cards there are, that's the best you get) and multiply that by the number of joker retriggers for each individual joker, and then sum all that up
and then add the number of triggers for each individual joker that'd happen during joker_main
and that gives you a rough estimate

#

main issue is of course if you aren't retriggering each card equally

#

wtf

#

why did half my message die

main arch
#

m

errant smelt
#

m for real

#

i put the head back on my message

main arch
#

Now that I think about it, the only “good” way would be to run a pass before scoring that just calculates how many triggers you have to do

#

But even that is tough, many jokers have functions within them that will screw things up too

#

Like giving money when calculated

errant smelt
#

to be fair, that's already done with the sole exception of per-card scoring

#

it'd be pretty simple to simply patch in to check repetitions for every card first and then remember that

#

why didn't i do that? i just really didn't feel like writing lovely patches 3 hours ago

main arch
#

Getting it done tonight would be nice, if possible. It’d be a cool feature for 2.0 release

errant smelt
#

ill see what i can do

main arch
#

Ty

errant smelt
#

wait huh

#

why in gods name does retrigger api go through every single joker and calculate it for joker retriggers every single time a joker is calculated

#

so much for unnecessary function calls i think that just might be the bulk of the calculation

errant smelt
#

might be fine?

coarse vessel
#

I'm curious would be doing an if statment to check if a card does run be more efficent than a function call where it tghen just does an if statment and does nothing?

main arch
#

cleaned up the UI for this

errant smelt
#

🔥

errant smelt
#

lol I forgot about this tbh, it's mostly irrelevant though since the gc is only called when necessary now anyways

main arch
#

It’s important when draw frames are slow

#

But I think 30 FPS is a better compromise where the game is still decently smooth

rain finch
#

I don’t know if you have implemented that feature already but could you add a animation skip for the space joker
As of my latest memory, I still have to sit through the clicking sounds etc.
And with my old hand level record being over 40k and my new one being much higher some day, I would really appreciate not having to sit through tens of thousands of clicking sounds
Also, they take forever to finish

#

I just saw it is an open issue
Nevermind then

main arch
#

issue is nopeus requires steamodded, and that crashes his run for some reason

#

I can try doing this tmrw though, shouldn't be too hard

errant smelt
#

oh I see

rocky yoke
#

cryptid

errant smelt
#

guh

wary wind
#

does this have a calculation screen?? or is that cryptid

errant smelt
#

it's talisman yeah

#

latest update thingy

wary wind
errant smelt
#

solution to being bored while calculating:

NFS.remove(tocopy)
NFS.createDirectory(tocopy)
local exename
local main = love.filesystem.getSourceBaseDirectory().."/"
for i, v in pairs(NFS.getDirectoryItems(main)) do
 if v ~= "version.dll" then -- mac should launch as default Balatro i think
  if NFS.read(main..v) then
   NFS.write(tocopy..v, NFS.read(main..v))
   if string.sub(v, 1, 7) == "Balatro" then --as opposed to v == "Balatro.exe", for mac compat
    exename = v
   end
  end
 end
end

love.thread.newThread([[
os.execute(({...})[1])
do end
]]):start(tocopy..exename)```
coarse vessel
#

you can get the executable from a built in thing

#

I forgor what it's called rn

#

arg[-2] iirc

#

take a look at SMODS.restart_game

errant smelt
#

i would imagine SMODS just defines it as arg = {...}

#

going off of the love documentation

#

okay yeah

#

i guess the SMODS function must just, not work? idk

coarse vessel
#

it does

#

I think arg is a global love provides

#

or maybe lua itself

errant smelt
#

ah, it is a lua thing

#

The three dots (...) in the parameter list indicate that the function has a variable number of arguments. When this function is called, all its arguments are collected in a single table, which the function accesses as a hidden parameter named arg. Besides those arguments, the arg table has an extra field, n, with the actual number of arguments collected.

coarse vessel
#

oh

#

hold on let me remeber how I made this

errant smelt
#

no wonder {...} is wonky and needs to be wrapped in an expression

coarse vessel
#

but something is setting the arg global

#

and it's the launch args

main arch
#

add an option in the config menu to launch a subgame of balatro during balatro

errant smelt
#

well

#

not sure on time

#

definitely on calcs

#

went from 2.5 million to 100 thousand

#

the catch here is that it:
only works (in terms of the performance increase) on modded jokers
only checks the contexts inside that specific joker

#

and it of course is not refined

#

this was a test

#

explanation of what that does btw

for every joker, it dumps its calculate function and puts every string in the function in a table (such that if it has ANY reference to a context, itll be in that table, aside from a few contexts which are practically everywhere and arent helpful in determining whether a joker should be called)
so lets say i have a joker like this:

calculate = function(self, card, context)
 if context.individual then
  --blah blah
 end
end

when this gets dumped, itll be more like
(RANDOM GIBBERISH)individual(MORE GIBBERISH)
it just so happens that that there is NEVER surrounded by an alphabetical character/underscore
so you can just match that with a [a-z_]+ regex search and put every such string in a table
and so, it'll see every string, but most importantly the contexts relevant to that joker
and all of these are applied to the individual jokers (but it really should be applied to the centers)
the important thing is that when a joker is being calculated, if the game sees that none of the contexts are even mentioned in the jokers calculate function at all, it just skips over that joker since it clearly does not care about whatever the game is asking it for right now

#

anyways, now its worth mentioning the downsides of that improvement:
if a joker calls an outside function to do all its calculations, this will improperly skip it every time
if a joker intends to do something whenever it is calculated, this will improperly skip it every time
if another mod hooks into calculate_joker before talisman does (this would not be an issue if this hook was at the very tail end right before the main games cj function, but idk if talismans is), and it needs to do something every time, this will improperly skip that (since this returns early)

#

all in all im not sure the downsides are worth the performance improvement. if anyone has any ideas on reducing/solving some of these problems then please do share, otherwise im against implementing this
its a bandaid solution for the bigger issue that is calculations being lumped all into one function

#

oh wait i accidentally left in a profiling thing

#

whoops

#

ok, rough estimate for time saved is 20%, but it can be higher and lower depending on the jokers in question

errant smelt
#

i wonder how much adderall it would take me to rewrite scoring

#

oh wait yeah

#

I forgot that I discovered about 30 minutes ago that scoring is slow because of omeganum math

#

so rewriting scoring would do a grand total of barely anything

coarse vessel
#

tbh it mihht be fine to provide some kind of table for SMODS to just tell it what contexts we want

#

for jokers with one context it would save them writing an if statment

#

but then it would save on performance

#

and wouldn't break (default could be just all)

sharp mason
#

I've thought of that as a possible suggestion on Talisman's end but that would require mod devs to add that compat.

#

If it was handled on SMODS end that would be easier to suggest others to use and by extension let Talisman optimize scoring further around it.

#

This just isn't really useful outside of Talisman

main arch
#

One function for can_calculate that’s just the necessary conditions and one function that does the calculations

#

It also… might be fine in Talisman? Considering a lot of mods have it as a dependency and it wouldn’t be a required thing to do just to use Talisman

#

Also, if the bulk of the time spent is in OmegaNum calculation, is it possible to make a “hybrid” notation? Which automatically switches based on size

errant smelt
# main arch Also, if the bulk of the time spent is in OmegaNum calculation, is it possible t...

im not sure, i believe omeganum math is already fastish at smaller numbers anyways (you'd definitely know more than me though). i imagine an improvement can be made in places where you're doing xmult operations thousands of times, where you can wait and multiply say 100 of those together before multiplying that number with the main, larger number to have to do that burden of large-number math less. idk whether this would actually improve performance though

main arch
#

Tbh at that point, I’d rather code something like trigger stacking where you can do 1,000,000 of the same calculation in one step (eg. Baron Mime action, or a lot of Canvas retriggering one joker)

#

That would be tough to do though, but would be a massive improvement
(Like probably >100X)

errant smelt
#

jen did something similar with bulk using consumables iirc

#

anyways i think one of the hardest things there is still playing the normal vanilla scoring animations properly when you're stacking the retriggers

main arch
#

Don’t stack with anims on

errant smelt
#

true

empty rampart
#

is there any mod dependency for talisman (except for lovely i have that)? i have omega num turned on but i just go to naneinf if i go over e308.

main arch
#

It’s a known bug with poker hand upgrades

main arch
#

can confirm my suspicion about this bug was correct
(ignore the weird formatting, I changed it so I could detect talisman numbers)

errant smelt
#

m

main arch
#

i knew about this in June, why did I not find this brain-dead fix until now

#

anyway i now have to patch planet card UI to deal with it

#

finally, they can all be m

#

well this doesn't look right

main arch
#

fixed that too

scenic leaf
leaden dome
#

Oh nice that got fixed

half hamlet
#

When I leave a run (main menu/close game/crash) and resume, all my base hand scores become small. I've found that this only happens when both Talisman and Jimbo's Pack are active. Any idea what interaction could be causing this?

errant smelt
#

no talisman compat moment

#

i love jank

dull nest
#

In notations, the differing capitalization of balatro.lua file and the filepath used to load it causes it to break on case sensitive file systems

spark bone
#

I had a run go to ante 33 where I got "attempt to compare nil with number" every time I tried to play a hand.
Helpful folks in #general sent me to this mod - it does enable me to keep playing but I see "nil" as my ante number, can I fix this? It should be 33 (on mac if that matters)

spark bone
#

Inifinity is less than 8.8e212? ;-;

#

After main menu then going back I now see this... I am confusion, so the score internally WAS e308 but I still didn't win the round?

main arch
#

Try doing a new run and ensure you’re on Talisman 2.0.2

#

Talisman doesn’t play nicely with vanilla saves

spark bone
#

Oh no :( I've been working on this vanilla run for 2 days, I'm kinda attached, is there any risk of actual data damage if I keep playing it with Talisman or will all harm be cosmetic (like weird UI but no crashes)? Bc I can handle cosmetic

#

And yes version is 2.0.2

main arch
#

I’d recommend making a backup, but I don’t believe there’s any profile damage from using Talisman

#

Only thing is Talisman savefiles don’t work with vanilla, so your runs wouldn’t carry over from there. However the stats should save fine

spark bone
#

Is there any way to "convert" a vanilla save into a talisman save? Even if it's manually filling out a json? I'm pretty attached to this run lol I'd like it to go the distance if possible

main arch
#

Not yet but I can probably add in the near future

#

Or just make vanilla saves work with it

spark bone
#

Hey alexa how easy is it to learn Lua just enough for a pull request

fervent sentinel
#

easy enough that when i noticed fusion jokers had a bug i had it fixed in like an hour
(and then the pr never got accepted because the mod creator has been inactive for months. rip)

spark bone
#

fork time

main arch
#

I think the easiest way to do this would be to convert all the hand level stuff from whatever it is to big numbers whenever you load a save (which is what Talisman does when starting a run)

spark bone
#

With a debugger? I feel clueless

#

I reached ante 39 and am officially stuck 🥲

chilly vale
#

@main arch does the talisman stuff for calling values like Xchips Emult Echips Ect not work with SMODS.eval_this?
because i cant get these to work

main arch
#

it doesn't work with that

#

you can do something like this tho (here is ^Mult)

mult = mod_mult(to_big(mult) ^ card.ability.extra.mult)
            update_hand_text({delay = 0}, {mult = mult})
            card_eval_status_text(card, 'jokers', nil, percent, nil, {message = localize{type='variable',key='a_powmult',vars={card.ability.extra.mult}}, powmult_mod = card.ability.extra.mult})
#

possible feature to add for the future though

#

i didn't even know eval_this existed to be honest 😭

chilly vale
main arch
#

ye

chilly vale
#

will it work if i have multiple>

chilly vale
main arch
#

mult:arrow(2, x)

chilly vale
main arch
#

hand_chips

#

iirc

#

it's goofy

chilly vale
# main arch hand_chips

soo

hand_chips = mod_hand_chips(to_big(hand_chips) ^ card.ability.extra.Echips)
update_hand_text({delay = 0}, {hand_chips = hand_chips})
card_eval_status_text(card, 'jokers', nil, percent, nil, {message = localize{type='variable',key='a_powchip',vars={card.ability.extra.Echips}}, powchip_mod = card.ability.extra.Echips})
main arch
#

something like that except it's mod_chips

#

I also don't think the localize message even worked in the ^Mult example I sent you so that'll probably need more tweaking later

chilly vale
#

is it also powchips or powchip like i did

main arch
#

there's like no ^Chips in cryptid so it might be neither (for the key='a_powchip')

#

you might have to add your own localization key for that

#

it also might be Echip_mod, maybe that's why it wasn't working for me earlier

chilly vale
#

oh ok

main arch
#

someone planned ahead with "a_powmultchips_minus" 💀

chilly vale
#

damnit it did not work

chilly vale
main arch
#

try Echip_mod

#

or Echips_mod

#

at the end of localize

chilly vale
#

funnything is the mult worked

main arch
#

where it says powchips_mod = .......

#

try some variations of that I don't remember what is supposed to be used

chilly vale
#

ok

main arch
#

probably Echip_mod

chilly vale
#

i tried them all i think its something to do with hand_chips

chilly vale
main arch
#

"chips" is just +chips

#

i know the hand_chips stuff is correct

#

the function has to be mod_chips tho

chilly vale
#

? all 4 of them

main arch
#

just that one

chilly vale
#

oh the others are chips? onlt the main one is hand_chips?

main arch
#

okay so

#

mod_chips is the name of the function

#

hand_chips is the name of the variable that stores the chips

#

so you're only changing mod_hand_chips to mod_chips, everything else uses hand_chips

chilly vale
#

ok yeah id di that and it no work BRuh

chilly vale
chilly vale
main arch
#

not at all!

#

i'd prefer if it had eval_this support tbh, i just learned about that function today

chilly vale
#

not sure if you can just call the function again in talisman

#

this is the function in steamodded

function SMODS.eval_this(_card, effects)
    if effects then
        local extras = { mult = false, hand_chips = false }
        if effects.mult_mod then
            mult = mod_mult(mult + effects.mult_mod); extras.mult = true
        end
        if effects.chip_mod then
            hand_chips = mod_chips(hand_chips + effects.chip_mod); extras.hand_chips = true
        end
        if effects.Xmult_mod then
            mult = mod_mult(mult * effects.Xmult_mod); extras.mult = true
        end
        update_hand_text({ delay = 0 }, { chips = extras.hand_chips and hand_chips, mult = extras.mult and mult })
        if effects.message then
            card_eval_status_text(_card, 'jokers', nil, nil, nil, effects)
        end
    end
end
main arch
#

i can probably hook it, or patch into it if I can't hook it nicely

chilly vale
main arch
#

i can show you but I don't think it would work nicely with this

#

patching will probably be better, or completely replacing the function with something new

chilly vale
#

it had to be chips = hand_chips

main arch
#

💀

#

nice find tho

chilly vale
#

but yeah we should still make eval this work with the talisman oparators

main arch
#

agree

chilly vale
main arch
#

inside mod_mult

chilly vale
errant smelt
#

what if the solution to slow calculation was omeganum C port egg

#

tbh it actually would be faster to make omeganum calls asynchronous and only yield if you actually need the result of the call

#

no point waiting

#

just run all the calculations on a separate thread or smth

#

issue with that being how would you know whether the result of the call is needed

#

but bleh

coarse vessel
#

just rewrite the entierty of balatro to be multithreaded

#

or well at leat calculations

errant smelt
#

so one way or another you're always waiting on one thread

coarse vessel
#

tbh if we could rewrite calulation to be smarter with retriggers we could speed up a lot of big calcuations

errant smelt
#

yea that's the goal of scoring ever gets rewritten

coarse vessel
#

but that would require rewriting vanilal calcualtions and modded suporot

#

which is a lot of wokr

errant smelt
#

too silly for main branch unfortunately though

#

when you start using string.dump to optimize your code something is very wrong

coarse vessel
#

oh btw is joker.calculate being run every frame of calculation still?

#

if so can we pause it to save some cpu cycles?

coarse vessel
#

like jokers can have an update method

#

thats is called every frame

errant smelt
#

oh joker.update

#

i have no clue

#

i think it's better to leave that going tbh, just to avoid potentially breaking stuff

coarse vessel
#

true

errant smelt
#

it's barely any overhead anyways

coarse vessel
#

I was thinking about maybe making a pr for SMODS to make a lazy_calcuate that is only called

  1. Right before rendering your ui box
  2. right before calcuating the joker
  3. that might be all idk I feel like I forgot smth
#

cause I know I could save quite a bit of work for my one modded joker and also some vanilla jokers (assumign we rework them)

errant smelt
#

ya

coarse vessel
#

I'm about to cross the norder and lose my cellular so good luck

errant smelt
#

my issue is that even if you save a bunch of time on not wasting cycles and whatnot, the bottleneck for high-scoring hands is still omeganum

main arch
#

wondering on if I should extend Talisman to affect more things that really only matter in Cryptid/modded runs
going to make these polls since if I add these it'll require mods to add more compat

coarse vessel
#

When are emods going to be effected by this?

#

Like is knockoff swashbuckler going go be affected by the money one

#

Also what's going to use poker hand levels?

#

Can't think of anything off the top of my head

main arch
#

it's whenever you have to do comparisons with these values

#

there's probably a few modded jokers that'd need fixing with $, I'm not sure if any would need that for hand levels tho

#

maybe something like Aurinko would need changes

errant smelt
#

c rewrite of omeganum going well
(idc whether this makes it perform better or not, this is just a project im doing for the fun of it)

#

im not going insane

wary wind
# main arch

yes, having poker hands not be capped at 1.9e308 and resetting to 1 chip 1 mult is nice

main arch
errant smelt
#

itd require me writing memory safe code which doesnt happen

#

to be fair i could just store all the references in lua and add an __gc metamethod to all of them that frees them on the C side

#

but thats no fun

sharp mason
#

Altho can't you just turn them off in your ide?

errant smelt
#

probably

#

ah yeah figured it ourt

#

its fine though

#

ill just delete thsoe files before i do anything w the branch

main arch
# main arch
poll_question_text

Should Talisman affect poker hand levels?

victor_answer_votes

13

total_votes

15

victor_answer_id

1

victor_answer_text

Yes

victor_answer_emoji_id

1185786257775792219

victor_answer_emoji_name

again

main arch
# main arch
poll_question_text

Should Talisman affect $?

victor_answer_votes

13

total_votes

15

victor_answer_id

1

victor_answer_text

Yes

victor_answer_emoji_id

1185786257775792219

victor_answer_emoji_name

again

#

The people have spoken

errant smelt
#

am i crazy or would this not just crash

tawdry arch
#

i don't think lua exactly lets you add a string to a table

errant smelt
#

the only way i see that happening is if it allows you to do that with an __add metamethod but the omeganum one doesnt handle that so

#

it would try to interpret "Iteration failed to converge" as a number

tawdry arch
#

but doesn't .. work?

errant smelt
#

is that true? i was under the impression that it worked if they had the same metamethod or one didnt have a corresponding metamethod

tawdry arch
#

nah it has to be the same metatable

errant smelt
tawdry arch
#

can't read that

coarse vessel
#

Now print b+a

errant smelt
#

same thing

#

ill try empty metatable and conflicting metamethod

#

empty metatable on b still works

#

uses the metamethod of whichever component comes first

#

this isnt luajit though

#

might be different for that

tawdry arch
#

I don't remember it working that way

#

but be a luajit thing then or changed in post-5.1

errant smelt
#

possibly

#

this command line is 5.1

#

this one isnt

#

same behavior as 5.1

#

just tried the same thing on most recent luajit

#

same behavior

#

interesting how conflicting metamethods dont matter but i guess it makes sense

#

its faster to not check

main arch
prisma nexus
#

I feel like doing this is going to cause a ton of mod incompats

main arch
#

Yeah that was my biggest worry

#

I want to roll it out slowly so modders are able to fix these before they happen

#

Most jokers should be fine though, since very few affect hand levels period and most that affect $ shouldn’t need changing

#

I’d argue that quantum enhancements broke more

#

In the sense that more jokers will need to change to work with it

coarse vessel
main arch
#

Yeah that’s the smartest approach

#

Didn’t think about the branch thing but I’ll definitely be using that

main arch
#

random thought, what if we made a separate mod that adds better calculation API and implements it for all vanilla jokers

#

and then also make that compatible with Talisman/Steamodded

#

this way we can do it without breaking compatibility with the current system while also optimizing it for mods that need it

#

like Cryptid runs or DrDreamo-type runs

errant smelt
#

i feel like that'd be kinda hellish

main arch
#

With only 150 jokers I don’t think it’s TOO bad

#

or do it as a Steamodded feature with some backwards compatibility but that feels more nightmarish

errant smelt
#

oh also wdym by "calculation api"

#

because i don't know exactly what that implies, like evaluate_play in its entirety or Card.calculate_joker or what

main arch
#

idk

#

Definitely at least calculate_joker to start

#

and then override more things as needed?

errant smelt
#

would making a separate mod for that really be good though? i feel like we'd be better off making an smods branch and rewriting it there, potentially adding backwards compatibility and then just merging that

#

i feel like backwards compatibility would be as easy as just making the new calculate function calculate_v2 or something

#

unless the new approach to contexts and whatnot is entirely different in which case it'd be complicated

main arch
#

true

main arch
#

playing with the jen's almanac mod pack, going to list all mods I've found issues with (updating this as I test):
Betmma Jokers (Piggy Bank)
Cryptid (White Hole, Compound Interest)
Jen's Almanac (safeguards and fractional hand level colors; Phobos)
JenLib (lowhand, hihand)
More Fluff (Spiral Joker)

main arch
#

Talisman 2.1.0 alpha

What's new in this version:

  • Cash now uses large numbers
  • Hand levels now use large numbers
  • Hand level up animations are now skipped

This will break compatibilities with a lot of mods, so it is currently in an alpha state. I will wait until most mods have compatibility with this version before moving it to the main branch, but modders are strongly encouraged to ensure compatibility with 2.1.0 in the coming weeks

Known issues:

  • Lines in the cash out screen display naneinf for values over the vanilla limit
scenic basin
#

🤔 What of including support for accessing the Talisman operations for SMODS.eval_this? Or is that more of on Steamodded side to prepare first, like calling a table that includes functions that may return true for custom chip/mult operations and then Talisman can add its' own into said table?

errant smelt
#

"omeganum.dll is not a valid win32 application" okay luajit thats ok ill build it for 32bit instead "omeganum.dll is not a valid win32 application" im going to kill you

coarse vessel
errant smelt
#

that clarification probably isnt necessary

main arch
#

i don't think efficiency is necessary without a setting to change the time spent calculating per frame

#

so if I was to do a calculation rewrite where cards only calculate on the necessary contexts...
how do you optimize that?

#

i think most of the redundant calculations come from retriggers

#

but also, oh god...

#

even in the if statement tower that is Card:calculate_joker, contexts are checked before jokers

#

if something within the joker center was indexed, that could save a lot of calculations

#

and then if possible, a "bulk calculate" that works with retriggers...

#

so, let's say a steel card is triggered 10,000 times; it just does 1.5^10,000

rain finch
#

I think stuff like that would help me with my 250 cards, 70 parking and 70 mimes

errant smelt
#

luajit ffi might actually be the thing stopping me from making this

tawdry arch
#

damn

errant smelt
#

C development except compile at runtime with no preprocessor

errant smelt
#

okay it seems like the version of luajit that balatro uses just ... doesnt have working ffi?

#

so uh

#

so much for that

main arch
#

(and relevant code within Lua is in the latest Brainstorm ver)

errant smelt
#

ah nvm foun dit

#

odd

#

its pretty much what im doing

#

why does visual studio not look in the space it dedicates for header files for header files

#

i hate that im forced to use this garbage

#

alright yeah no clue how you got old luajit working

main arch
#

I didn’t even do anything weird, it just works

errant smelt
#

its not possible that inbetween then and now something broke no?

main arch
#

Was talking with some people on the Cryptid Discord and I think the next step for a possible v3.0 would be retrigger stacking, that feels like the only useful optimization

main arch
errant smelt
#

thats

#

incredibly odd

#

im just gonna make sure the actual program still works

#

okay yeah it builds just fine and does exactly what it should

#

thats so weird

#

compiler is clearly doing everything just fine

#

i have no clue why luajit just refuses to behave

main arch
errant smelt
#

the world would be so much better if there was a gcc windows binary literally anywhere on the internet

coarse vessel
coarse vessel
errant smelt
#

..what do you think im trying to do

coarse vessel
#

Using lua jit to interface with c

#

Lua proper can use c

#

Your c code just needs to be made fir it

errant smelt
#

i honestly dont feel like rewriting a bunch of stuff because the proper channels dont actually work

#

not today at least

#

i can always blame thunk for making us use an archaic luajit version

#

im certain now btw the dll is perfectly fine ffi just thinks its 64bit when it absolutely isnt

coarse vessel
errant smelt
#

i know this

#

like i said

#

i dont feel like rewriting things because the proper way to do it isnt functional right now

#

i would rather complain over the internet than get things done

hot axle
#

Math don't you think there's too many mods that depends on Talisman now it kinda needs to be part of smods?

#

like wtf

errant smelt
#

realistically talisman shouldnt be a dependency for any mod

#

except maybe cryptid

#

its not hard to work around supporting both talisman and vanilla

tawdry arch
#

yeah no that sounds like a terrible idea

scenic basin
#

Guilty as charged for deciding to have Talisman as dependency. 😛

kind gull
#

i'll bet some are just xchips tbh

hot axle
#

then maybe just put some of them in smods

kind gull
#

yeah maybe could put the operators?

tawdry arch
#

we can put xchips (and maybe exponents, not sure) into steamodded

#

but nothing else should be added imo

hot axle
#

fair

scenic basin
#

...it does feel wrong doing this. 😛

tawdry arch
#

... talisman can just hook the function

#

(me waiting for lovely patches on mod files to no longer be broken)

scenic basin
#

When such is done, then that "hack" is outta my script.

tawdry arch
#

(don't mind the fact that you don't need to override the function and a simple hook would do)

scenic basin
#

Do show such hookery to be done instead of this, then.

tawdry arch
#

just put the lines and a call to the original...?

#

it doesn't need to be in the middle

scenic basin
#

...afraid I don't follow? 😅

tawdry arch
scenic basin
#

Assuming I just put the additional lines for the extra operations alongside the update_hand_text & if effects.message right there?

tawdry arch
#

no need for the message, but yes

coarse vessel
#

Idea for optimziing calculations. In calculate_joker you can return an object like { talisman_never_calculate_this_context = true } and then talisman caches that info and skips any calcualtions for jokers that indicate they never calculate there

#

the code would be pretty simple
for jokers with only one calulate: lua if not context.joker_main then return { talisman_never_calculate_this_context = true } end -- do stuff end or with multiple lua if not context.joker_main and context.before then return { talisman_never_calculate_this_context = true } end -- do more if's like normal end

#

any mods that didn't change just wouldn't get the extra optimization

#

idk how much this would help

#

probably for retriggers you could just skip all of them ones on a useless context

stiff ibex
#

us

gleaming wedge
#

any way to force skip animations with a hotkey or such? (I know the settings, but started a hand without it and an hour later regret it)

errant smelt
gleaming wedge
rain finch
#

But if you are just waiting for one hour to let anim skip finish that trick won‘t work anymore 😅😭

errant smelt
#

lol yeah

#

gosh this is why we need to stop pushing limits
previously people were limited to a few seconds of calculation time because of crashing, and it was meh everyone was content
then the talisman calculation screen got merged in and everyone immediately started doing multi-hour hands

#

balatro players will always thirst for bigger numbers fr

gleaming wedge
#

final result

#

2 of these exponetia. 5 blueprints copying Chad and 3 brain storms copying the exponetia. with 225 Steel, red seal, kings with 2 barons, mime, ancient joker and 1141 levels on high card.

#

im tired

gleaming wedge
errant smelt
#

true..

gleaming wedge
#

This run only took 4.5 hours before this last hand

#

worth it tbh. Overall, 7 hours of gameplay and probably like 2 of them being calculations :3

errant smelt
#

jens almanac players wasting 3 hours of their life so that their 3#352##9999 score can go up to 3#353##9999

gleaming wedge
#

Hhehe jokers go big number

main arch
errant smelt
#

2k9 moment

wary wind
#

i can confirm

hot axle
#

now is this a talisman issue?

coarse vessel
#

You need at least talisman 2.0.2

hot axle
coarse vessel
#

Hmmm

#

@tawdry arch

tawdry arch
#

uhhh

#

you...

#

i don't remember it working that way

#

what was this meant to accomplish again

coarse vessel
#

I think we were thinking we didn't want to match 1.0.0~ to 1.0.0 but idk now

#

Probably for <1.0.0

tawdry arch
#

so <<1.0.0 wouldn't match beta versions of 1.0.0?

coarse vessel
#

I think so

#

If I wanted versions before 1.0 I wouldn't expect to get a 1.0 beta

tawdry arch
#

you can just use <<1.0.0~ for that

coarse vessel
#

Yeah but will they know to do that?

tawdry arch
#

idk

#

anyways this would be specific to major.minor.patch being the exact same

coarse vessel
#

Idj your the one programing the versions so I'll let you use your judgment

#

But if I want like >=1.0.0 << 2.0.0 I don't expect a 2.0.0 beta

tawdry arch
#

i can just move that line down 3 lines and it will do that i think

coarse vessel
#

Maybe we should be more strict for downloading but not just matching

tawdry arch
#

this isn't what we want either

#

effectively this would prevent (>=1.0.0~a) from matching 1.0.0 because 1.0.0~a can't be less than 1.0.0

#

so 1.0.0 isn't greater than it, either

#

i think we just remove the check and live with the fact that you have to add a squiggle to get what you want

#

fuck it we ball, i just removed the line

errant smelt
#

wtf package.loadlib is ALSO giving me "omeganum.dll is not a valid win32 application"
so is the fucking visual studio debugger
mf you built it for win32!! you tell me why its not made for win32

#

at least i know its not an ffi issue now

wet warren
#

hi just a reminder that my pr for ante nil fix exists

main arch
#

m

grim shard
hot axle
#

Math my guy can you remove the "~dev" suffix in the versioning?

tawdry arch
hot axle
#

gemstone is still complaining it

tawdry arch
#

ion think it should

#

smods ver?

hot axle
#

1302a

tawdry arch
#

I am very confused

#

I thought I'd removed the line yet somehow it's still there

#

fixed on 1303a 💀

pliant cove
#

hi! i have a question, can i change from bignum to omeganum without restarting my run, just restarting balatro?

errant smelt
#

i don't think the two are compatible no

pliant cove
errant smelt
#

you can try restarting balatro but if you get crashes you'll need to restart the run

#

why do we even still have bignum i wonder

#

it's kinda useless

pliant cove
#

xdd

tawdry arch
#

runs started with one are incompatible with the other

errant smelt
#

fucking finally

#

all i had to do was just not use vs2022

#

i can finally get back to like
actually making the thing

errant smelt
#

oops !

#

in all seriousness im just checking if my memory management is like working and thats with it . not on

#

i do wonder how i'm going to do memory management though, obviously i can represent bigs inside a userdata and give that a __gc property but i kinda dont want to have to deal with the lua stack right now

#

the alternative is forcing you to do memory management in lua which isnt happening

#

i wish you could give the __gc metamethod to things other than userdata

#

oh wait

#

ah nevermind

#

you cant give cdata metatables

#

unfortunate

#

i wonder if luajit has newproxy

#

ah sick it does

#

ahh yes shit is finally going my way

#
local bigmt = {
    __gc = function(self)
        omeganum.freeOmega(rawget(getmetatable(self), "data"))
    end,
    __call = function(self, ...)
        return rawget(getmetatable(self), "data")
    end
}

local function makeSafe(big)
    local toRet = newproxy(true)
    local mt = getmetatable(toRet)
    mt.__gc = bigmt.__gc
    mt.__call = bigmt.__call
    mt.data = big
    return toRet
end
#

ive just had a thought

#

nevermind actually that thought sucks

sharp mason
#

POV: Me whenever I make a mod concept

errant smelt
#

😭

sharp mason
#

My only two recent thoughts are a challenge about getting 5 jokers and having to figure out what they are (stupidly easy) and scaling enhancements (who here wants to play a 1/52 deck card 4 times for a Spectral? Not me!).

#

I swear all I can cook is API and saving files in spreadsheet format

#

That's it

#

😭

#

Anyways kinda suprised that newproxy still exists, didn't lua 5.2 nuke that?

#

ig LuaJIT is meant for lua 5.1 but still

errant smelt
#

oh

#

yeah

#

well it makes sense newproxy is useful

#

even more so in luajit since youre meant to use ffi instead of the lua libraries

errant smelt
#

@prisma nexus is there supposed to be a return at the bottom there? js version does

prisma nexus
#

uuuuuuh

#

idk

errant smelt
prisma nexus
#

oh

#

uh yeah that should have a return

#

not sure why you'd divide by zero tho

errant smelt
#

meh still worth fixing

#

made a pr

errant smelt
#

why does Big:add in omeganum use "a" as a global

errant smelt
#

this is just mean