#Balatro Neuro-sama Integration

1 messages · Page 2 of 1

somber smelt
#

yeah

#

minor changes to 3 lines

vapid cloak
#

I spent like an hour messing with the draw card hook cause I though the issue was there lol

somber smelt
#

same i was losing it

vapid cloak
#

Before we finish this, we might need to change the execution results where we return card name to the cards description as I don't think neuro will remember the card's description from the state because the action window is ephemeral.

somber smelt
#

good shout

#

hmm

#

im wondering how much we should be making ephemeral in the first place

vapid cloak
#

I think shop and use hand need to be ephemeral as we send so much in them. we might be able to get away with boosters though.

vapid cloak
peak light
#

do you guys plan on making a "manual" for Balatro to Neuro? (unless this was already made and I forgot about it)

peak light
#

alternatively you can send context before the force

vapid cloak
# peak light do you guys plan on making a "manual" for Balatro to Neuro? (unless this was alr...

No I personally haven't seen this until now, the main goal for me right now is to get this in a state to where its not too buggy and is playable by Neuro without much extra help given by the integration as from there adding more information depending on how well she actually understands the game while playing will probably be easier than just assuming right now. I have had an idea similar to a manual, however the main issues would be her knowing when to use it and actually using that information. Plus there is also the issue with it filling her context window then causing issues with her remembering recent game events and the game rules we send her on startup thus negatively impacting game play more than helping (That could probably be solved by just sending game rules more often). I think it would be something fun to experiment with as toggle-able option in the future though, if implemented correctly it would probably work quite well. A good implementation would benefit heavily from what KTANE uses though so we can only hope neuroPray .

somber smelt
#

this also made me realize the voucher magic trick does not work at all

#

since were completely ignoring playing cards in shops

#

and only looking for jokers consumeables

vapid cloak
somber smelt
#

im not sure what else needs to be done

viral blaze
#

if a joker or playing card has an edition in shop does it say?

vapid cloak
#

playing cards will. jokers probably wont though

somber smelt
#

it says what polychrome does but it doesnt say stencil is whats polychrome

#

also it still says the stencil cost is 8

#

this was just triggered by a polychrome tag

viral blaze
#

then maybe the tag that makes shop free has that issue too?

somber smelt
#

youre correct

#

so the cost is incorrect when overwritten by a tag and the joker modifiers arent being displayed at all

viral blaze
#

and does it say the actual cost of a reroll when using the reroll tag/free reroll joker

somber smelt
#

yes

somber smelt
vapid cloak
somber smelt
#

also realized that the clearance sale voucher also wouldnt display properly either but that fixes that as well

#

i love srs randomly coming in and just being like "hey did you guys think of this interaction" and it turns out we had not

viral blaze
#

I had been thinking of it for a while lol, just forgot to say it

#

I'll come back if there's more interaction you may have missed

somber smelt
#

speaking of tags i did specifically test tags that open a booster pack and those work just fine

vapid cloak
somber smelt
#

lmaoooooo

vapid cloak
#

I love UI

viral blaze
#

thats why i havent messed with UI

somber smelt
#

UI isnt actually that bad if youre trying to create new UI stuff

#

the issue is just when were trying to manually find ui stuff

#

it was not designed for this

#

looks good, gime a sec to make a few minor context adjustments like changing the select deck success message to say something else instead of the game has started when we still need to prompt her for the stake

#

also by default i want to disable every other stake in the config except for white

vapid cloak
#

Yeah I don't think there is a way to get all of the unlocked stakes in the game as unlocked is used for the currently selected one for some reason.

somber smelt
#

but since neuro definitely wont be playing a higher stake anytime soon i think its fine to not priortize that for a bit

#

i want to release this soon

#

oh we need to print these in order

vapid cloak
somber smelt
#

ok added some minor context changes and a little note for stakes

vapid cloak
somber smelt
#

you can do it

#

tbh im scared of messing with how we get the descriptions for everything

#

i get how the system works but its a lot so ima just leave it to you

vapid cloak
#

yeah it's a bit of a mess right now.

somber smelt
#

at some point we can go back and clean it up but for now if it works it works

vapid cloak
somber smelt
#

the joker modifiers are always getting sent even when the jokers themselves arent getting sent

#

oh wait i see what it is

#

the send joker descriptions are getting sent in the description for the interact with joker action, but the joker editions are only sent in the state for the action force

#

should prob move joker descriptions into the state message

#

honestly this stuff is all over the place because at the start of a blind we send the jokers but without the editions

#

i propose just moving the joker descriptions into the regular state messages with what the editions do and then just removing the jokers entirely from the description of interact with joker, and then we could also remove the silent context messages sent when we enter a blind

#

so itd be like how we handle playing cards

#

also the counting is broken but thats an easy enough fix

#

ill hold off on making any changes cus i wanna hear what you think abt when we send joker context

vapid cloak
#

Also looking at this again, what is your opinion on also moving the current consumables into state.

somber smelt
#

thats fine

#

keeps everything consistent

vapid cloak
#

I also moved the context for the amount of hands, discards, cards available to be drawn and cards in deck into the action window as they should be ephemeral.

somber smelt
#

or whats in the shop

#

not sure if this is a bug that already existed and we just didnt catch until now or if its new

#

oh its old

somber smelt
#

thats the only issue i was able to find

#

gimme a sec let me make some minor context changes

#

also idt we need to bother sending the new joker positions since we describe them again right after

#

so ill just remove that

#

ok merged!

#

i also just did a minor pr fixing a few unrelated typos that i just realized andmerged that

#

but uhhh idk what else needs to be done now

vapid cloak
#

Apart from that, I don't know anything else that needs to be fixed or added.

somber smelt
#

there is another issue with neuatro i noticed, gleeb cards have an effect of counting for 10x their base chips but theres no context explaining that since its not a card modifier but instead a property of the suit itself

#

we'd probably just have to make a manual check for that

#

either that or tell the neuratro guys to remove the glorp deck and the two jokers that interact with it in their version specifically made for neuro

vapid cloak
#

Yeah I think just asking them to remove it might be easier as I'd rather not include manual checks for modded suits and stuff similar to that.

somber smelt
#

yeah

somber smelt
#

@reef skiff i think we're done! any changes from now on should only be bug fixes and context changes if needed. the guys over in the neuratro thread will have to make a custom build of their mod for neuro to remove some of the custom content that can cause issues, but this does work just fine with the art only version as well

reef skiff
#

sweet! i'll test it out later vedalYes

somber smelt
#

if i missed some crazy obvious bug im gonna lose it

median copper
#

Exited for this

north viper
#

Good job everyone!

somber smelt
#

huge shoutout to panda for basically doing everything lmao

north viper
#

On the Neuratro side we'll have something soon. I know 1srs was think on this already.. ('twins build') so expect something soon!

#

lol indeed so I saw.. I'm surprise they didn't get direct repo perms lol

somber smelt
#

they do

north viper
#

Oh good good! I've only been watching from afar..

#

I will also test it this weekend and see if I can find anything! Again thank you so much for working the intergration (and in good pace too!)

viral blaze
#

btw @somber smelt , did you add wether a joker is compatible with blueprint to the context messages?

somber smelt
#

lets find out

north viper
#

hah

somber smelt
#

nope!

#

one sec

#

the easiest way to do this would be tell neuro the status of the compatible text here when describing what blueprint does

#

ill prob also add a message if its incompatible telling her to move it if its currently incompatible

viral blaze
#

you could also tell her which of her jokers is compatible with blueprint instead of just telling her if the current targeted one is

somber smelt
#

hm

north viper
#

I think that could be helpful. Even when being care things always slip by. Would that be too much context?

somber smelt
#

ok if she has a blueprint ill tell her whats compatible with it

#

if she doesnt then wont bother

viral blaze
#

sounds good

somber smelt
#

oh brainstorm exists as well

somber smelt
#

discovered a bug with some modded cards where instead of the actual joker name we display the key instead

#

aaaaaaaaaaaa the {C:dark_edition} is there now

vapid cloak
#

fixed joker names idk why that is showing now though

#

We might need to ask neuroatro to remove that from the loc_txt of the joker as I'm not 100% how to fix that

viral blaze
#

i could do that

vapid cloak
#

wait nevermind I think I found a solution

somber smelt
#

also i think study-sama is the only joker with a special effects on the name

vapid cloak
somber smelt
#

wtf

#

LMAO

#

thats crazy

somber smelt
#

the cursed as hell code we have to write for this

vapid cloak
#

I love localization neuroDespair

somber smelt
#

no matter how cursed it gets itll never be worse than G.OVERLAY_MENU.definition.nodes[1].nodes[1].nodes[1].nodes[1].nodes[1].nodes[1].nodes[2].nodes[1].nodes[1].nodes[1].nodes[1].config.button_UIE:click()

vapid cloak
#

In a world of nodes[1] no-one wants to be a nodes[2]

viral blaze
#

what is that even for lmao

vapid cloak
#

it's for pressing the new round button on the main menu

somber smelt
spare niche
somber smelt
#

the new run button

#

thats how we click it

#

the hierarchy for tabs is actually so cursed

peak light
somber smelt
#

some buttons are actually really easy to click cus you can just search for the id

#

other buttons do not have an set id you can search for

#

and the id just ends up being based on when they loaded in or something like that so thats when we have to be cursed

somber smelt
peak light
#

lol

somber smelt
#

to nil selected cards

#

oh this is an easy fix

somber smelt
#

..it should be an easy fix

#

oh the vars are nested thats why

#

ok it is an easy fix

#

the only card from neuratro that had this issue was rhythm which is why it was never discovered

#

cus other cards like twins have their text hard coded

#

@vapid cloak theres an idea i want to run by you. currently we describe modifiers to neuro when they appear on a card. this means for consumables that add modifiers, neuro has no idea what they do until she uses it. we could find a way too look into the info_queue or something to fix this, but what if we instead describe all modifiers to her at the start of the game (or at the start of a run to keep it fresh) and tell her "please remember this and keep it in your context window" since neuro actually chooses what to remember (https://github.com/VedalAI/neuro-game-sdk/issues/7#issuecomment-2536405147). this way, we can clean up context a bit more while still letting her know what everything does

#

could also make an action called describe modifiers or something as well that just re-sends the message

vapid cloak
# somber smelt could also make an action called describe modifiers or something as well that ju...

If we were to do this, I would prefer this as I doubt her ability to get information from that long ago (even if we send it at the start of every run assuming it's a long run) is that good. However, an issue with this is we can't really say how much she would use an action to query information so it could cause even more issues than the current method. I think maybe just sending at the start of every run and also in the state might be best for now as I don't really trust her to keep such important information for so long.

somber smelt
#

hmm

#

if its an issue with frequency then how about the start of every ante?

viral blaze
#

you could tell her at the start of each run and maybe remind each one or two antes or when she finds a way to apply the enhancement

vapid cloak
somber smelt
#

honestly i think shed be fine with sending it just at the start of every run

#

every run, make an action that describes everything and then just tell her "if you don't know what a listed modifier does, run the action"

#

as long as its in her context window somewhere then were good and for a longer run then it might be an issue, but if its once an ante or once every other ante even i dont think its long enough for her to forget

vapid cloak
#

I think doing every ante then allow changing the amount of antes in the config is probably best and the action.

somber smelt
#

that works

#

also unrelated but i just found a new crash found with neuratro, the noriko joker just crashes the game when we try to localize it

viral blaze
#

hm?

somber smelt
#

its an issue on our end

#

as for what the issue is i have no idea

viral blaze
#

I think i might know

somber smelt
#

literally every other joker works

viral blaze
#

for noriko I used two lists for its description, so maybe thats causing an issue

#

try making it all a single one, maybe that fixes it

somber smelt
#

tried that already

viral blaze
#

oh

#

well nvm then, have no clue why

somber smelt
#

nvm i may have not have actually saved the file

#

yeah making it one table woprked

#

i couldve sworn i saved it

#

the way we do jokers is different from everything else so idk how to actually fix this in a general case

#

so if you released a twin ver with it being one table thatd be great lmao

viral blaze
#

I'll keep it in mind

vapid cloak
#

getting all modifiers working, gonna try to get the rest done tomorrow.

vapid cloak
somber smelt
#

lmao i gotchu

somber smelt
vapid cloak
somber smelt
#

thats everything just wanted you to take a look before i merge

vapid cloak
#

maybe we change get_all_modifier_desc to be playing cards instead of card as I think we use that in other places and it's a bit clearer. But apart from that it looks good to me.

somber smelt
#

changed and merged

somber smelt
#

mhm -nil hand size

#

fixed that and merged it

somber smelt
#

im gonna get to work fixing these real quick

somber smelt
#

we never even told her what edition a consumable was so thats an easy fix

#

hows that

#

definitely not a hacky solution hard coding it nope i would never do that

north viper
#

nope nope never.. I guess we'll find out soon™

somber smelt
#

i hate this game sometimes for spelling it G.consumeable instead of G.consumable

viral blaze
#

theres a lot more of typos in the game om

somber smelt
#

i know

#

theya lways mess me up

viral blaze
#

btw it says currnently

somber smelt
#

df[o0i89hgdfxhgiuhdfg

viral blaze
somber smelt
#

oh wtf the game crashed

#

when i tried adding jokers

viral blaze
#

the typo was too much for it to handle

somber smelt
#

i didnt even change joker logic...

viral blaze
#

maybe a one time thing from smods

somber smelt
#

its noriko...

north viper
#

What has she done now? tisk tisk

viral blaze
#

huh, how is noriko crashing when adding a joker?

#

is it the two tables thing again?

somber smelt
#

yeah i downloaded the newest ver you sent to vani its still technically two tables

viral blaze
#

oh

#

well I'm sorry about that lol

north viper
#

Oh.. this bug.

somber smelt
#

tbh there should be a way to fix that on our side... i just dont know how

north viper
#

What causes the error when two tables of desc are presented?

somber smelt
#

the crash happens when we call localize

north viper
#

A built in function? hmm. pain for sure. As long as only one card has it can be fixed in the mod.. so at least there is that.

somber smelt
#

yeah thats why im so confused cus like... the game clearly calls localize just fine since the text displays

#

so whats wrong with the way we call it

north viper
#

Does the error/debug messages say anything useful? (If this wasn't a mysterious bug in a built in func I would have suggested looking for any instance of a multi-table desc and concat to bypass..)

somber smelt
vapid cloak
#

it's cause we don't send AUT.info inside localise so it crashes when trying to access it as it is nil. Adding it to localise seems to fix the crash and send the text.

somber smelt
#

oh ability_UIBox_table

vapid cloak
somber smelt
#

oh wow that was an easy as hell fix

#

thanks

#

even works with it being split up like this

vapid cloak
#

also that should probably be added to the other localise functions just incase there is a loc_txt with multiple tables.

somber smelt
#

just testing to make sure adding it to everything doesnt break anything

north viper
#

yay!

#

Simples fixes are a godsend

somber smelt
#

if it looks good to you then ill merge

vapid cloak
somber smelt
#

yeah

#

if you had max consumables it wouldnt let you use one in the pack

#

but the planet packs are always used immediately

vapid cloak
#

Also noriko still crashes for me when sending context as card.ability_UIBox_table is nil

somber smelt
#

wha

vapid cloak
#

using card:generate_UIBox_ability_table() fixed it for that card. I haven't tested it with a bunch of other jokers though

somber smelt
#

whered the crash happen

#

like what game state

vapid cloak
#

when discarding a hand

#

I think the issue is the table was never made as I didn't hover over the card or doing anything else that creates it. Idk if that same effect could be triggered while neuro plays though as I spawned it in using debug

somber smelt
#

OH

#

that checks out

#

good catch

north viper
#

FYI (Vani)

vapid cloak
# north viper

Only one week until Neuro manages to softlock herself in 5 minutes neuroHypers

spare niche
#

That means we got time more to update it

#

A deadline is good

#

Lets give it all

north viper
somber smelt
#

@vapid cloak is it fine now?

vapid cloak
somber smelt
#

ok merging it then

vapid cloak
#

Just wanted to float around the idea of resending the vouchers she currently has and their description at the same time we send the modifiers desc (or maybe less often as its less important) as I would not be surprised if she forgets vouchers she gets earlier in a run with how its currently implemented.

somber smelt
#

shes guaranteed to forget vouchers (unless action results arent ephemeral)

#

which is why im so tempted to make everything not ephemeral

vapid cloak
#

I don't think action results are ephemeral at least the API docs dont say they are. That's why I suggested we send it in them.

somber smelt
#

oh ur right

#

thats fine by me

#

honestly id just send them alongside the modifiers, it makes easy enough to keep everything together

vapid cloak
peak light
somber smelt
vapid cloak
#

there is also a trailing space at the end of the context but that doesn't matter that much

somber smelt
#

for whatever reason i didnt think i could have it in hook game btu youre right i can oops

#

fixed that and megred

vapid cloak
peak light
#

wait since when was vedal joined in this thread

somber smelt
#

since trhe dev stream when it first got mentioned

#

7/7

peak light
#

oh

#

i'm very inattentive neuroLookUp

somber smelt
#

the required field seems to always be empty

vapid cloak
#

It's so empty schemas will also send required as an empty array as that wasn't happening before, the required field being empty was because I changed something and forgot to double check it worked. My bad. neuroDeadge

somber smelt
#

ohhh

#

merged

somber smelt
#

watching the plague inc gameplay makes me want to consider letting neuro control the game speed

#

but at the same time i dont want to see balatro being played at 1x speed or anything lower than the max really

#

so at the same time i dont want to let her

#

THAT BEING SAID we can let her control the game speed in the vedal co-op version cus itd be funny

viral blaze
#

i just imagine neuro setting it to 0.5 every 10s to bother the tutel

buoyant stream
viral blaze
#

its just modifying a number, cant be that problematic

somber smelt
#

we should just be able to just change the game speed variable internally

viral blaze
#

the game itself modifies the speed when scoring takes too long

buoyant stream
#

Oh.

somber smelt
#

yeah we can just change G.SETTINGS.GAMESPEED to whatever

#

and then that automaticallyt changes G.SPEEDFACTOR

buoyant stream
somber smelt
#

wed probably tell her to choose between 0.5, 1, 2 and 4

#

since those are the vanilla options

buoyant stream
north viper
#

lol.. do you want. Very xdx of you sir

grand girder
#

Hi, sorry I left this project for a while; is there anything I can help with? @somber smelt

somber smelt
#

for co op i want to just let neuro control the shops but all wed have to do is just delete half the game hooks for that version to work

grand girder
#

If I get round to It I might try making some features to give neuro extra game information (Card efficacy memory between runs, Synergy memory between runs etc)

somber smelt
#

i might just start work on the vedal co-op version

#

and for now just give neuro access to shops

#

and let her choose what card from booster packs

#

i wanted to see neuro try to play solo first but eh should be fine

#

esp if vedals not even sure if neuro can even play it remotely well solo

north viper
#

I think it was a matter of timing. Seemed like he was extra busy today. We still have Thursday.. but if you want to start on it than feel free.

#

I wouldn't count anything out with the full version regardless. Just be patient

somber smelt
north viper
#

fair enough!

#

Yeah if you want to. You can take your time with it that way too. Even if you get it done quickly it may not be able to be used right away. Good for debugging (if needed)

#

(Keep in mind the direct integration has more legs as it can be used by both twins going forward.. provided they can play well enough... the co-op one could end up being used once.. but could be fun)

somber smelt
#

making the co-op one is legit just commeting stuff out i think lmao

north viper
#

lol.

#

Yup I know..

#

Could make it a flag in the config too.. if you want to get fancy

somber smelt
#

good idea

north viper
#

have it default to full mode.. and than when they want to do coop they change the value.

somber smelt
#

or make it a keybind

north viper
#

Yeah.. that would be even more flexble

#

nice!

vapid cloak
#

Here are some ideas I had for unique stuff for coop, most are probably dumb as I have put no thought into them. If you like any of them I would be fine implementing them myself when the coop version exists :)

  • A boss blind that switches between Vedal and Neuro playing per hand/discard. This could be implemented neuratro side with a check that the integration is also loaded (smods has stuff for this).
  • Make it so jokers and consumables can only be modified or used by Neuro, this should make it more likely for neuro to use the actions in funny ways if she knows she is the only one able to change them. Atleast I hope.
  • modify card's .states so they cannot be bought by Vedal, Would probably need to modify states again in execute_action before using the card though. This could stop any race conditions from Neuro and Vedal interacting with them at the same time.
somber smelt
#

oh thats kinda smart to prevent any race conditions

#

i prob wont start any work on coop until at least next week

north viper
#

Oh last night I though of something to pass along. I recommend you use another branch until the stuff is stable just in case Vedal uses the full integration between now and when you finish the new feature set. It would suck to break it right when he's about to use it.

somber smelt
#

already was going to yea

peak light
#

rip this thread

languid sonnet
peak light
#

?

#

also wonder if the coop stuff has had any progress since last message despair

somber smelt
#

i did actually start

#

on just the code cleanup for now

#

and i only did a small thing

#

but a start is a start

somber smelt
#

status update: somehow cleanup has turned into me rewriting half the localization stuff

#

so this is no longer cleanup this is a pretty big refactor lol

languid sonnet
#

Localization you say? 🤔

somber smelt
#

and today is the first time ive touched this since last time

somber smelt
#

we call the games localization function on whatever object then just throw the result at neuro

#

cus balatro only determines the text that appears when you hover over something when it actually needs to be drawn to the screen

somber smelt
#

ok why does this work for every consumable EXCEPT for rhythm

#

Add a Osu! seal to nil selected cards in hand . Sell value: $1

#

i dont get why it works for the shoomimi seal spectral but not the osu one

#

but this new system for getting loc vars is really cool and if i get it working i can replace like 1000 lines of code with just 80

somber smelt
#

oh its bc mitosis is a scam and doesnt actually use loc args

#

oh all the neuratro consumeables are a scam

#

so my system just straight up doesnt work w modded stuff

#

a

somber smelt
#

status update: it works now and i tested it with every single joker in the game + the neuratro ones and it also works for those

#

and its just one small guy that does everything

#

just ignore how it doesnt add the name of the card

somber smelt
#

putting this here so mainly i dont forget, but my next steps are:

  • get this new system working for vouchers and booster packs
  • rewrite getting card modifier descriptions
  • decide if you want to do the same for tags cus this should also work despite tags not being cards
  • rename get_run_text.lua and get_text.lua to something that makes more sense
  • move the context related stuff from run_functions_helper.lua to run_context.lua
  • rewrite the logic for getting query/state strings to be a bit cleaner
  • ~~figure out a better system for registering actions ~~
    • my current idea is to hook into the games update function and setup a FSM (this is what the base game does already for all the logic so well just add our own)
    • the states can be something like in shop, in booster pack, in blind selection, in round etc
    • when we enter a state, we register all the actions for that state and then set a global state_finished flag to true which will then turn off all action registering
    • ~~then inside the execute_actions for each action we set the global state_finished flag to false which will then register the appropriate actions again in the next call of update() ~~
  • rewrite the logic for verifying consumeables across actions
  • add in co-op mode
    • configurable? hotkey
    • configurable actions neuro can take
    • when we register the actions for the current state, check against the config options to make sure its enabled for the given mode, otherwise just leave it up to the player
    • add some text at the top of the screen or smth that says "neuro in control"/"player in control" or something like that to show whos in control for the current state
    • see if we can lock player controls so the player cant crash the game by interfering with neuro
  • also thinking of changing how the config works a bit, cus if we add a new setting to it then git will throw a hissy fit when you try to pull the new config if youve made any local changes
    • prob gonna tell people in the setup instructions to make a copy of config.lua called like local_config.lua or something
    • add local_config.lua to the gitignore
    • when loading a config option, check if its defined in local_config and if not fallback to config.lua
  • rewrite context to use markdown
somber smelt
#

i love finding comments past me wrote

north viper
#

Oh god. I know how that goes.

somber smelt
#

2am me was crazy doing a few replace alls across every file

#

50 files changed lmao

north viper
#

Yay! good work Luq

#

regexp is best exp.. (it's not it's really not)

somber smelt
#

anyone wanna do a bunch of testing

#

if anyone wants to test this branhc

#

just play the game through tony and tell me if actions arent registering or if the game crashes or if theres two action forces at the same thing or context messages are misformatted? malformatted? badly formatted? or anything like that

#

my main focus is on action registration but other bugs are cool i guess

#

known issues:

  • sometimes theres a few seconds of delay before some actions gets registered (booster packs), but if nothing happens after like 5 seconds then its bad
  • the aura consumable sucks, it wont let you use it
#

after this ill fix up consumables then actually work on adding co op

#

everything up until this point has been prep work

spare niche
lilac wasp
#

Not now

north viper
#

Sadly, I am busy for a little bit, so I have no idea when, but if I get a moment I'll dig out my old tony setup and give it a test

vapid cloak
#

I tested for about an hour and did a few runs, these are the main issues I ran into.

Does not send context about booster pack cards, it didn't matter if the booster was opened from skipping blind or buying it. This seems to exist for all types of boosters, heres an example of the context I recieved.

[State] [Ephemeral] You currently have 0/5 jokers in your inventory.
You currently have 0/2 consumables in your inventory.
[Query] [ephemeral] You have opened a booster pack containing consumables and can now immediately pick consumables to use from the pack. Some consumables require a playing card as a target, so you have also drawn a hand of cards to use if needed.

Context about the joker cards in the shop was not sent, it did send booster and voucher context though!

registered skip_blind on boss blind after leaving shop, if you run skip_blind it sends result saying you skipped boss blind then registers the actions again correctly only registering play blind.

did not register any blind actions when skipping a booster pack from a tag, I was messing with debug stuff so that could have broken it?

Issue with colour tags in context, here is an example

  • 2: {C:dark_edition}Study-Sama{}: A R andom played card gets retri G gered between 1 and 10 times. . Sells for: 4
#

These are also some context issues, none of them are too big but I might as well document them:

need to change blind query if cannot skip blind as it will always say "Choose to select or skip the currently selected blind"

Should probably fix issues with adding space to card context even when already having one in that space, not too important though. e.g. "+12 Mult" rather than the correct "+12 Mult"

#

The buy actions could also be unregistered if everything in that field is more expensive than what she can afford, but Neuro is probably smart enough to not mess that up though.

north viper
#

Still worth making an allowance for. the twins may not act on it, but better to be safe than risk breaking live on stream.

somber smelt
#

i guess after all the revisions i somehow missed the context stuff

#

thanks

#

registered skip_blind on boss blind after leaving shop, if you run skip_blind it sends result saying you skipped boss blind then registers the actions again correctly only registering play blind.
howd i manage to do that

somber smelt
#

Does not send context about booster pack cards, it didn't matter if the booster was opened from skipping blind or buying it. This seems to exist for all types of boosters, heres an example of the context I recieved.
i may be a little bit stupid

#

meant to be state_parts[#state_parts+1] = RunContext.booster()

#

Context about the joker cards in the shop was not sent, it did send booster and voucher context though!
oh i think im actually stupid

#

meant to be if #G.shop_jokers.cards

somber smelt
#

rerolling the shop is the only one where we dont give her the option if she cant afford it and if she doesnt have any free rerolls

#

we should probably make that consistent across actions

north viper
#

I think that's a sound idea.

somber smelt
#

theres an argument for and against not registering stuff she cant do

#

if she tries doing something, gets told she has no money for it, she might think "ok let me sell something so i can afford it" so maybe we shouldnt

but if she cant do it in the first place she might be like "i want to buy this why cant i"

#

assuming she doesnt realize the cost

north viper
#

When it comes down to it.. you have to balance streamlining vs. agency. Neuro and/or Evil I can see doing that yes. I think if it effects actions related to the game put it on them, but if it's a integration protection or a situation where there is zero choice (but still present it to them) than that's when you can put in some streamlineing.

#

Hmm wonder how they would handle credit card.. hehe (side thought)

somber smelt
#

we do take it into account

north viper
#

Indeed!

languid sonnet
somber smelt
#

registered skip_blind on boss blind after leaving shop, if you run skip_blind it sends result saying you skipped boss blind then registers the actions again correctly only registering play blind.
fixed

did not register any blind actions when skipping a booster pack from a tag, I was messing with debug stuff so that could have broken it?
cant replicate

Issue with colour tags in context, here is an example
study sama seems to be the only card in the entire game like this (see attachment for literally everything), i wonder why

#

hmm

#

like why is this fine?

  "{C:dark_edition}Negative{} jokers give {X:mult,C:white}x#1#{} Mult"
}
somber smelt
#

oh i figured it out

#

we dont bother localizing the name

#

cus cards normally dont have special effects in the name itself

somber smelt
#

i have 2 ideas for reworking consumable validation:

the easy way:
in validate action, we highlight any cards that neuro selected then just call card:can_use_consumeable() which is what the game uses to determine if the use button should be grayed out. if it returns false, unhighlight the cards then return false on the action result. if it returns true, then we just return true and then in the action execute we can then use consumable.
cons:

  • if neuro selects cards when they arent needed for the consumable, it'll go through anyway. this means that in the execute action at the end we have to unhighlight any cards that are still highlighted after it's been used
  • if neuro tries to use a consumable but cant, we wont be able to tell her why, so shes just got to guess

the hard way:
basically what we currently have, just i do some rewriting and consolidate the validation for consumables into one big function that just determines if a consumable can be used given some highlighted cards. we can then give each failed check a reason why it failed so neuro knows why
cons:

  • will have a lot of specially coded checks for certain consumables
  • some modded consumables might have special conditions that we cant take into account properly (nothing from neuratro is like this so idk how much i care)
  • more annoying to test and more work to implement lol
#

yknow writing it out like this the 2nd way sounds better

#

i wanted to try to get away with the easy way but after thinking abt it for longer than 5 min that sounds like a bad idea

#

welp tmmrw ill get on that, shouldnt be that bad aside from testing and then finally co op

peak light
#

mhm

#

understood

somber smelt
#

so despite ankh deleting all other jokers except for the one it duplicates, you still need an extra space for it

#

didnt know that but this is easy enough to take into account w the new system

#

it does the deleting first as well

#

also "fun" fact, aura and cryptid dont unselect the card you use them on after use

#

unlike every other consumable

somber smelt
#

ive tested consumables in blind and in shop and im very confident with those

#

but i havent done muhc booster pack testing

somber smelt
#

as soon as i try a booster pack the game crashes

#

love to see it

#

fixed im just stupid

peak light
#

how we all feel after debugging for 5 hours just to fix it after 2 minutes of reading docs

somber smelt
#

ok

#

next up is co op finally

#

i already have an idea on how to implement everything just need to sit down and do ti

#

but the time for that is not tonight

#

if anyones curious heres the notes i wrote late last night for implementation details. mostly just notes for myself but comments are welcome

#
  • add config options for each stage that determine what neuro can do in that stage (or for each action determining if neuro can call it)
  • add config option for default boot mode
  • add an extra wait on game boot where a keybind can be pressed to set mode
  • could probably be toggleable between neuro solo and co op mid run but its much easier if we enforce a full restart to switch modes
  • if were in coop mode, check the config before registering the actions
  • no action forces during co op
    • just send the state/query strings as regular context (add reworded versions to be more clear to neuro shes not currently in control and is just watching someone else)
  • sometimes state is incremeted in the action execute, so if its instead done manually, the current state wont update.
    • most action executes have one big function call they do (ex: exiting the shop calls exit shop, using a consumable calls use consumable, playing a hand calls play hand... you get the idea lol)
    • for each of these, add in an argument that indicates that neuro is the one who called it
    • then hook into those functions and if that argument is nil/false, we know it was done manually and can manually increment state
    • alternatively, do away completely with incrementing state in the execute and just hook into the function itself
      • not all actions call another function that progresses the game, an easy example is the info ones like get cards in deck so those will still have to manually change state
      • these all currently decrement state which triggers them to be reregistered (alongside the other actions like play/discard hand)
      • i can already see a problem where neuro performs one of these in co op as something else is manually performed potentially breaking the current state
      • probably gonna have these go by their own registration logic if its co op mode (should probably be able to add them to a seperate action window that is registered on run start and then unregistered on game over)
#

i wonder if mods ever are just checking message logs and see me editing these long ass essay length messages

spare niche
#

In the mod

somber smelt
#

most action executes have one big function call they do (ex: exiting the shop calls exit shop, using a consumable calls use consumable, playing a hand calls play hand... you get the idea lol)
... this just isnt true, the first two examples here instead press a button which is gonna be a lot harder to hook into

#

partially have to go back to the drawing board

somber smelt
#

actually wait

#

every time we click a button the game just calls G.FUNCS.button_whatever with the button itself as the argument right

#

so we could probably just do

button.called_by_neuro = true
button:click()

and then hook into the actual function in G.FUNCS and just check e.called_by_neuro

#

probably

somber smelt
#

i just deleted 1515 lovely log files

#

nothing else really to say i just wanted to mention that

somber smelt
#

youd expect G.GAME.selected_back_key to be the center key for whatever deck was selected right?

#

wrong its a whole ass table lmao

#

G.GAME.selected_back_key.key is so stupid

hard adder
#

But... why?

somber smelt
#

in co-op mode if neuro isnt in control of selecting deck then we need to tell her what deck was selected instead and what it does

#

honestly i dont understand half of the programming decisions made in this game

peak light
somber smelt
#

i dont understand half of the decisions made in this mod

#

and im the one who made them

#

i hsouldve spent more time planning and learning how the game actually works at first

somber smelt
#

i have to do a bunch of testing and still add in a lot of context but im getting really close to being done with coop

#

then i have a few minor improvements i want to make to solo

#

i sya that but i got no idea when ill actually finish this ive been working at a pretty slow pace

north viper
#

Take as long as you need. I get the feeling that you have plenty of time before it could used anyway.

somber smelt
#

you ever accidently send context once every frame? yeah me neither

#

actually that was more than once a frame

peak light
arctic sky
#

@somber smelt could you please dm me in your free time?

somber smelt
#

after not touching this mod for a month i am back

#

i opened the project and my cursor was in the body of an empty if statement

#

took me a bit to just remember what i was doing

#

anyway co op mode is pretty close to being done

#

after i have some universla improvements i want to do that are mostly context related

#

and by pretty close i mean i think im done i just need to test a lot and see if i forgot anything

#

after im done with everything we'll be out with v2

#

were getting balatro v2 before neuro v3 voice

peak light
#

🎦

north viper
#

Good to hear!

somber smelt
#

and now all the homework i didnt do over the weekend cus i was working on this has come back to bite me lol

somber smelt
#

i got a gift sub to balatro university lmao its a sign

north viper
#

oh neat!

somber smelt
#

hey guys

#

anyone want to test a billion different things

#

its a lot to test

#

that branch

#

can edit config.lua directly or just throw this file in the mod folder and itll use these options and use config.lua as a backup when something isnt defined

#

wait nvm this is very broken

#

wtf did i do

somber smelt
#

ok fixed it

somber smelt
#

i should clarify the main thing is just play a bit with everything off and just make sure the context messages being sent are good, then play with everything on through tony and make sure everything works fine and actions are getting registered properly

#

if it can handle evertyhing off just fine and everything on just fine then were prob good

#

but if you want to test different combinations be my guest