#(Very Early) Modded Customized Deck

1 messages · Page 1 of 1 (latest)

boreal knot
#

This is a simple template mod showcasing how you can add your own customized deck into the game. It's very rough and SMOD will probably support it better some day so I'm not willing to put that much more effort into it.

To add some pointers:
-Replace any instances of "Hearts" with any other suit you wish to modify
-The key values in Atlas must match the value in G.COLLABS.options... with _1 for normal and _2 for high contrast

If you want to see a mod that makes better use of the template with multiple examples check out this mod: #1278135842774319195 message

open hull
#

I was literally just about to Google this exact question when I saw a new post in the modding channel, thank you king SDM_0 🙏

heady path
#

cool

open hull
boreal knot
#

Maybe you can edit G.COLLABS.pos into your mod to add said rank

open hull
cursive wren
#

nope, it's hardcoded so it only changes if the card has "King", "Queen" or "Jack" as its rank

boreal knot
#

Maybe I'm completly wrong lol, I know Guigui typping rn has been messing with it more than me

cursive wren
#

lmaooo yea

open hull
#

ahhhhhh I think COLLABS.pos refers to the position of the sprite in the spritesheet

cursive bone
#

I guess thunk has forced my hand and I shall finish working on alt textures

boreal knot
cursive wren
#

okay so my version tries to not use steamodded (although i haven't tested it without steamodded) and just uses a Lovely patch

boreal knot
#

How do you handle custom textures?

cursive wren
#

adding them to game.lua

boreal knot
#

Now I know why my previous path wasnt working when I used a lovely patch..

cursive wren
#

so far the only custom textures i've done are just porting the french+ localization mod's R/D/V symbols

#

(also annoyingly it has to be changed in a locale file, so i doubt it would 100% be usable without steamodded unless i figure out how to patch localization files through lovely)

boreal knot
#

RenDez-Vous

cursive wren
#

so true

cursive bone
#

You can’t patch loc files

cursive wren
#

yeah no you need steamodded to add/edit lcoale strings

cursive wren
#

...now i wonder how doable it'll be to extend this to whole suits

boreal knot
#

To modded suits especially

cursive wren
#

btw here's what the ui looks like with all the cards of a suit

cursive bone
#

that's very cluttered

boreal knot
#

True

cursive wren
#

yup...

cursive bone
#

cough cough steal the galdur layout cough cough

cursive wren
#

found out how to extend the cards panel

winter sable
#

that sounds like disaster for modded ranks

cursive wren
#

unfortunately it only patches in the vanilla ranks

winter sable
#

the usual hardcodedness huh

#

me when I don't SMODS.Rank

cursive wren
#

i have not searched where ranks are stored

#

<- lovely user 😔

winter sable
#

they're always hardcoded

cursive wren
#

makes sense /neg

winter sable
#

same for suits

cursive wren
#

yeah i've noticed

cursive bone
#

same for everything 🙃

winter sable
#

... fair

cursive wren
#

hardcode it till you make it :D

#

okay uhhhhh that was not the result i was expecting but also that was the result i was expecting

#

also technically the amount of cards displayed was hardcoded instead of dependant on faces

cursive bone
#

first time looking at thunk code?

cursive wren
#

yup defluenceur

#

imma go take a shower i need a break from this mess 😭

#

but yeah this is my first time patching balatro code
modding-wise i've done one custom joker with steamodded before but that's it

boreal knot
hot plume
#

im really really new to coding, especially LUA (i want to learn) so im not sure why, as numerical cards seem to be defined as '2' '3' etc.

#

ah sorry, you also need to add <or _front.value == 'Ace'> to this, i do not remember what file is this, its either globals.lua or misc_functionalities.lua

hot plume
#

after pressing the button in settings

cursive wren
#

yup!

#

yknow they should make it so that every deck can specify what ranks they modify

#

fym they, ill just do it myself hang on

kind narwhal
#

Curious if theres any more information regarding the possibility of enabling the customization of numbered cards (2 - A.) i’m know little about coding but from what I read in this thread a hardcoded limit to face cards prevents this?

cursive bone
#

I am in the process of writing a much improved version of it

kind narwhal
#

Can’t wait!

cosmic plaza
#

putting it in the init function for the mod makes it not work, or was the mod init phased out at some point?

#

i.e the function SMODS.INIT.ModName()

cosmic plaza
#

actually it looks like this doen't work if you have an init function at all

cosmic plaza
#

this is not a great solution, but if you want the most brute force way of full deck support for customized decks this patches it to display and allow for 2-ace. The custom deck will need all of 2-ace, it doesn't support gaps. It sounds like Eremel is already working on a better solution, but if you just want to play around with it this works for the curent build

sharp falcon
#

has someone made stuff for making custom face cards for all suits

opal garnet
cosmic plaza