Have you wanted to make your own enhancement, but found it frustrating to place your card assets and make sure it all slots in properly? Well, EnhanceAPI is the solution to your problem! All you have to do is follow the simple steps in the Github link below. Have fun with it, and let me know if it breaks somehow!
#EnhanceAPI - The Title Explains It All!
240 messages · Page 1 of 1 (latest)
Huge
gonna ping some people as i remember "oh yeah, they were interested"
@feral crystal
@rose pewter
@granite void
@polar pewter
i mean, you were there when i said it's here
so i was prioritizing people who weren't lol
anyway, have fun~!
Ah ok
Oh this looks promising
yes
Let's freaking go!!
can you show an example of using this, I can't get it to work :/
here you go! @pale meteor
thanks
cheeseburger
is this the x card by chance?
nvm the answer is no
this is hilarous imo tho well done
(even tho it is meant to be a test)
is this going into steamodded? 👀
i mean, i'd not mind in the slightest if steamo were to integrate my code in
are we allow to @ him?
i think aure handles the api stuff mostly actually but idk how busy they are
its also not like someone who knows how to use github cant make a pr to steamodded
there is one problem, it doesn't show the edition in full deck
oh, it also plays a sound when scrolling over a custom edition
@feral nymph
not just yet, because i'm overhauling its straight detection coding
making sure it plays more nicely with shortcut and such to give optimum values
update: cards with custom enhancements should copy properly now
@polar pewter
@here New (small) changes: the sprite variable has been changed to atlas, and "args" support has (hopefully) been added.
TestCard has been updated to reflect this, and included in the GitHub.
@young basin (Sry for the ping) Do I need to DL this to use mods that implement it? Or is it just necessary for devs?
thank you, i will commit this before i go to bed
and yes, you will need to download this and put this in your mods folder, similarly to steamodded (which this also needs)
however, simply putting it in its own folder is enough.
one and done
okay, custom suit compatibility is tested and committed
happens when i open enhanced cards
sent a commit that could fix the problem; if it doesn't, i need the full stack trace.
update: it did not, but now i have a standard pack to open
there we go
x-carding the modded suits
also theres this one when having test card installed and opening editions
Hi, would you want this to be merged into steamodded?
not until i get it working again
and spoilers:
i probably won't get it working again
because i'm not good enough
never mind, i figured it out
new version pushed, should be compatible with all custom suits AND ranks
epic
if this were to be merged into steamodded, i would be fine with it
you reverse jinxed yourself
hey, that's how it works with me
also, you can now include an atlas_hc parameter, if you want your sprite to be different in colourblind mode
thank you so much for this!
I had made this edit during the demo. Do you think it's possible to have an enhancement that looks like this?
That's why I'm asking
I got this error when trying to run the API for the first time: :215: attempt to concatenate field 'name' (a nil value), which seems to happen when it tries to set the sprites for Bonus cards here:
elseif self.base then
sendDebugMessage(self.base.name.." has no base suit or value.")
end
i mean x-card appears over the card, at least thats how it looks https://discord.com/channels/1116389027176787968/1231769435749220362
oh yeah that happened to me as well
i think you have to comment out line 215 in enhanceAPI
hmmm
See, but I want some parts of the middle to be transparent, to make it look like it has holes
Though if I can make the burnt marks show over the face, then I think I could like without some transparency
i asked a similar question, i dont think transparency works
x-card is more like stone card, it just doesnt render the "real" card
hrngh.... moueldy (wait its burnt sorry)
(i think the sprite might benefit in readability by there being small traces of still-orange embers, kind of like the burning joker)
I edited this from the Burning Joker by removing the fire and the Joker
But that was during the 2023 demo
ahh
Just highlighting this bug report in case it got lost
oh uhhhhhhhhhhhhhhhhhh
did i ever push that update?
yes i did
that bit of debug code has been removed
To be fair I wanted an enhancement that removed suits and ranks and offered no benefit so
I tried to use Death to turn a standard playing card into another standard playing card and got this error. Though to be fair I haven't updated. I think one was Clubs
yeah, it's definitely an issue updating will fix
one moment tho
i'll double check if i can't update it rn
there we go
I'm still having a crash at boot no matter what I do, specifically with the Autumn Circus and having it's enhancement enabled. I'll report it there too.
Here's the traceback
nvm, seems to be a known issue with the mod
there was an update released yesterday. is this present on that version?
@tawdry sand
oh god what happened here
It is, but as I said, the enhancements in autumn's circus are just borked, not even implemented apperenly
genuinely not sure. it works fine for me.
it'll prob be fine
I haven’t tried to work on Enhancements yet, but I figured this would be a good feature for the API: pool keys like there are for Jokers and other objects that disable Enhancements from showing up naturally
there's already a G.CENTER_POOLS("Enhanced") that enhanceAPI adds to when newEnhancement() is called
is that what you're looking for, @mossy crater?
Kinda. I want to disable some Enhancements from being generated naturally
Like Grim, Familiar, and the other one can’t generate Stone cards
Also Standard packs yes
yeah, i could maybe add that in at some point
Because I’d like to add bad enhancements, so it’d be good to keep them separate
Maybe add a separate pool for bad enhancements but for now just a flag like Cavendish and etc. would be fine
yeah, some flags that tells it to not spawn in certain places
i think i should look into that anyways
bc i don't think x card should spawn with grim/familiar/incantation
Unfortunately this seems like you’d either need to inject code, rewrite existing functions from scratch, or maybe there’s a way to do it that requires neither that I don’t see
you probably don't have to rewrite it from scratch, per se
but your original code does get clogged up with a lot of balatro source
Is there an option to make the Enhancement artwork work like Stone Cards where they display over the rank?
Also some tests with other Enhancements
o
Idk what caused this, but my suspicion would be this API. I could be totally wrong tho
Created with Invisible Joker. Later, Antimony also created a Joker copy that was also a 2 of Hearts
Oh yeah I had an amoeba joker from some mod that copies itself and it did the same thing. Also 2 of hearts
Also suspect it's related to the enhanceapi
Also, what's that "Buy Sell pack?"
I actually don't recognize any of your jokers despite having over 400 in my game, lol
My mod which is in-development
The green one is from someone else’s in-development mod
display_rank = false
I had already tried it and it didn’t work
really? huh.
i believe the 2 of hearts-en-ing is related to this #💻・modding-dev message
swords on my spritesheet are aligned with spades on vanilla's, so most likely whats happening here is that the "front" atlas is getting set to the vanilla atlas no matter what
since stone cards have the specials “Stones:” part on the deck preview, will other enhancements be able to do this? if they dont have a rank/suit i mean
i think you have to change the numbers at line 205, as x=0, y=0 is where the 2 of hearts shows up on the sprite sheet, so just change the numbers into like ~15 or so
because i think new cards that are generated use 0, 0 as the default, even if it's not a playing card.
with this, It no longer does the 2 of hearts thing (at least for me)
{duplicated with invis joker}
@young basin do you think u could make that change to the code it should be pretty easy
oh, that's a custom suit issue? weird.
and yeah, using 0, 0 is a hail-mary crash-prevention measure
i genuinely have the code try grabbing the suit from 3 different places
or... i did with x card and not enhanceAPI proper?
its a custom suit issue but one that only arises with eAPI loaded; the pos is loaded correctly but the wrong atlas is selected
happens whenever a custom suit card is enhanced
(including vanilla enhancements)
I wonder if that’s the same issue with creating copies of cards
and in that case, the wrong atlas is "any atlas at all"
that was because it didn't look in both the card's "base" table and "config.card" table
oh interesting
because there doesn't seem to be a consistent place to find a card's suit and rank values
can't you always use base?
well, not for nonplaying cards ofc
Nice
also, the playing_card value doesn't do anything yet
i just have been really reluctant to even dip my toe into
nodes
I love hate UI
same
By the way, this might be an useful reference: all card faces, overlayed on top of each other.
hey, apologies if this is already known or if its a compat issue with the other mod, but this API seems to be heavily incompatible with the deck creator mod. anytime i view my full deck while using a deck made with the mod, the game crashes, same with opening the deck editor in the mod. this stopped happening as soon as i removed enhanceAPI
i can do more testing myself if need be!
make sure you are on an account that has the 'unlock all' thing enabled, if you already are then idk
are you telling me i need to unlock everything for this mod conflict to not happen
it's generally a good idea to not dabble with mods until you've done at least a good portion of the vanilla game anyway
well yea i have like at least a good 70% of the unlocks i just wanted to try some mods for fun
but i appreciate the heads up on what could be causing it
okay wait
i just made a new profile and hit unlock all, the crash still happens
this is what the log looks like
that
shouldn't be breaking
but i'll add a check that should fix it
at the cost of potentially introducing another bug
im sorry
gulp
lol this happens when i go to my enhancements collection even after commenting out the custom one
there we go i got it
however, i think a bigger problem is with that mod
it's not compatible with custom suits or ranks
oh
there we go
my mistake
mistaken statement aside, it works with deck creator now
is there any way to disable the test enhancement? its getting in the way of some modded "apply a random enhancement" stuff
you can delete the folder in enhance api
ty
can confirm that it's working issue free on my end now!
epic
thank you for patching that so swiftly
yea i would imagine making things compatible is absolutely more of a reactive measure rather than a pro-active one
yep
The wildest card
i'm not sure if it's related but i'll try the update and see if it fixes the issue i was having
oh sick, it does
thanks!
i think i found out another reason why i was having issues, too-- in your readme, it has sprite as an arg for enhancements, but in the actual mod it's atlas
not sure if it's an issue on this mod's end but whenever i add this as an enhancement in debugmenuplus, the cards get 2 of hearts-ified
probably not an issue during normal gameplay, but it would be nice to know a karmic card's rank during testing
It happens with copied jokers in normal gameplay, they get a 2 of hearts transposed on top of them, and yeah I think it is something to do with enhanceapi
i see
i may not include this enhancement in the mod if this issue remains so let me know if it ends up being fixed
it's because it is so hard to consistently find a card's suit and rank when it really shouldn't be
Been getting a lot of crashes listing enhanceapi since the most recent update of it
I have @last geyser 's rainbow cards, and it seems like it sometimes crashes whenever it rtris to draw them
but not always
I also noticed it's doing the 2 of hearts thing when death is used on them, I don't remember that before. I only saw it on copies of jokers
i'll look into that after some sleep
this has everything to do with me not understanding loc_def at all prior to fixing up my personal mod.
i just don't have the energy to do that rn
wait is there a function you can use for when enhanced cards are played?
this has everything to do with the entirely new method i made for recreating the localization process because {V:1} didn't work properly
proper localization is implemented
Running into the same crash mentioned here, exact line error and all.
Specifically rainbow cards turning to 2's and leading to a crash if moused over.
EDIT: when using spectrum
Hovering over Modded enhancements in the Collection crashes the game:
Enhanceapi hasn't been working for a long time now
Afaik the only enhancement ever made for it were xcards
Maybe @hexed birch could port it to smodded enhancementapi eventually
Ah.. I see 
-# ... any Examples for working Enhancements I could follow then?
Ortalab has a lot of them
The new demo
Ay, Thank you!
