#[WIP] Quality of Life Mod (QOL Mod)

268 messages · Page 1 of 1 (latest)

gilded sedge
copper gulch
#

new run key bind

modest copper
#

Arrow keys to navigate, that would be nice :)

spice quiver
#

If you can add an Exit Button on the "Escape Menu" like the "Escape Menu Quit Button" Mod is doing it would be a great addition

sleek oak
#

please add a way to go to main menu from the new run screen

native nebula
#

Also hotkeys 1-9 for selecting cards in hand would be great (and a custom hotkeys menu)

gilded sedge
native nebula
#

Ah, nice

#

I read the description and thought you meant key binds just for the play/discard hand button

gilded sedge
#

bound it to 1,2,3,4,q,w,e,r because it felt nicer in the hands

#

ahh ok my b

flat pawn
#

@gilded sedge yo you are here! I couldn't find you when I tried to search your name with the same syntax as your Github name! @M1lck or @Milck didnt show any results!

#

I've been wondering how to reach you!

#

I wanted to request a keybind for runinfo but i didnt know how to easily get a hold of you and didnt want to put an "issue" request on the github just yet, so I started editing the mod lua myself trying to add it in

#

I think I got most of it right but I keep getting an error with one part

#

let me show you the code I used (most of it was yours, I just looked for the matching stuff for run_info and plugged it in) and the error:

#

I think I got most of it right but there's a little error somewhere here! Please help if you can @gilded sedge ! Once its working I can share the file/code with you (or you can just use what's written in the picture since it's all there haha) too so you can implement this feature into your mod if you'd like! I think a lot of people would appreciate it, it makes playing using mostly KB a LOT easier since you dont have to move the mouse over to "run info" all the time!

flat pawn
#

Oh also I'd like to suggest adding "QOL Mod" to the thread title, as the first time I tried to search for this mod here I couldnt find it when searching for that since its not in the title haha. The title here is different from the github name for the mod, so when I couldn't find it by searching in these threads I thought it wasnt on this discord ahaha

#

It'll make it easier to find if anyone else comes by wanting to add/request/ask something 😄

gilded sedge
#

[WIP] Quality of Life Mod (QOL Mod)

twilit jay
#

do you think functionality could be expanded to the menu, blind selection, store?

i'd happily do the grunt work just looking for some direction or any roadblocks any of you ran into already

getting started now
finishing whenever

presumably the debug mod will help me learn the names of things like
play_cards_from_highlighted

#

i'll even set up a pull req/fork

twilit jay
#

presumably the original bindings had mouse usage in mind but im trying to see if i can axe it entirely 😛

sturdy nest
#

can you add a button in the menu with your current stats like in the win/lose screen?

#

along with checking your deck and other things when you win/lose

twilit jay
#

my plan is to play the game in debug mode and see if i can add everything i need to as it comes up

#

i.e. im more interested in the shop and blinds screen for now

#

but ill probably get to that

sturdy nest
#

having a sort of menu for jokers and consumables could deal with the problem of it being hard to interact with them when they're squished together

twilit jay
#

lol

jagged iron
#

I created a pull request for inverting the selected cards. It was something I found useful, but jury's out on if other people need it :p

#

Ive also looked into binding the F keys into selecting suits

twilit jay
#

only feel like i partially understand inverting but def understand suits

#

just discovered ./balamod -d

jagged iron
#

thats my usecase most of the time anyways

twilit jay
#

makes sense

jagged iron
#

on the PR version I added a check that it only has to select 5 cards, or it wont work.

I disabled that for myself locally, because without it, it just selects the first 5 unselected ones. Thats useful to me, but to someone who doesnt know how the feature works, its just confusing

flat pawn
jagged iron
#

mhm.
the accidental behaviour of selecting first five was also very useful for alot of stuff aswell, but its just confusing if you dont know how it works

#

I find myself often with a flush deck, so its really nice to just select the gold/steel card, press F, press play

twilit jay
#

I feel like using the home row was enough for me. I have a finger resting on every card/key at all times. Inverting is only a chord or two away

#

I should probably fork instead of pr tbh

#

I guess a PR would be fine as long as I change everything back but I'd be weary cobbling my new features onto a layout I don't use myself

jagged iron
#

I mean, my PR didnt alter any behaviour, just added new stuff.
But up to milck on if they want it or not. I have the mod forked with the behaviour I want, and Ill pull changes from upstream so

#

¯_(ツ)_/¯

sturdy nest
#

oh wait

#

can you add the ability to see the next ante in the run info after you defeated the boss

flat pawn
#

sounds cool and useful and I appreciate any shortcuts for games

jagged iron
#

Its not a separate mod

#

Its the PR I made for this one

flat pawn
#

ahhh

jagged iron
#

But slightly modified

flat pawn
#

lem me check it out

jagged iron
#

Basically, what I have locally, doesnt have the check for if only 5 cards are unselected

flat pawn
#

okay I see it

jagged iron
#

so it just selects the 5 first ones

flat pawn
#

OHHHH

jagged iron
#

but the very fact that I have to explain how the behaviour happens, means people who arent modders, are gonna be confused as fuck, when they hit F with a huge hand, and only get a couple selections

flat pawn
#

so you set the if G.hand.config.card_limit - #old <= 5 then to 10?

#

or higher?

#

and it just selects the first 5?

jagged iron
#

No, I just have that changed as if true then :D

#

It doesnt let you select more than 5 cards anyways, so.

#

Its just useful for playing decks where the cards you want tend to be at the start anyways

#

And lets you do some wacky juggling once you get used to it

#

Lets say I have a hand of AKQJJJ864
and I know that I no longer have aces, kings or queens in deck for a full house.

I press F to select AKQJJ
I press Q and 4 to unselect the 2 jacks
Discard

#

People are used to hacking extra functionality into software with stuff like AHK, will think it makes intuitive sense

Anyone who isnt, is going to think its fucking stupid, and pointlessly complex.

#

but yeah, this is what my local version looks like, I just commented out the old if statement, and replaced it with the if true to disable it.

flat pawn
jagged iron
#

if we had actually good mod support with an options API, it could just be a toggle tbh

flat pawn
#

like so:
## remove the hashtags in the line under if you want the mod to not limit you to choosing 5 cards. The first 5 cards chosen (even if you choose more than 5) will always be discarded, while the rest will be unaffected
## if true then

jagged iron
#

Eh, Id rather keep the PR clean, and figure it out proper once everything matures

flat pawn
#

things like that will come along

jagged iron
#

besides, its @gilded sedge's property :p

flat pawn
#

but the game just released 1.0 like 2 weeks ago

#

haha

flat pawn
jagged iron
flat pawn
#

I also added a feature to it haha

jagged iron
flat pawn
#

the run info was my legwork, but I used @gilded sedge s code as reference as well as the game files ofc. I messed up 1 WORD LOL

#

but @gilded sedge helped me fix that and then added it to the mod officially 😄

flat pawn
#

but if you wanna keep it cleaner I get that too 🙂

jagged iron
#

Yeah, stuff Id like to see are in general more selection hotkeys (I was thinking of F keys for suits) and maybe holding ctrl bringing up the deck preview thing (the screen you get when you hover over the deck, but dont click it)

flat pawn
#

I wanted a hotkey for that too!

#

I might try to add the deck preview later on

#

But I have a couple other things I'm working on atm too

jagged iron
#

If I get to be picky, I specifically want a hold key for it :p

#

I want to let go and the screen to disappear

#

Me installing the mod begun with me trying to alleviate carpal tunnel, so if we push that logic to the extreme, we make a feature that just detects the 5 highest scoring plays, and binds those to hotkeys...

I think that belongs into a different mod tho lmao

sturdy nest
#

as a heavy resetter double tap R would be heavenly

flat pawn
#

that one incorrect word last time causing a crash pissed me off LMAO

sturdy nest
#

if only i could code half of this stuff lmfao

flat pawn
#

I gotta see it thru this time mayne

flat pawn
sturdy nest
#

i only experiment with save edits

flat pawn
#

I just know like basic linux stuff, computer building, modding game consoles

#

like I know tech

#

and I know how to find out

#

how to do something basically like more other tech savvy ppl

#

I only messed with code mainly in mods 2-3 times in my life

#

and I was able to add a function to this mod

sturdy nest
#

rn im just messing around with the raw save file from @digital osprey save edit

flat pawn
#

referencing milcks code and the games code

sturdy nest
#

yea

flat pawn
#

OH is there open source code for that?

sturdy nest
#

it's complete gibberish when i open the .jkr file in notepad

flat pawn
#

Someone was asking about that yesterday

#

is it on github or sumn?

sturdy nest
#

so i use the website

flat pawn
#

same with 7z

#

it must be some weird format or like 3 files combined into 1

#

that the game knows how to read and modify

sturdy nest
#

it actually wasn't gibberish before in the demos

flat pawn
#

@digital osprey is ur code available to look through?

digital osprey
flat pawn
#

YESSS! I recommended ur site to someone

sturdy nest
#

@digital osprey you know the reason for the gibberish? it wasn't like this before

flat pawn
#

but they were like "I dont trust save editors online, with all the stuff on there these days u never know

#

and I was like bro 1 its a save and 2) the source code should be available on a github somewhere for a site like this

#

and save editors like these are SUPER common

#

esp for games like this or hollow knight

sturdy nest
#

and it wasn't like this in the demos

flat pawn
#

its very rare you'll see a malicous save file editor online, esp one recommended by the community. sure for love it can kinda execute code I learned, but the chances of someone trying to attack that way are pretty slim

digital osprey
#

The save.jkr is the same format as in the demos

flat pawn
#

as theyd be found out almost instantly

digital osprey
#

It's a compressed file

sturdy nest
flat pawn
#

or container?

sturdy nest
#

so do i just open the uncompressed version?

flat pawn
#

I tried using 7z, couldnt open it

sturdy nest
#

luckily i remembered a bit of manual save editing in the sept demo lmao

flat pawn
#

at least for the settings.jkr which should be the same format

sturdy nest
#

oh yea i wanted suggest something

#

can you add a seed option?

digital osprey
sturdy nest
#

also for the decks

#

i noticed that the decks change between profiles

flat pawn
#

nice, big thanks

sturdy nest
#

it was anaglyph in my first, and erratic in my 2nd

digital osprey
#

Oh yeah the save editor should be able to open any .jkr file

sturdy nest
#

i tried settings.jkr and i don't think it went so well

#

ill try again

digital osprey
sturdy nest
#

wait does the meta.jkr just contain every unlocked item?

#

and whether you have it unlocked

#

@digital osprey i never quite understood the specifics of the pseudorandom numbers, like i knew its purpose, but idk how to particularly manipulate in my favor

digital osprey
#

Yeah I don't know much about pseudorandom numbers, but from what I know, its not that easy to manipulate it. Probably the easiest way to do so is find a seed that has good RNG for x and then replace your seeds number for x withj the one from that seed

native nebula
#

If you clear G.GAME.pseudorandom and then set the seed that would probably do the job

#

I think the game would automatically regenerate it for the seed you change it to

digital osprey
#

oh thats good to know

#

Right now theres some other stuff I want to do first

#

then I want to make a proper release

sturdy nest
#

@digital osprey i just realized the "rates" is most likely just a multiplier of the actual rate

#

took me way too long

digital osprey
#

Yeah looks like something like that

flat pawn
#

Like the seed has the predetermined preudorandom numbers all written already

#

So you should be able to change that if you wanted to

#

Either from memory

#

Or from the save editor or seed searcher

sturdy nest
#

i can change from the save editor, and from what i've heard i can essentially frankenstein seeds together

sturdy nest
#

idk why, but maybe next to the # of jokers/consumables you could have a (+x) symbolizing the negatives to make it easier to distinguish

rare saddle
#

@flat pawn
Maybe it's the wrong place to ask, but since you are here, do you know if Steammoded is available for macOS? looking at the github, the legacy mac support doesn't appear to work on my machine HR_Shiro_Want

flat pawn
flat pawn
calm lagoon
#

This is sick, thanks for this!

unique saddle
autumn bridge
#

you're way ahead of me

unique saddle
#

I mean, the system is mostly in place, but I still have to test it and iron out some bugs/unintended features. It's reminiscent of Vim, but gets the job done - you can play most of the run with a keyboard with my mod.

unique saddle
#

The closest I can get so far is with this logic:

  1. Store a boolean inside the mod to track whether the player has already tried to cash out
  2. On hitting a key to cash out on round evaluation screen, postpone a function execution with E_MANAGER to make sure all of the calculations are done beforehand and use the stored boolean to prevent multiple calls
  3. If successfully cashed out with a delayed function, restore the boolean to allow the next cash out

The problem is much more manageable this way, but you still can both click the button and hit the keybind and get two rewards instead of one... Unfortunately, there is a 0.3 second window in G.FUNCS.cash_out function when it is already executing but the state remains G.STATES.ROUND_EVAL. The only true remedy would be to find the cash out button, but it is not attached to the main container...

main dune
unique saddle
# main dune this looks awesome! qq, i'm vaguely thinking of helping out with making a UI ele...

Thank you for the input - would love to see it! As of the screenshots, I just used a keyboard key pack from https://dreammix.itch.io/keyboard-keys-for-ui (forgot to credit them in the repo - need to fix that), edited the F keys into numbered keys, and manually placed them in Krita.

itch.io

Pixelart keyboard keys for UI. All basic keyboard keys, symbols, & modifiers.

autumn bridge
#

I don't wanna go as far as to simulate the button press "physically" (as if the mouse went to that position on screen and clicked it).. should be some way to call the button press. That way we don't even have to pass context variables to the G.FUNCS we invoke the game just handles it

unique saddle
autumn bridge
#

Right but I want to call the button instead of the function associated with it

unique saddle
#

Huh... If that's the case, you should be (and you probably are) digging into controller.lua since it handles mouse clicks and, subsequently, button presses

autumn bridge
#

Well, not the physical buttons

#

The UI buttons

#

So rather than calling G.FUNCS.select_blind() I want to see if I can invoke a trigger of select_blind_button

#

That way I'm essentially mimicing the user pressing those buttons and leaving everything else in the games hands rather than initiating contexts and passing them into G.FUNCS and potentially having to write more logic to fix any holes in my code

unique saddle
#

Sorry for that then - got a bit carried away (however, I've seen a few button_* functions that acrually invoke some stuff). Still, one of the important files here is UI_definitions.lua that defines a lot of UI elements. Even though there are omissions - elements defined where they are used - it gets the general idea of what elements are made of. As far as I understand, button definitions have two fields - 'func' and 'button' - used to check if button can be pressed and what function within G.FUNCS should be executed on click (many of the G.FUNCS functions deliberately make that field nil to avoid repeated execution).

autumn bridge
#

Thanks, I'll keep digging around there for something that works

#

I'm glad to see you managed to add UI stuff, I had the same idea, have some proof of comcept screenshots on my issues on the repo, might reference your UI stuff when the time comes

#

Front end is my weakness! I'm an embedded guy

unique saddle
# autumn bridge Front end is my weakness! I'm an embedded guy

So far, I believe that UI framework inside the engine is well thought-out - whenever I can see the root element and make the print_topology() call for debugging, what follows is a clear hierarchy of row containers, column containers, objects, buttons and texts. As long as you can navigate that structure, it becomes easier to look for stuff. See implementation for get_UIE_by_ID() and print_topology() functions to learn more about it.

autumn bridge
#

What's your debugging setup? Is there a guide somewhere? I have never used Lua before 🤣

#

I would learn a ton from debugging, I'm just winging it rn, symlink to my mod in the mods folder and repo, and just launch the game

unique saddle
main dune
#

i'm not even using print statements right now because my python wasn't built with tcl/tk sobglasses

unique saddle
main dune
unique saddle
#

Oh, thanks, I should check that out

#

For now, I was just launching the game through the terminal and seeing the output there, a dedicated console should be much more useful

main dune
#

helpful UI-related pieces of the source code that i referenced, for your grepping/searching pleasure

  • self.UIT = { - enum for the UI element types (e.g. wherever you see G.UIT.R for rows, G.UIT.C for columns, etc)
  • function UIBox_dyn_container - where the dynamic container fn is defined and probably the recommended way to create UI elements (wrap in UIBox). seems to work like css flexbox, if you're familiar with that

these bits are useful for making the keybind reference box, which behaves similar to the built-in debug toolbox

  • function create_UIBox_debug_tools() - debug toolbox definition
  • G.debug_tools = UIBox{ - where the debug toolbox is displayed
  • function Controller:key_release_update(key, dt) - where the debug toolbox is disabled (it's hold-based rather than a toggle)

for a real settings box, you'll probably want to futz with G.OVERLAY_MENU instead of creating a naked UIBox

  • G.FUNCS.overlay_menu = function(args) - where the overlay menu is defined and some helpful docstrings
  • G.FUNCS.options = function(e) - callback function used for displaying the options menu
  • G.FUNCS:options() - where the callback function is invoked
unique saddle
unique saddle
#

Okay, so I've been playing around with this tooltip a bit, and I think this is close to what I've imagined it to be. It still needs some polish though - could use background color for better reading and outputting more card info than just a bare name

unique saddle
#

Alright, I've spent too much time making it look pretty. Should've gone to bed, but at least it looks nice...

autumn bridge
#

Nice!

unique saddle
#

Okay, I'm ready to leave it for now - tootip responds to text size changes and items have a bit of a shake when changing values (hope it's not too jarring)

unique saddle
#

Okay, there is an ordering issue if you keep the tooltip between state changes...

unique saddle
main dune
#

wow, that's looking pretty slick!!!

main dune
#

im working on a hotkey for invoking debug mode 👀 it's super simple but oh my god the race conditions for trying to gracefully display and remove a popup box about debug mode...

#

oh and by debug mode in this case i was referring to invoking debug.debug() which is part of lua's stdlib, freezes the game and gives you an interactive session in the attached console. (not the in-game debug feature)

unique saddle
#

Got some progress towards pushing UI buttons: now I have a small UI element showing current selection, and it allows for "clicking" on buttons. Really clunky so far, will need to think about ways to make this easier to use

digital osprey
#

Can you reuse the controller ui stuff for this?

#

Oh also since I'm here, someone suggested I implement a search bar for the collection for my mod. I'm definitely not doing that, but if you wanted to, it might be a nice qol feature

unique saddle
# digital osprey Oh also since I'm here, someone suggested I implement a search bar for the colle...

Thanks for tuning in! This thread was originally for the @gilded sedge's mod - right now I'm extending the base that was there and focusing on being able to play with just the keyboard alone. When I'm done with the "Keyboard Voucher" (still dunno if the name's good), maybe I'll move on to other things, so thanks for the suggestion! Having a search+filter functionality for the collection does sound nice indeed but is out of scope for me at the moment...

unique saddle
#

Ah... I see now. I never went to check out how the game plays on a gamepad/Steam Deck fool . Alright, I'll need to look into that later, I guess...

digital osprey
main dune
#

holy moly i didn't know about the controller ui at all!! nice catch

mossy portal
unique saddle
unique saddle
#

Meanwhile I have some slow progress towards adapting gamepad stuff to work with a keyboard. So far I can change selection across the screen and inject a keyboard hint to a place where they should be on card buttons, but there are still ways to go before I can make a test version - a bunch of stuff in the mod must be rewritten to accomodate for using that...

unique saddle
#

Working on a settings screen today - got a mockup of sorts with how things should more or less look like in the finished state. Now I need to write some actual logic to make it work...

fringe sorrel
#

Is it possible to have an option that changes the pool of tarot cards? For example, I really like themed jokers but don't want to get ace tarots

potent light
#

any way to instead make it a left arrow / right arrow select? i have runs where i have thousands of cards/jokers so having to hit (=) like 10 times for each card that i want to select is getting repetitive when instead i could be selecting the joker category, then just holding right arrow and it progressively gets faster and faster (in this case i would also like for it to reselect the nearest card after i do an action with it, per se selling, so i wouldnt have to go all the way back to it)

or maybe use the modifier keys to skip cards, like for example shift goes through 2 cards at a time, alt does 5, and control does 10, and if you combine them they do their respective multiplied value.

unique saddle
# potent light any way to instead make it a left arrow / right arrow select? i have runs where ...

Oh, hey! Thank you for using the mod! It's been quite a while since I did any work for it, though 😦
I've been working on an update to bring in menu navigation (aka using arrows to move around as you would with a controller) but as far as I remember it's still buggy enough to avoid publishing it, unfortunately 🙁
When making the original version, I was tuning the system to the base game (where 30-40 cards in one area is something most runs never reach), so I'd agree that it might become tedious as the pile grows well beyond this estimate. I'll try to get back to it and see if I can drive it towards some sort of a release (and make a page of my own at that point).

potent light
#

nice!

willow schooner
#

@gilded sedge @unique saddle sorry are you still alive?

unique saddle
#

Basically, back when I was actively making my branch of the mod, I had a few features that seemed neat at the time:

  1. In-game rebinding (there were screens of UI in this channel, never got around to the logic itself)
  2. Repurposing some of the gamepad code for arrow keys movement around UI elements (have it mostly working, needs some tinkering with the input fields in particular)
  3. An ability to remap bindings passed down into the later game call, so that mods that don't support me and implement keyboard stuff could be remapped at least indirectly (as long as they are lower in the mod order)
  4. Some form of the API to simplify shortcut creation and allow for community addons with more actions
  5. Alternative ways to select cards for mod-heavy setups, i.e., say, making it so holding [Alt] makes you select cards in reverse last-to-first card order and holding [Ctrl] to allow inputing the card number to select (as in [hold Ctrl]+[1]+[6]+[5] to select the 165th card)

@willow schooner are you by any chance aware of any mods that currently already do that/smth similar and if that is even good in the first place?

willow schooner
#

i dont mind the mod being "irrelevant" or "useless"
im making a guide/list about all the QoL mods

#

It doesn't matter if it's outdated, if it needs something else, if it's not supported, if it doesn't exist, etc.

willow schooner
#

i will search other mods with similar features, if you want to check the concurrent list: #1407865124454273054

#

true I almost forgot: The reason I'm talking to you is because I hope you can explain to me what the mod is about because I don't know where the documentation is.
"well try the mod"
unfortunatly, my pc is broke right now, and i dont know anyone that play with this xd

#

the most popular QoL mod right now is Handy

unique saddle
willow schooner
unique saddle
unique saddle
# willow schooner true I almost forgot: The reason I'm talking to you is because I hope you can ex...

Hmmm... Which one are you referring to: the original one of this thread (https://github.com/Mi1cK/Milcks-QOL) or my offshoot (https://github.com/maaxxaam/Keyboard-Voucher) that didn't get a thread of its own?

GitHub

Small collection of mods to add quality of life improvements - Mi1cK/Milcks-QOL

GitHub

Adding redeeming qualities to Balatro's keyboard bindings - maaxxaam/Keyboard-Voucher

#

But in short, mi1ck's mod was a small addon to allow for some card selection, card sorting, discarding and playing hands.

From their repo:
Bind 1,2,3,4,q,w,e,r,5,t to the first 10 cards in your hand.

willow schooner
#

oh is literal a old typist?

unique saddle
#

I then forked their repo and layered a lot more bindings on top, similar in a way to the Typist mod.

Mod features as described in my repo:

Selecting cards

Use [1] - [0] to select cards 1 through 10. To go above 10, use the +10 modifier [=]. For the playing cards hitting an already selected card removes selection; other card types can be only selected one at a time.

Selecting not-a-hand

In order to select Jokers, consumables (Specrtals / Tarots / Planets) and other slots, use modifiers that change your selection category:

[ J ] to select Jokers
[ C ] to select cards in a consumable area
[ V ] to select Vouchers in the shop
[ B ] to select Booster packs and their cards

For anything else (your playing hand and main shop slots) do not specify the category. As a shortcut, you can double the category key to select the first item in the category (for example, [ V ] + [ V ] to select the first Voucher)

Card actions

Once you've selected the card, you might consider doing something with it. Right now the following actions are supported:

[ W ] to buy the card from shop / redeem a Voucher / open a Booster pack
[ S ] to sell the card in your possession
[ U ] to use / buy and use consumable
[ , ] / [ . ] to move your card left/right in the hand order
[ H ] to display card information (usually available when you hover over it)

Other actions

[ Enter ] to play hand / exit shop / start a blind
[ Space ] to discard hand / skip a blind / skip a Booster pack
[ R ] to reroll the shop / the boss blind
[ A ] to open the Run Info window
[ D ] to open the Deck Info window
Hold [ Left Shift ] to peek at your deck information
[ Z ] / [ X ] to sort your hand by rank / suit

unique saddle
willow schooner
unique saddle
willow schooner
#

what would you use for description?

unique saddle
#

I dunno, "Keyboard shortcut support"? Sounds a bit generic but drives a point across

dim geode
#

Got this error when skipping a blind to get a free enhanced joker, any idea?