#Sessions - Daily runs with an online leaderboard

1 messages · Page 1 of 1 (latest)

foggy warren
#

This mod introduces multiplayer to Balatro. It adds a new tab to the run setup menu, "Daily". In the Daily tab there's the option to start a daily run or view a leaderboard for top hand scores, as well as your personal best.

When you finish a daily run, your top hand score will be posted to the server. You can re-run the daily as many times as you want to try and improve your high score. There will be a new run available every day to try.

Keep in mind, this mod is in a very early state. Bugs are likely, and it's possible the mod server could experience downtime, though I will do my best to keep that from happening.

Feedback is highly considered as I plan to continue adding features which build off the foundation of a multiplayer experience. This is only the first iteration, but I've found it to be fun in its current state. I hope you do too!


[Latest release](#1273387775579918426 message)
Installation instructions can be found in the README.


FAQ
I want to play the daily run, but I haven't unlocked the deck, what do I do?
Switch your profile to an unused one, press the "Unlock All" button. This will allow you to play any daily challenge with a full collection of jokers, vouchers, etc.

Is a Steam connection required to use this mod?
Yes. Scores are bound to the player's authenticated Steam ID.

Why do you need a custom luasteam?
Steam authentication is important to prevent cheating and abuse. The official release of luasteam is missing a specific method that makes Steam authentication possible (GetAuthTicketForWebApi) . The custom luasteam adds that method.


P.S. My GitHub repo for this is private because it also contains the code for the server. The Lua code is basically "open source" anyway. Still, please let me know if I need to change something to be in line with the Discord rules.

misty stag
#

it'd be a lot easier to handle installation and everything if this were public on github. Maybe you could move the "frontend" (the mod) to a different repo from the server?

foggy warren
#

Yes I can try. Installation in general is a little contrived right now due to the custom luasteam so I'm exploring how to best streamline it

misty stag
#

discord forums aren't the best place to host mod files because things just get lost easily and you can't pin things by yourself

foggy warren
#

I'm ok with it being a little disorganized for this release. I was just hoping to get a few people trying it so I can stress test the server and identify any glaring bugs while I continue developing it

misty stag
#

yeah fair enough

foggy warren
#

In the future I want it on Thunderstore of course. Just don't think it's in a "public release" state yet. Debug logs, todos, and all still in the lua code

misty stag
#

I mainly just wanna see it on github, as that's easiest to update, and barely anyone on here uses thunderstore as a mod manager because most mods just aren't on there

merry raft
#

I've been working on something like this with DrSpectred, CC, and a few others. We'd love to be part of this :D

misty stag
#

also I think I do know of a way to load the DLLs without needing to move them to the game directory

foggy warren
foggy warren
misty stag
#

though I've only had it working with "added" libs instead of ones that replace ones that are already there. plus I'm not sure it even works on mac/unix-native at all

misty stag
#

I'm also not sure how steam_api is loaded but I'd assume that luasteam loads it, in which case it should be fine for windows/wine

#

also noticed you're distributing json.lua - steamodded already has that included

#

(well that's given one is using latest steamodded, which this doesn't seem to require)

foggy warren
#

I was using 0.9.8(?) during development up until recently started using the alpha 1.0

merry raft
#

I think for a mod like this it would actually be best to move it off steamodded.

foggy warren
#

Yeah steammodded doesn't provide much really besides the logger

merry raft
#

Steamodded is great, but different versions could cause issues, especially when it's a multiplayer mod.

misty stag
#

actually it does give potential for better crash logs if you load your files with steamodded instead of using append patches

merry raft
#

steamodded is often updated though, and causes incompatability with other versions of steamodded.

foggy warren
#

But I do need lovely, which is a dependency of steammodded. So it's not that much extra work to have (deleted previous message because wtf sticker)

misty stag
#

that being crashes show up as from your specific mod file instead of some line number in the thousands of main.lua

misty stag
merry raft
#

Well yes if it's not using anything steamodded api related then, there's no point even making it a dependency??

foggy warren
#

Yeah could probably lose it as a dependency

misty stag
#

non-namespaced module patches maybe aren't that great of an idea though, another mod could easily try to make a "utils" module

#

SMODS.load_file is better for this purpose, but that's about it

#

that functionality wouldn't necessarily require steamodded, though annoyingly you'd have to include nativefs and either find your installation folder or force a specific folder name

merry raft
#

including nativefs is fine

misty stag
#

yeah that one's not a big deal, the other thing is if you ask me

merry raft
#

finding installation folder?

#

that's also really easy

misty stag
#

I should have been more clear, my issue is more that certain mods tend to not do that and just demand the folder be called something specific

#

finding installation can just be stolen from steamodded, actually

merry raft
#
local function findBrainstormDirectory(directory)
    local folders = nfs.getDirectoryItems(directory)
    for _, item in ipairs(folders) do
        local itemPath = directory .. "/" .. item
        if nfs.getInfo(itemPath, "directory") then
            if string.find(string.lower(item), "brainstorm") then
                return itemPath
            end
        end
    end
    return nil
end
#

this is what I do

#

works fine

misty stag
#

getting status code 500 trying to upload a score

merry raft
#

Worked fine for me, maybe the server is down?

foggy warren
#

No logs from the server, looking into it though

#

Doesn't appear that the server went down or generated any errors. Be sure to provide logs here if you can when you see things like that, helps me understand and debug

foggy warren
#

@misty stag I found myself getting 500 as well .. though the score still posted, it may have been from a different call from the API. Have to look into it

foggy warren
#

Today's run is pretty cracked

#

Good luck folks

#

There seems to be a bug where the scores are not updating on the UI after posting under certain conditions. Refreshing the game did the trick however

#

Also something I noticed that will be addressed, you can’t stop your run at the “you win” screen because your score won’t post. You have to see it to the end. This will change in an upcoming release. May do an endless by default type of mode

foggy warren
#

Hey I figured out what was going on with the 500 error @misty stag. That actually wasn't from posting a score, it's returned by the api route which gets your high score. It happens because you don't yet have a high score. This is good to know, will update the error logging to be more descriptive going forward

misty stag
#

alright good to know

foggy warren
#

New release! 081624-0

Changelog:

  • Score will be posted from win screen as well as game over screen
  • Fix bug where restarting using the hotkey could lose the session information
  • Fixes crashes from when Steam is inactive
  • Fixed daily session tabs shifting in height when leaderboard is empty
  • Debug logs are more detailed
  • Performance improvements
foggy warren
#

New build will be coming soon with even better error handling and the use of multithreading to keep http requests contained to the background rather than freezing the game waiting for a response

foggy warren
#

New release! 082124-0

Changelog:

  • Smoother experience due to the use of multithreading for HTTP requests
  • Fixed bug with score not appearing on leaderboard / personal best after posting if multiple runs are done in the same session
  • Improved error handling (Protip: enable debug logging in your Steammodded settings)
#

Today's daily provided me with the funniest build I've ever done. Somehow made it to Ante 10 like this

red ocean
#

The daily today doesn't feel real. Was this seed seriously randomly generated?

foggy warren
#

Oh nice it’s plasma deck. That’s a first actually

#

Oh now I see what you mean lol

#

Oh holy shit

#

Usually I don't like to give away a run but ... I can assure you the seed is randomly generated lol

foggy warren
#

Well played @red ocean I need to run this a few more times I think

red ocean
#

Thanks. I don't want to spoil things for you, but there's some low hanging fruit in the first two antes that will set you up for greatness.

#

And I'm not just talking about the Blueprint and Brainstorm combo.

merry raft
#

decided to go for something a little different. Instead of score I went for the highest HC I could haha.

#

Managed to get to round 31. Ante 11.

foggy warren
#

It’s sad because you could have blueprint + brainstorm + photograph if you could manage to make enough money by then but it isn’t possible with this deck / stake. I’m sure photograph shows up later at some point though. I need to prioritize econ in my next attempt and reroll

foggy warren
#

I take it back

sonic scarab
#

how do i install this

#

it says unable to load daily

foggy warren
merry raft
#

Honestly I had a banging run, I could have easily gotten a massive score if I didn’t decide to go with the OA6 space joker combo haha

#

Super fun seed, lots u can do with it

red ocean
#

I went the Ancient Joker route myself. I quit after the ante 8 BB however, as there are a ton of small optimizations that I felt were left on the table.

#

There's a rather finicky ante 1-2 minigame if you feel like maxing out Faceless Joker, which I managed to optimize after allot of trial and error. However I failed to grab Seed Money and Money Tree early, which hindered how far I could ultimately push the late game Campfire pivot.

foggy warren
#

I tried to push income by getting both seed money and money tree but kept struggling to keep an income even with faceless. Just wasn't seeing a lot of jokers I could build mult with

#

I need to try again and not bother with the vouchers and try to re-roll I think

foggy warren
sonic scarab
#

alr

foggy warren
#

Currently working on displaying historical daily scores on the UI. Hope to have a new release this week

zealous pollen
misty stag
# zealous pollen

check your installation, you probably put the mod in a nested folder

#

also wtf, 1 month outdated steamodded 💀

zealous pollen
#

It doesn't look nested, it's probably the smod

misty stag
zealous pollen
#

ah

misty stag
#

else the lovely files are one layer too deep and lovely won't notice them

zealous pollen
#

red ocean
#

Managed to get this in right before the daily update. 😅 Very similar run to the previous one, with both Faceless and Ancient Joker shenanigans throughout.

foggy warren
#

Been so busy this weekend haven’t put a score up 😪 should have time to run today’s later

red ocean
#

Fun run today for Bloody Hack fans. Although I noticed the seed (T0AAMO4O) isn't actually what we're playing. Is that just something on my end?

foggy warren
foggy warren
#

Gotcha @red ocean

red ocean
#

@Rayss That remains to be seen. Also I know it's not the right seed because I tried plugging it into the soul and got completely different results.

red ocean
foggy warren
#

My run was far from perfect though

foggy warren
red ocean
#

You should check it out. Also the result I got ingame matched the results of the soul rather than the daily run.

foggy warren
#

I tried plugging it manually and you’re right the seed doesn’t line up. That’s bizarre. I may have missed a state variable when applying the seed to the game. Will def work to patch this next build

#

Oh damn it’s replacing 0 with O

red ocean
#

It's all good. I find semi-blind runs to be more exciting in the end, so this made for a nice change of pace.

#

lol, relatable mistake.

foggy warren
#

I don’t understand how but

#

Top is the seed from the daily, bottom is the same thing pasted into the run config manually

#

It's possible the seed gen doesn't do zeroes?

red ocean
#

I think you may be onto something. That seed analysis tool I linked earlier automatically replaces any zeroes I try to enter as well.

foggy warren
#

So I just have to reseed all the future dailies and change my seedgen script to not include zeroes I suppose hahaha

#

The more you know

#

Thanks for pointing this out

#

@clear belfry How about it?

clear belfry
#

I made the tool vanilla compatible

#

So replacing 0s with Os makes sense

#

The game could handle theoretically any string, so if let’s say you wanted to ban The Soul one easy way would be to make 9+ character strings

#

(granted, it’s also not hard to patch The Soul to work with these if you know what you’re doing)

foggy warren
#

It makes sense to have it be compatible with the seed input for the game

clear belfry
#

I think the random_string function is how vanilla Balatro does random seeds; it also has slight biases towards certain letters because the randomness it uses is weird

foggy warren
#

Indeed seems they exclude 0

#

Oops not supposed to share source code, but yeah

red ocean
#

We just have to find Idol and then it's truly over.

foggy warren
#

Aaaaa the polychrome glass well played

#

What's the last joker do again?

red ocean
#

Dusk retriggers all cards played during the final hand.

foggy warren
#

Very nice

#

There may or may not be a spectral pack negative joker coming up you could leverage to take this further

red ocean
foggy warren
red ocean
#

There's still work to do on that front. We have the seals to make it happen though.

foggy warren
#

I believe

red ocean
#

Today we have another seed for team face card. By my count you can expect to see Chadgraph, Dusk, S&B, THREE invisible jokers, and one copy of ectoplasm by ante 12. My run fizzled out before I was able to cash in the last invis, but I suspect it can go much further.

red ocean
#

Complex run today. My goal is to craft the ideal flower pot deck.

#

Ohhh, I might have messed up actually. I could have had 10-A all be red seal polys had I not popped Strength prematurely.

red ocean
#

I think this kills the Chadgraph.

#

Holy shit, nvm. 300mil 4oaK clears it.

red ocean
#

Final deck. Behold its near perfection. Alas, I ended up falling just short of e13 and dying.

foggy warren
#

Deserve to have your existing scores browsable

#

On that note… was really busy this week with work and life and such but I’m nearing a solution for displaying previous daily results. Had to come up with a system of displaying a loading state while http requests fetch in the background and that’s done. Next stop is to allow navigation through the past results

#

If anyone ever abstracts UI development or creates detailed documentation around it I will owe them my firstborn. UI stuff is such a pain

foggy warren
#

Almost there, just need to polish the UI and fix a bug with the seed not updating. Should hopefully have a release tomorrow

foggy warren
#

@here Let me know what you think of the new feature

foggy warren
#

New release! 090324-1

Changelog:

  • Fixed bug where continuing from a saved run could save an invalid deck and seed config
  • Improved performance around posting a score from a continued run
foggy warren
#

I was just imagining northernlion or balatro university trying this mod lol

#

A boy can dream

red ocean
#

I'm grateful for the ability to rerun older seeds. Should free up the schedule a bit.

#

As for suggestions, I think there should be an additional visual indicator for what day is currently selected. The dots that are used in the 'New Run' menu seem like they would work well for this.

foggy warren
#

I made a choice not to use them, thought it ugly. Can consider making a change there

foggy warren
#

Considering setting up a website where you can browse results from all past dailies hmm

#

But I think I’m procrastinating getting the next big feature out. The biggest and baddest feature

#

The ability to make your own sessions to play and share

#

The mod started that way. But it was ugly visually and I wasn’t sure how it fit into the scheme of things

#

But that’s next

#

And after that we have my most personally valuable and procrastinated feature, an installer

#

That’s the roadmap

#

2 things

red ocean
#

Very cool. Do you think there will ever be a feature that allows session creators to either forbid or require the use of mods for their runs?

merry raft
#

No

#

It's very difficult to enforce things like that

#

You could obviously add some text saying, "use this mod" etc. But it's hard to actually enforce it.

foggy warren
#

There are ways to validate that a score is made in the vanilla version of the game. It’s something I wanted to think about if the mod community got bigger and cheating scores was a concern

#

And as for disabling / requiring mods … there’s a way to do everything but it would likely be very involved and maybe not worth the time to figure out

misty stag
foggy warren
# misty stag Ankh:

Yup. Was thinking of requiring that the board / play at the time of the high score be sent with the high score and run with a scorer on the server side to compare and validate that it’s legit

#

You could take that further by using a tool that tells you what’s contained in a seed to know if the configuration itself is legitimate (possible)

misty stag
#

I mean if we're getting immolate embedded into brainstorm, why not

foggy warren
#

Immolate?

merry raft
#

While you can do everything.

merry raft
#

but i would also say

#

intrusive, and takes away from the fun aspect of daily challenges

#

its a hard problem to solve

clear belfry
#

tbh I think just using Ankh's auto-generated mod list as your check is probably fine for the scope of the mod

foggy warren
#

Yesterday's is an interesting one huh

foggy warren
#

Success

#

@clear belfry What happens in an ankh replay when someone’s using modded content? Like if someone saves a replay of a run using modded content and shares that replay with someone on an unmodded (well, relatively) client, what would the client see?

clear belfry
#

the actions wouldn't line up - the replay would probably softlock itself

#

plus there's security info that would be red because it doesn't match

foggy warren
#

I see

#

Been going back and forth about the idea of sending replay data and actually letting clients view replays from the top 5. But it would also create a score vacuum with people emulating the top players so 🤷

#

I have a few fun ideas that would be exploited by bad actors unfortunately

merry raft
#

imo just remove leaderboards in general

#

maybe have them among friend sessions but

foggy warren
#

What would be the appeal without a leaderboard? Unless you mean keep the ranked personal best but don’t display the top 5?

merry raft
#

Instead of having vanilla daily runs, make them custom -- start with random stuff, have different random modifiers etc.

#

it's something I was working on before, I'd be happy to move development over to Sessions.

#

Leaderboards just do not work.

#

Between friends, sure. Maybe we could integrate steam friends or something.

#

Add custom rooms etc, allow people to create a session, and send others the details to join.

#

Can be used for tournaments etc.

#

I love ankh, but I don't think it's a good idea to use it.

#

It's quite a hassle to load and unload different mods etc, a lot of people cannot be bothered.

foggy warren
#

Is there a way we could share custom challenge runs using Sessions?

merry raft
#

Yes

#

Server just sends hash or something to client. Client reads it and applies rules to game.

foggy warren
#

I could see that happening

#

I guess my hesitation is that it’s like an entirely new project. Challenge runs shouldn’t be randomly generated they should be submitted for consideration

#

Is what you’re working on like a “build your own challenge” UI?

merry raft
#

What I actually was working on in the past, before I paused development bc life got busy and I saw sessions was a daily challenge + custom challenge mod.

#

It had working daily challenges from a server, that had custom modifiers.

#

Basically there were 20 or so modifiers. and each day 2 would be selected at random, along with a seed, and a deck.

merry raft
#

later down the line maybe players can create + send their own challenges using sessions, but first just implement the custom daily challenge.

#

The reason I suggest this is that, I agree without a daily leaderboard for regular runs, it will get boring.

#

but I also think that for balatro, leaderboards have a lot of issues. Plus- not everyone wants to play competitively, and I know that they can just play the daily run without caring about their position on the leaderboard -- but then what's the point them playing?

foggy warren
#

I think I'll prioritize making custom sessions a thing and then go from there

#

If I were to embrace a custom challenge run daily as well, I would need it to be user curated challenges. There are lots of challenge mods out there, incorporating them into a daily system would be interesting

#

What I may do is, after I enable user-created (custom) sessions, I will look into a pipeline for submitting user-created sessions to be "featured", and then I can look at enabling challenge sessions with the ability to submit them for feature

merry raft
#

Personally I think it's a much better approach to have different "mini-challenges" that fit together to create the dailies for each day.

foggy warren
#

Custom sessions should be done sooner than later, just finalizing the UI

foggy warren
#

I'd rather play interesting runs with a theme behind them (like what we have for the vanilla challenges) than something random

foggy warren
#

Back from vacation. Let's get some competition going

#

Will find some time to work on custom sessions this week btw. It'll be out once the UI feels better

rose marlin
foggy warren
foggy warren
#

Got a bit sidetracked from the project but do very much want to have custom sessions released before end of year

#

It's like 95% done anyways I just hate working on UI stuff and get distracted from it easily lol

foggy warren
tired sandal
#

you are quick to respond

#

thanks btw

foggy warren
#

Apologies folks I had a power surge which shut off the server overnight. Should be live again in a few

foggy warren
#

Doing some server maintanence, will be back online in a few

#

Back online