#X Card

216 messages · Page 1 of 1 (latest)

woven socket
#

To celebrate the release of EnhanceAPI (which you will need for this mod), I give you the enhancement that inspired it. Perfect for Straight enthusiasts who want a card to give the hand type more build options!

How does it work?
Each X Card in a played hand analyzes the non-X cards in the hand, and transforms into whatever rank would create the highest scoring hand without transforming into the same rank as another X Card in the same hand. For some examples:

  • AAAAX would mimic Ace, turning Four of a Kind into Five of a Kind.
  • A8XXX would mimic the Ace and the 8, to turn Pair into Two Pair; the third X is not scored under normal circumstances.
  • If the third X would be scored or otherwise have its value queried, like Splash, it would mimic a random value.
  • A2XX5 would mimic a 3 and a 4, to turn High Card into a Straight.

Go give it a try down in the GitHub link below, and let me know if you run into any issues!

https://github.com/Numbuh214/X-Card

GitHub

Contribute to Numbuh214/X-Card development by creating an account on GitHub.

formal path
#

link isnt real

woeful fjord
#

Shouldn’t it be “analyzes non-X cards in the hand”?

woven socket
#

yes, thank you

woeful fjord
#

Did you do dynamic programming?

minor bobcat
#

what modloader is this for

woven socket
#

this requires steamodded

#

which is why steamodded was selected as a tag

minor bobcat
#

ah

#

right

#

the link is broken though

#

so i cant download it

#

also does it add a new tarot or something

#

to turn cards into x cards

woven socket
#

yes, it adds "page of cups"

minor bobcat
#

hm

#

can you fix the link

woven socket
#

@here the repository is public now

#

apologies, i'm still learning github

minor bobcat
woven socket
#

oop, forgot i started throwing that code in. one moment!

#

there we go, updated!

minor bobcat
formal path
#

you need EnhanceAPI

minor bobcat
#

oh right

woven socket
#

yeah, i should have specified that more clearly

#

my bad!

minor bobcat
#

huh

#

the page converts 5 cards

#

that seems like a lot

#

also the art

#

game crashed when i changed pages in the enhanced cards menu thing

woven socket
#

oh yeah, forgot to fix that

dull imp
#

whoo

woven socket
#

there, page of cups is nerfed and the bug should be fixed

minor bobcat
woven socket
#

all right that should be everything

#

wait what

dull imp
#

me when

woven socket
#

oh there we go

crude plume
#

badges for polychrome and red seal aint showing up

minor bobcat
crude plume
#

copying a x card via cryptid doesnt keep the x card sprite

#

and then crashes

minor bobcat
#

what about death

formal path
woven socket
#

and nah, autumn... i literally had to hack my own badge code in, and i forgot about edition/seal badges

#

that's on the to-do list

formal path
#

oh the badges

#

tooltips are also yeetified tho

woven socket
#

let me see how copy_card works...

#

oop, there's the problem

woven socket
#

new version of enhanceAPI

crude plume
#

gotcha ill test it later

woven socket
#

yep, works perfect on my end

#

literally just needed to call the set_sprites function

#

which apparently it never did

crude plume
#

to be specific on what i did that lead to the crash, i used offering from autumn’s mod a few times to get one card, made it an x card, placed a red seal and polychrome on it, spammed cryptid, and then tried to play five of them

woven socket
#

ohhhhhhhhh

crude plume
#

when i clicked the last one it crashed

minor bobcat
#

actually what would happen if you did play 5 of them

woven socket
#

the five X code might be fucked then

minor bobcat
#

would it just choose a random rank and then make the highest possible straight with that rank

woven socket
#

what should happen is that you get the best hand that can be made with five unique ranks

#

that is, an AKQJT straight

minor bobcat
#

T?

#

ten

#

right

woven socket
#

yeah, people use T for 10 and

#

it makes sense

crude plume
#

do red seals fuck with them at all?

woven socket
#

they shouldn't?

#

but i'll add that in

minor bobcat
woven socket
#

oh, i updated awhile ago

#

download the latest version and it should be fixed

minor bobcat
#

ok

woven socket
#

or just go in that line of the file and put suit = at the start of it, if you wanna save yourself some time

#

that's literally all i did

#

forgot to add suit =

#

anyway, if it's dying on final card click

#

it's dying during straight calculation

#

yep, there it is

#

it's just some debug nonsense

#

comitting now

#

@crude plume issue fixed

crude plume
#

sweet

woven socket
#

yeah, like

#

there's no convenient name for a non-flush "royal flush"

#

also, they randomize values as a failsafe

dull imp
#

i found a specific error

woven socket
#

is it this?

dull imp
#

no, happens when i play a 3 of a kind with this mod installed

#

not with the edition specifically i haven't tried that, just a 3 of a kind

woven socket
#

yeah, it's full house coding being fucked

dull imp
#

ah, okay. i'm just not play 3 of a kind considering it did take me a while before getting the error

woven socket
#

there we go, that's THAT issue fixed

woven socket
#

another small update to be compatible with the new version of EnhanceAPI and stop an issue i almost didn't catch, where two pair might score over straight

woeful fjord
woven socket
#

the issue of crashing when playing a three of a kind

#

oh, mb

#

@woeful fjord that was because i forgot to add the rest of the badges to enhanceAPI

#

as you can see, i fixed that earlier

dull imp
#

me when enhancing a modded suit with x-card and trying to play it

dull imp
#

also a few spare pixels lying around

minor bobcat
#

what would happen if you played a debuffed x card

#

would it just not score

#

and if you forced it to with a high card would it just give 0 chips or something

woven socket
woven socket
#

or at least, that's what i'd imagine anyway

#

(...i wonder if there could be a better way to create "compatibility" sprites...)

#

...what i could do is see if the suit is greater than three and then have it search for an atlas m_xcard_[suit] instead of its default atlas of m_xcard

#

then it would be on custom suit creators to make their own sprite for X cards

#

there, now the vanilla suits will still work properly at least.

#

so the solution to your problem going forward, @dull imp, is to make a custom atlas for it with the name "m_xcard_[suit]", where the [suit] variable is the suit's name, converted to lowercase, and replacing spaces with underscores

#

here's a template i whipped up for anyone wanting to make sprites for mod suits (either their own or one they use

#

just make sure the small graphic for the sprite (the one used on 2-10) is aligned with the big circle, and that the suit denoters are aligned with the small ovals in the corners

#

then change the rest of the sprite to the same colour as the suit itself and then you're golden

nocturne epoch
#

I honestly like the idea of this far more than the current vanilla wildcards. Getting a straight build to work is way harder than a flush build, so this might actually make it a viable hand to build for.

woven socket
#

that's been the goal of this, and the personal balance mod i made that this splintered off from

#

in that, i made superposition capable of fully looping straights, improved the numbers for both crazy and devious joker, and improved the planet mults for straight and straight flush

#

among other plans i have

#

this way, straights are more than just "hehe just get one of these two specific jokers and it's easy"

nocturne epoch
#

Wouldn't this make royal flushes be very easy to get though? Do the cards automatically calculate to the highest value? Say you have a 10 and a Jack of spades, and the rest are spade X-cards, would that result in a royal flush?

woven socket
#

yes, it would!

#

but they're not easy to come by under normal circumstances

ripe herald
#

I'm not at my PC rn i,ll be there in about an hour. But I also noticed this edition overlays the original sprite for the card I'm wondering would it be possible without making a whole new spritesheet to make half playing cards. If you do have to make a whole new spritesheet I would also do that.

woven socket
#

you have to get 3 page of cups tarots, specifically for that to work

nocturne epoch
woven socket
ripe herald
#

I want to make half cards as an edition, I'm basically wondering if I can make it so it removes the top of the card. Of all vanilla suits, and my modded suits

#

No thread for it just concepting

woven socket
#

mmmmmm...

#

i don't know if that will work as an edition, because editions are usually just shaders

#

i'm sure there's a way to do it, but... i'm not sure if it isn't an uphill battle

woven socket
#

you'd still need multiple in order to get a royal/straight flush more easily

#

and it's nice to have those be as much an auxiliary to straight deck builds as they are to flush deck builds

#

especially because oftentimes you're upgrading straight OR flush enough to where playing a straight flush is actually a detriment

#

and besides that, you're acting like guaranteeing a straight flush is objectively the best use of a death card

nocturne epoch
#

Fair enough. Would take a lot of Death cards to guarantee a royal flush each round.

woven socket
#

mhm

#

and death cards are better used for the secret hands anyway

#

i know i'm hitting balatro balance where i hear "if things go right, you can go to the moon"

dull imp
#

when when modded suit 😔

woven socket
#

the suit names are ink and color, right?

dull imp
woven socket
#
  "m_xcard_color",
  this_mod.path,
  "m_xcard_color.png",
  71, 95,
  "asset_atli"
)
local m_xcard_ink_sprite = SMODS.Sprite:new(
  "m_xcard_ink",
  this_mod.path,
  "m_xcard_ink.png",
  71, 95,
  "asset_atli"
)```
#

creating and registering these two sprites will fix the issue

#

HOWEVER, i will also need to fix enhanceAPI to be compatible with your suits

#

this_mod is a variable that uses SMODS.findModByID(mod_name) btw

formal path
#

i wonder if this is related to the issue i had

woven socket
#

potentially

#

i don't have custom suit/rank compatibility yet

#

quite frankly, X cards probably aren't going to--

#

just too many moving parts to consider with automatically making straights out of...

#

yes many ranks

minor bobcat
woven socket
#

all you have to do is make the sprites, define them in your mod, and my code will do the rest

minor bobcat
#

oh cool

woven socket
#

because it actively looks for asset atli's with the format: m_xcard_[suit]

#

where [suit] is your suit's name, converted to lowercase, with spaces being replaced by underscores

#

so for stars and moons, you'd just need to define m_xcard_stars and m_xcard_moons

formal path
woven socket
#

i don't have enhanceAPI compatible with custom suits and ranks yet

formal path
#

i was having issues on collection screen

nocturne epoch
#

Tried some pixel art. Went for a combination of the vanilla mult card and wildcard style. Not sure I'm happy with the result, but figured I'd post it either way.

minor bobcat
#

does this have high contrast suit textures

woven socket
#

it does not, yet

#

but i could probably whip some up really quick and commit them

#

there, updated

woven socket
woven socket
#

but you know, maybe that would be a good "default" x card image

nocturne epoch
#

Did some further tinkering, and I think I like this version better. Also changed the lower right scribble so the red parts went on the top side of the figure, and added an extra black line to the X.
Idea was that the X is cut up, so there's space in between the pieces, which is kinda what it's used for, to fill in the blanks in incomplete hands.

nocturne epoch
#

Further tinkering with new ideas.

nocturne epoch
#

I think the torn / cut corners are a bit too much actually

minor bobcat
#

what is that png supposed to be

woven socket
#

oh wait

#

did i not commit those changes?

#

swore i did

#

@minor bobcat if you haven't updated before now, definitely do so.

minor bobcat
#

?

#

i have the high contrast versions if that is what you were talking about

woven socket
minor bobcat
#

ok

#

oh thats cool

#

it flips over and visually turns into the best card when its played

woven socket
#

that added visual flair is something i wanted to do, to convey what rank it decided to copy

muted ice
#

i made an halberds suit version of the x card but when i try to play it my game freezes

#

i don't know what might cause it

#

my bad it's me who is dumb i just used an x-card before a normal card

woven socket
#

all right

#

x cards should now be at least partially compatible with new ranks

#

i'm fairly confident that it won't crash

#

i'm not sure if they will work properly, but it won't crash

dull imp
#

club art of x-card

muted ice
#

in order : crowns, fleurons, halberds, moons, notes, stars

dull imp
muted ice
#

i saw that yours already are in the mod

minor bobcat
muted ice
#

you're welcome

karmic bramble
#

Good evening! I'm getting this error and I'm having trouble figuring out what's gone wrong.

woven socket
#

the 2x assets ARE used somewhere

woven socket
#

there, all assets should be accounted for