#Spectrum framework

1 messages · Page 1 of 1 (latest)

glad rose
#

https://github.com/wingedcatgirl/SpectrumFramework

Do you enjoy reinventing the wheel whenever you make a mod that adds custom suits? If so, this mod isn't going to help you much.

For everyone else: this mod adds Spectrum hands, which are like the opposite of a Flush in that they require five cards each of different suits. Link it in your mod's readme, add it in your main file as a dependency if you wanna be sure, and - okay probably actually test it with your mod to make sure something isn't wrong, but other than that, that's all you need to do! Now if some other custom suit mod does the same thing you don't need to worry about conflicts because you'll literally be running off the same code.

Technically you can also use this mod by itself, since Wild cards can count as the fifth suit. Also the first through fourth if you've got a lot of them. Why would you want to do that? No idea, but you can.

Credits: Most of this mod's code was copied out of other mods (mainly #1220084296346501201 [which in turn got it from #1210728178201526373 ] but also some from #1219749193204371456) on account of the fact that I'm not good at lua.

-# "Hey Minty didn't you mention doing some other stuff that wasn't just a mostly-copied hand framework?" Yes and it involved adding an additional suit, so I decided to do this. That'll also get its first release soon, please look forward to it. Now I'm going to bed already.

GitHub

A mod for Balatro that adds Spectrum hands (five cards, each of a different suit), for use alongside mods that add suits - wingedcatgirl/SpectrumFramework

shut monolith
#

confused about what exactly the "framework" part is

void bronze
#

I think it’s outright adding the hand without needing certain mods to implement it (Six suits, Bunco, etc)

#

Because everybody and their mother just like xChips made their own version of spectrum

shut monolith
#

in that case i don't understand why someone would need to credit this mod for anything fool

red fulcrum
#

one issue that you may want to look at is base scoring. bunco's spectrum hands are pretty generous because getting the exotic suits isn't guaranteed, but something like six suits just has you start with them so you can almost always form a base spectrum.

glad rose
#

ThinkRingo
i imagine each mod will have its own idea of how easy a spectrum is, based on how freely it gives out its custom suits
not immediately sure what to do about that
also installing multiple custom suit mods at once will probably make it easier even if none of them intended it to be easy

#

i guess a config option to swap it between an "easy" and "hard" score? and just let the player decide (and mods can recommend an option)

red fulcrum
#

in my fork of six suits I have it checking if bunco exists, if it does it uses bunco's hands/cards but adjusts the scoring too six suits'. If you have initial cards disabled it'll use bunco's scoring.

glad rose
#

huh
it kinda looks like your fork already does most of what i was trying to do lol
you even have an option to disable your suits

#

i'm not immediately sure how to do this, but a method for another custom suit mod to declare "hello yes i make getting my custom suit easy" and then this mod (if i keep it around instead of just pointing people to your fork of six suits) would detect that and use the lower scores

#

and then we'd only have to explicitly check for mods that never got the memo

red fulcrum
#

I guess you could look through the deck on a new run start to see if it has a lot of extra suits

glad rose
#

true
can a hand's base score be changed on the fly like that without restarting? the existence of levels makes it feel like it should be possible but idk how

red fulcrum
#

I haven't tried it but I assume you could do take_ownership() whenever

glad rose
#

and my other mod that i was making this to be a framework for would only sometimes make getting its extra suit easy anyway oopsie

red fulcrum
#

in my modpackfixes mod I do all my changes at the splash screen so all other mods should already be loaded

#

you could, I assume, just change values in the base game poker_hands objects at will

glad rose
#

if we can change base values on game start, i think the way to do it would be to load the higher scores by default, but change to the lower scores if either the relevant config option is checked, or 13+ cards of any custom suit are detected in the deck
(13 or some percentage. 20% is what you'd have if you added a full set of one custom suit, so probably that?)

#

i guess i'm gonna have to learn how config options work

red fulcrum
#

feel free to take anything from my stuff that you want to include

glad rose
#

i probably won't be able to work on it tonight much if at all, rip
hopefully i don't completely forget all my thoughts by the time i can

glad rose
#

i say that and then spend the next three or four days completely wiped out by Mystery Unpleasantness, oopsie
but i've finally recovered from that, as one might gather if one has spotted #1308185262664450068 appearing
so i can actually start figuring this out

glad rose
#

well, it looks bad, but it's literally something :)
now i just have to figure out how to make it function...

glad rose
#

visible = spectrum_config.show_hands works almost as i expected but requires a game restart to actually stick, since i guess all that is only initialized on game load
any ideas to make it work without a restart?

glad rose
#

updated! it works

#

now i just gotta figure out how to count the suits when starting the game ThinkRingo

glad rose
#

okay, we've got a function for counting suits
but it doesn't work for cryptid's enhanced decks, due to what i assume is a loading order issue
not immediately sure how to fix this

glad rose
#

update :)
jokers and since smods fixed the weird unloaded conflict thingy we added bunco and sixsuits as conflicts (they already implement the spectrum so if you're running them you don't need this)

glad rose
#

smeared joker has been acting weirdly until now, but i think i fixed it
if anyone sees a spectrum which they can't figure out where the suits are coming from, send us a screenshot

#

(that's in the commit, not the release)

#

... realization that it won't work as intended with custom suits. bleh

glad rose
#

okay i think i figured it out

glad rose
orchid skiff
glad rose
#

ah neat
unclear why someone would want to run both of these mods at the same time, but good to know it won't cause any problems

orchid skiff
#

it makes sense to have a way to allow multiple suit mods to coexist without each having to define their own spectrum

void bronze
#

NODDERS I can agree on that

glad rose
#

ThinkRingo i suppose i should make the jokers' power level also depend on how easy a spectrum is?

glad rose
orchid skiff
#

i should make a suit group api thingy

#

ik blackboard api has existed, but there should be something properly implemented within smods

void bronze
#

NODDERS i'd defo appreciate light and darksuits

#

if that makes sense

#

red and black

heady bronze
#

wait so sorry if i misunderstood but this mod enables flushes, flush house etc, for custom suit mods while base smods implementation doesnt?

orchid skiff
heady bronze
#

oooooh totally misinterpreted lol

glad rose
#

okay yeah it seems to work fine with sixsuits
smeared moons scored as stars

#

graphic design is my passion
i don't understand the ui code in this game so i don't know how to make this not ugly

#

well that's definitely worse :T

glad rose
# glad rose
poll_question_text

Should smeared joker make all modded suits count as the same?

victor_answer_votes

7

total_votes

8

victor_answer_id

3

victor_answer_text

Make it a config toggle

junior flax
#

Blud is literally like 😔.

glad rose
#

😔

glad rose
#

worked on some technical stuff
playing cryptid's wild deck has been a weird experience and I've been hoping to make it a little saner

ashen zealot
#

localize(hand_key, 'poker_hands')

glad rose
glad rose
#

working on an option to switch joker and planet art to that of other spectrum mods (i.e. #1210728178201526373 and #1220084296346501201; #1239829592693538816 turns out not to have jokers or unique planet art)
currently it relies on the presence of the other mod and falls back on cupertino's art if the other mod isn't there

#

trying to decide if i should change that

#

also this finally happened! i'm gonna wait for the next stable release, or maybe make a beta branch, but finally i'll be able to delete the fake wild suit
it caused so many annoyances i had to work around AGASigh

spice cypress
#

I'm trying to check if a Straight Spectrum is played. In the case where multiple mods may implement Spectrum, is there a more elegant way to check than something like
if (context.scoring_name == "paperback_Straight Spectrum") or (context.scoring_name == "bunco_Straight Spectrum") or (context.scoring_name == "six_Straight Spectrum") then ?

glad rose
glad rose
#

pro tip: don't do card:set_sprites() every single frame, or things get fucky

glad rose
#

i'll make it a full release in a few days probably if nobody points out anything i need to fix. probably also if they do, but in that case i'll fix it first

glad rose
#

"in a few days"

#

anyway

glad rose
primal monolith
#

am I free to reference what this mod does for smeared joker?

glad rose
#

sure

distant burrow
glad rose
#

i don't know why you're replying to a release which has nothing to do with that question, but if both bunco and spectrum framework are active, we take steps so that only spectrum framework's spectrum stuff appears
(if you care about the graphics there's an option for that)

lavish minnow
#

Is this mode still active?

lavish minnow
#

regardless I just downloaded it

glad rose
#

i haven't been actively working on this mod for a bit
but i'm still around for any maintenance that needs doing, and/or if i regain interest in it

lavish minnow
#

alright well try it out

glad rose
#

monochrome

prisma hound
#

is there a way to disable spectrum hands for preexisting spectrum-usage

#

because spectrums are kinda op for asas's suits

glad rose
#

currently no, but one can probably be patched in easily enough
alternately, have you considered setting spectrum score status to standard in the config?

#

it uses lower values

glad rose
#

situational should automatically detect if a deck starts with a lot of suits but ik that function has some difficulties

prisma hound
#

spectrum is only op for asas suits because every asas suit is technically 3

austere quartz
prisma hound