#šŸ’»ćƒ»modding-dev

1 messages Ā· Page 370 of 1

bold sleet
#

gonna run some test first, hold on

#

hey, @manic rune. Does your cursor... fuck itself like that?

runic pecan
#

What is the default shop_rate of Tarots and Planets?

manic rune
#

^

bold sleet
#

So your cursor does that

#

I am guessing

manic rune
#

yeah

bold sleet
#

ok

runic pecan
#

Did SMODS overwrite Card:open?
Edit: a quick check reveals they did not.

soft echo
#

how does one turn a joker into an eternal joker

primal robin
pale venture
soft echo
#

than you

bold sleet
wintry solar
#

why would I respond to a random waving dm, if you have a problem and want my help just message me the full details and if I have time I'll have a look but if not don't go bitching about it to everyone else

bold sleet
#

for fuck sake it was the id all along

manic rune
#

also, that reminds me of the cheat uis ngl

#

idk if thats intentional, but thats neat

bold sleet
#

No and yes.

#

The original UI was more minimalistic

#

But I decided to leave this one because it looked neater.

#

You can make the background invisible.

manic rune
#

this is what i meant btw :p

unborn bay
#

OH GOD

#

GD JUMPSCARE

bold sleet
#

I mean, it works and looks neat

manic rune
#

thats true

pure salmon
#

how do i hook to draw_card again

manic rune
#

https://forums.kleientertainment.com/forums/topic/129557-tutorial-function-hooking-and-you/ i suggest reading this so you know how to hook to pretty much everything :p

Klei Entertainment Forums

In LUA, it is a very important concept to understand that everything is a variable and all variables may be edited in runtime. This includes functions. With modding other peoples' LUA files, like Klei's basegame code, you may find yourself wanting to run your code before or after the original fun...

maiden phoenix
#

Use SMODS.Drawstep instead

manic rune
#

but also, ^ what sdm said if you are doing what i think you are

pure salmon
#

trying to get this joker working

#

i need the tally to increment every time a card is drawn from the deck, someone gave a solution with hooking draw_card up but i don't know what parameters to pass to draw_card

runic pecan
#

Can someone remind me again what is the target value for patching smods files?

wintry solar
#

Use context.hand_drawn

runic pecan
hybrid shadow
#

bump

pure salmon
red flower
red flower
tired kestrel
#

I don't know how you work in general

#

can I just tell you in DMs?

#

or here?

#

also I didn't mean to be "b***hing" about.

#

I am new alright?

#

but now I need to take this into note.

bold sleet
#

hey, is there a way to update this litol numba'?

pure salmon
pure salmon
bold sleet
#

That doesn't update the text.

#

Just the internal value

pure salmon
#

unsure then

languid mirage
#

multiplayer mod updates that number

tired kestrel
#

Alright eremel I sent you the DM in FULL detail.

tired kestrel
#

just like what you wanted me to do.

manic rune
pure salmon
red flower
#

yes

runic pecan
manic rune
#

šŸ¤” are you sure you have the correct target

red flower
#

is your lovely updated

runic pecan
faint yacht
haughty cargo
#

I am struggling to work out where the data about the cards in the main section of the shop are, can someone help me please

manic rune
#

how do i:

  • check the current stake
  • check what deck the player is currently using?
wintry solar
cobalt iron
#

Is there a way to increase the amount of shop slots?

hushed estuary
#

I’d look in card:apply_to_run() for that

wintry solar
haughty cargo
#

it adds the num to shop size btw

pure salmon
zealous mauve
cobalt iron
#

thank you

zealous mauve
#

yes

#

thank you!

sturdy monolith
#

trying to set my mods icon but I'm getting this error?

modern kindle
#

Good schmorning chat

haughty cargo
# sturdy monolith

i would assume the icon path should be from the mod root, so is the icon in the main folder for the mod?
e.g: Balatro/Mods/<yourmod>/bearo_icon.png

sturdy monolith
wintry solar
#

You’re redefining the atlas function here

sturdy monolith
#

THANKS

#

that works
awesome

manic rune
modern kindle
#

My goat bepis

manic rune
modern kindle
#

Oh hell yea

#

Can you make higher tier fragments with lower tier ones

manic rune
#

searching soulfragment, SoulFragment, SOULfragment should all work

modern kindle
#

Ie 9 rare make 1 legendary

manic rune
#

i want them to still reference balatro in some ways

modern kindle
#

They reference balatro in rarity :)

zealous glen
#

Is there a command to dislay the bounding boxes?

cobalt iron
#

why do my jokers have a sell value of 0, I did add the price value

zealous glen
#

or keybind

shell timber
#

that's part of debug mode right(?)

zealous glen
primal robin
#

It exist but I don't remember keybind

modern kindle
#

Hi vic

zealous glen
#

Hello dilly how are you

primal robin
haughty cargo
#

I am trying to access the items in the shop, and I am struggling to find where the actual data of what is there, such as the joker/consumable IDs (j_joker, c_mercury etc.), can someone help me please?

primal robin
#

card.config.center.key

modern kindle
#

How are you?

zealous glen
zealous glen
shell timber
#

h?

zealous glen
frosty rampart
#

press a and g

zealous glen
#

Some of my Jokers have weirdly-sized boxes

lucid owl
#

anyone know why global variables (set in G.GAME) could evaluate as nil instead of an integer? i haven't been able to replicate the issue, but crashes are happening to other people when the game uses that variable in a card description. the only mods that both people have installed are talisman and cardsleeves

#

after checking the lovely dump, said variable is declared normally too which is confusing

marble flint
#

which variable in particular?

#

one thing that could be happening is the serialization/deserialization of G.GAME during a save/load cycle, but that's supposed to just automatically work

lucid owl
#

but when referenced in a card description, it's seen as nil (only in two cases though, and i haven't been able to replicate it)

hybrid shadow
#

bump

lucid owl
#

the lovely dump for one of the reports shows that the variable is declared perfectly normally

sullen fern
#

i know this is looking too far into the future but how would i add modded jokers to am object type

#

wouldn’t the game crash because it’s looking for an object that isn’t loaded

#

(referring to jokers from mods that aren’t active)

#

i know people add cases for stuff like this

sullen fern
#

i would have to add the balatro-kai jokers to their respective tribes afterwards but

#

there’s no easy way to do that

#

because my load order goes tribe, other, consumable, joker, mod-compat

cobalt iron
#

can calc_dollar_bonus use negative numbers?

wintry solar
sullen fern
#

yeah that’s what i want

#

the tribes (seperate object types) are loaded first

#

then i make the ui display a badge that shows which tribe a joker is in

#

then i load stuff like editions

#

then consumables

#

then the mod’s jokers

#

then mod compatabilty related stuff

#

i don’t know if i can just, tell smods to load whatever in whatever order i want

wintry solar
#

No what I’m saying is it doesn’t matter what ā€œorderā€ you try to load stuff, smods has an order that it runs through in terms of all the different objects that you cannot alter

sullen fern
#

ah.

wintry solar
#

You just tell smods ā€œI would like to create these objects pleaseā€ and it handles all the rest

sullen fern
#

so i just cram all my stuff into a single lua

#

the main lua that is, with all the ā€œassertā€s

wintry solar
#

If you want to handle navigating a giant file sure

rapid stag
#

help. working on return to hand functionality and for some reason the returned card is flipped down and non-functional

all i can figure out is that 'down' doesn't matter. i tried 'up' and it's the same

sullen fern
wintry solar
#

Oh yeah

sullen fern
#

that’s what i usually do

somber kiln
#

can someone help me i want to create some jokers mod idk where to start

sullen fern
#

so i want there to be a badge right above the rarity that shows which tribe a joker will be in

pure salmon
#

am i using context.destroy_card wrong? this code is supposed to delete the leftmost king if there's two in the scoring hand. the xmult triggers properly so i know it's not the tally code

sullen fern
#

uh

#

idk actually

lucid owl
sullen fern
#

so, what do i need to know before i start making an entriely new ui thing

wintry solar
sullen fern
#

it's nothing too big, just a small badge

#

but it's still something ui related

#

and i'm scared

primal robin
#

That's it

stiff locust
#

how do I check stake stickers for decks

pure salmon
sullen fern
#

well that doesn't sound reassuring

primal robin
#

It's even worse

stiff locust
sullen fern
#

yeah that

stiff locust
#

yeah hold on a sec

sullen fern
#

but for the yo-kai tribes

#

each tribe is a seperate object type and i want them to appear for each joker in said object type

primal robin
#

Easiest thing in UI is G.OVERLAY_MENU imo

stiff locust
#
set_card_type_badge = function(self, card, badges)
        badges[#badges + 1] = create_badge(localize('k_localize'), G.C.EDITION, G.C.WHITE, 1.2)
    end,

put this in the object like the calculate function
badges[1] replaces the first badge, badges[#badges + 1] adds a new badge (probably)

#

replace k_localize with whatever you want it to be

sullen fern
#

how do i do that for existing jokers.

stiff locust
#

one color is for text, one color is for background

stiff locust
#

that one should be on the wiki

sullen fern
#

that would take so long though

stiff locust
#

not rly

sullen fern
#

having to take ownership of all 150 basegame jokers

stiff locust
#

.

sullen fern
#

just for a little badge

wintry solar
stiff locust
#

why do you need to add a badge to all the vanilla jokers

sullen fern
#

because

stiff locust
#

run take_ownership inside a function and get it to iterate through the list and do it to all of them for you

wintry solar
#

You don’t need to do that

#

Just patch where badges are created

red flower
#

if you plan to do that with other mods as well I would do that

rapid stag
#

i was about to suggest iteratting through that list and taking_ownership that way, similar to what i do for planets

sullen fern
wintry solar
#

Find the badge bit in generate ui and add your badges to that table

sullen fern
#

okay okay i think i might need to clarify on what i want to do more, both for myself and everyone else
so, each joker that's a part of a tribe gets a rarity-type badge denoting which tribe it's a part of.

#

so what i need to do is patch the badge creation code to allow for that to happen

#

just have it generate the badge for each joker in the tribe object type

wintry solar
#

Yeah that’s what I told you how to do

sullen fern
#

i don't know how to patch things.

#

haven't had to do that before

wintry solar
#

Then go and learn šŸ˜‚

#

It’s possible with a hook but you’ll have to rummage through ui tables to do that

stiff locust
#

the function iterate option is an option if you want to avoid learning

sullen fern
#

i guess that’s what i’m gonna have to do then

#

oh boy, time to iterate through every basegame joker

stiff locust
#

it is being treated as a card on the deck that you drag around

sullen fern
#

bit of a hacky solution but what can you do

stiff locust
#

you need to do your hand stuff before the card is "sent to the deck"

#

and stop the card from being sent

stiff locust
sullen fern
stiff locust
#

you have lists

sullen fern
#

iterate through the LISTS. i see

stiff locust
#

yeah

sullen fern
#

iterate through each object type

stiff locust
#

the only code that needs to change is the joker you're adding to and the badge you're adding

sullen fern
wintry solar
#

Patching is not hard

#

Take the five minutes to learn it

#

And save yourself hours of future time

sullen fern
#

look, i’m sorry, but if i’m seeing an easier way out then i’m taking it

#

don’t blame me for not wanting to jump through AS many hoops

stiff locust
#

i agree with eremel here

#

but people are lazy

sullen fern
#

okay, fine, i’ll bite. where do i learn patching

#

tell me a good resource.

stiff locust
#

i have no idea

#

i stole my first patch from another mod and then figured it out from there

red flower
wintry solar
#

And just look at any toml file in smods

rapid stag
sullen fern
#

okay so i’m weighing the options. it’s either i sit my ass down and learn something for once, or i take the lazy way out

stiff locust
sullen fern
#

and this is all on me

stiff locust
#

i think you should patch the original function

rapid stag
pure salmon
#

this should only destroy the leftmost king but it destroys all of them

lucid owl
#

anyone know why global variables (set in G.GAME) could evaluate as nil instead of an integer? i haven't been able to replicate the issue, but crashes are happening to other people when the game uses that variable in a card description. the only mods that both people have installed are talisman and cardsleeves
said var is just juggler_count = 0

stiff locust
stiff locust
wintry solar
lucid owl
wintry solar
#

Where as the patching way shouldn’t cause any issues

lucid owl
#

but it's being evaluated as nil despite being declared in G.GAME

sullen fern
lucid owl
#

i haven't been able to replicate the issue at all

stiff locust
lucid owl
stiff locust
#

when does the value get created

lucid owl
#

when a run is started

#

it's lovely patched into G.GAME

wintry solar
#

Do you have the crash screen?

stiff locust
#

???

lucid owl
#

as in, set as a global var

stiff locust
#

just put a set_ability in the joker and check if G.GAME.juggler_count exists there, if it doesn't, set it to 0

#

the lovely patch isn't necessary

#

set_ability runs when the joker is spawned in any capacity so that guarantees the value exists before you hover over it

lucid owl
lucid owl
sullen fern
#

so, where the hell am i going to be patching in new badge

wintry solar
#

And can you show the juggler code and the patch?

lucid owl
lucid owl
sullen fern
#

and how do i make sure that the correct badge is set for the correct object type

stiff locust
#

the guy in rift raft had this issue too and idk how they fixed it

#

missing's rift card copying only worked for them and nobody else

#

cause it was a G.something

sullen fern
stiff locust
#

uhhh find it

#

generate_ui

wintry solar
stiff locust
#

if you have visual studio, open a workspace with the source code and ctrl + shift + F

#

lets you search in all files in workspace

sullen fern
#

should i use the lovely dump of it?

wintry solar
#

Yes

stiff locust
#

yeah

#

while they're on that does anyone know how I can get stake completion for a deck

#

i need a joker to access that

sullen fern
lucid owl
#

this is the entire patch, i'm on mobile so let me just send the card's file real quick

#

ik the patch syntax is a bit weird but eh

sullen fern
#

or am i on the right track here

wintry solar
#

Yeah that sounds right

#

It should have some stuff about AUT.stuff

red flower
#

badges are in G.UIDEF.card_h_popup

red flower
#

in UI_definitions

#

around here

wintry solar
sullen fern
#

i am in the wrooong place, holy shit

wintry solar
#

This will crash in the collection

sullen fern
#

i was in card.lua before

#

but now i should be checking here

lucid owl
pure salmon
lucid owl
#

why will this crash in the collection? am i not covering for edge cases right?

wintry solar
#

You assume G.GAME exists

sullen fern
#

now what do i do

#

is this the part where we start kicking

#

and by kicking, i mean hijacking the code

red flower
#

you want to do soemthing like this

lucid owl
sullen fern
#

i have a toml file at the ready

red flower
#
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = "AUT.main.background_colour = AUT.main.background_colour or AUT.box_colours and AUT.box_colours[1] or nil"
position = 'before'
match_indent = true
payload = '''
badges[#badges + 1] = ...
'''
wintry solar
#

You want a unique line a bit lower down than that screenshot

red flower
lucid owl
wintry solar
sullen fern
#

yeah i found that line

lucid owl
#

it should be easy to make sure G.GAME exists

sullen fern
#

this is what my toml looks like right now

red flower
#

you need the header manifest as well

wintry solar
#

Then just make a function that takes the card object and returns the badge and call it there

sullen fern
#

wait i'm realizing something

#

something a bit odd

#

how is it supossed to know which tribe to assign which badge to

zealous mauve
#

queston: how much lua do i actually need to know to make balatro mods?

sullen fern
#

or do i supply it with that info myself

#

i see.

#

do i also supply it with color info too?

wintry solar
#

So your function should do the logic

#

And create the badge

red flower
sullen fern
#

reiterating that each tribe is a seperate object type

#

so i need to add loc vars to my mod then

#

for each tribe

red flower
#

i mean you can hard code the string if you dont care about localization

sullen fern
#

ok yeah

#

that works

#

do i just replace the k_localize with my own string

red flower
#

i have something like this for my yugioh types

sullen fern
#

so how would i hardcode the string

#

is it as simple as just, "fuck your loc string, we're using my own"

red flower
#

just write "whatever" instead of localize('k_whatever')

sullen fern
red flower
#

no you don't want the function there

hybrid galleon
red flower
#

there's no creator god, i just put it there for completion

#

it's only one card and im probably not gonna add it

hybrid galleon
#

lol that makes sense though

sullen fern
hybrid galleon
#

I'm not even sure if you can do a code to win a run immediately

red flower
#

oops

#

wrong ping

red flower
# sullen fern

badges[#badges + 1] = create_tribe_badge(card)

and then in your mods file:

function create_tribe_badge(card)
  return create_badge("Brave", G.C.EDITION, G.C.WHITE, 1.2)
end
#

and you replace the logic in that function to do what you want

grand sage
sullen fern
#

for each joker in each tribe object type

red flower
#

yeah

sullen fern
#

okay, double checking. is this all my toml should be

red flower
#

imo yes

sullen fern
#

so now i don't have to look at that ever again.

#

imo it wasn't THAT hard

#

idk what all the fuss was about

#

imo, it was probably a yo-kai.

#

now what? do i load the toml with an assert?

#

or does the toml load automatically

red flower
#

no it's loaded automatically as long as it's in the top folder and named lovely.toml OR it's in a lovely folder

sullen fern
#

okay so i have a lovely folder

#

code is still a bit barebones and it probably won't do anything important yet because i have yet to make the badge appear for every member of a tribe

red flower
#

does it work

#

all cards should have the brave thing

sullen fern
#

you're right, let's see if it actually runs.

#

even modded jokers

#

everything has a brave badge though...

red flower
#

yeah you need to check if card is a joker and stuff

sullen fern
#

might as well flout my own textrue pack for a bit

#

okay, flouting time is over.

#

time to actually fix this shit

wintry solar
#

Yeah nows the time for the logic check

sullen fern
#

okay. time to put you through the wringer. and probably give you the correct colors too

placid star
#

is it possible to add the texture of spectral to jokers?

chrome widget
#

How do you determine whether you're in the shop after a small/big/boss blind? I believe the blind is temporarily unset inside the shop until you hit next round so I don't believe you can check the upcoming blind type when you're in the shop directly

sullen fern
chrome widget
hybrid galleon
#

Maybe I'm asking a stupid question, can I make variations of a hand type, playing this variation gives different base chips and mult compared to the base hand type, but the variation shares the same upgrade level and which planet to upgrade the hand, so the only difference is the base chip/mult
I know it's easier to just make a bunch of new poker hands for each of them, but if I do so then it should be very hard to build towards a specific poker hand, as all of them now have separate upgrade levels

chrome widget
#

Oh!! There's a global G.GAME.blind_on_deck

sullen fern
gusty iron
#

how would i create a random tag?

sullen fern
#

i had a bit of a ball rolling here and i lost it out on the road

#

there is a caaaar...

gusty iron
#

and it is

#

going to hit me

#

ah

hybrid galleon
sullen fern
#

okay but seriously i need some help here
i forgot the function that makes it so something happens to only a specific object

pure salmon
#

i'm going mad why does this delete every king and not just the first one

sleek cliff
#

I'm trying to make a new type of planet card, but when I try to discover it, it crashes my game

wintry solar
sleek cliff
hybrid shadow
sullen fern
sleek cliff
pure salmon
sullen fern
#

if it works with jokers surely it works with object types too

hybrid shadow
sleek cliff
#

there is no line 2982

hybrid shadow
hybrid galleon
#

did you added the new hand type while created the planet

wintry solar
gusty iron
#

it works :)

sleek cliff
sullen fern
pure salmon
hybrid galleon
#

just do a new run

hybrid shadow
sullen fern
#

this is probably NOT correct.

sleek cliff
hybrid galleon
sullen fern
# sullen fern

still trying to figure out how to make this only appear on jokers

hybrid shadow
sullen fern
#

because right now

#

it appears on everything

sleek cliff
wintry solar
hybrid shadow
sullen fern
#

it would be an if statement then

#

if card is

sleek cliff
sullen fern
#

if card is a joker then,,,, badge

placid star
hybrid galleon
chrome widget
sullen fern
sleek cliff
#

there it is, but when my mouse goes over it, it crashes

pure salmon
wintry solar
sullen fern
#

so i should create every tribe badge first

wintry solar
hybrid galleon
sullen fern
#

then make the code for putting them on the jokers

chrome widget
# placid star oh?

A draw step to make the jokers display the spectral shader would quite literally just look like this:

    key = 'joker_shine',
    order = 11,
    func = function(self)
        if self.ability.set == 'Joker' and self:should_draw_base_shader() then
            self.children.center:draw_shader('booster', nil, self.ARGS.send_to_shader)
        end
    end,
    conditions = { vortex = false, facing = 'front' },
    conditions = { vortex = false, facing = 'front' },
}```
pure salmon
wintry solar
#

Yes

hybrid shadow
sullen fern
chrome widget
#

Check in the SMODS repo to see what existing DrawSteps there are and STEAL

wintry solar
sleek cliff
wintry solar
#

You just need to work out what the correct badge is first

sullen fern
#

the correct badge SHOULD be the badge for each corresponding tribe

#

eg: brave jokers get the brave badge

wintry solar
#

Yes but each card is in a different tribe right?

sullen fern
#

yeah

wintry solar
#

So you need to determine which tribe the card is before you can make the badge

hybrid galleon
# sleek cliff

maybe instead of process_loc_txt just do a normal localization, this is what I did for my own custom planets

hybrid shadow
hybrid shadow
sullen fern
#

so it should just iterate through all these jokers then

lofty sand
#

could someone describe what pseudorandom and G.GAME.probabilities.normal are used for? I assume card.ability.extra.odds is the listed probability on the card in the config = { extra = { odds = _ } } ?

hybrid galleon
# sleek cliff

I saw you did a custom badge, and did localize('k_planet_q') for the badge name, did you forgot to add it to the localization file perhaps?

wintry solar
sleek cliff
#

I didn't even know I needed one until now

sullen fern
#

i'm just lost on where to actually start

#

keep in mind that this is my first time doing this kinda thing
the toml was easy, but this is much harder

sleek cliff
hybrid galleon
sleek cliff
#

don't think so lol

hybrid galleon
#

then just erase the localization part and replace it with a string you want

hybrid shadow
hybrid galleon
#

instead of localize(k_planet_q), just do whatever name you want to

sullen fern
#

and i would do this for every other tribe

#

right

wintry solar
#

What other things are tribes going to do other than the badges?

hybrid shadow
sullen fern
#

well, the yo-kai watch joker works alongside jokers of other tribes

frigid blaze
#

How do you address the jokers that are on hand?

hybrid shadow
frigid blaze
sullen fern
sullen fern
#

and for booster pack pool reasons

somber kiln
#

does anyone know how to do the balatro jokers for my mods?

hybrid shadow
sleek cliff
#

ah

hybrid galleon
#

that badge thing is what the planet card's badge shows

sullen fern
hybrid galleon
#

like Planet X is Planet? and Pluto is Dwarf Planet instead of Planet

sullen fern
#

much like how crypid has the food jokers

#

and the meme jokers

sleek cliff
hybrid shadow
sullen fern
#

food jokers are still a seperate object type though

hybrid shadow
hybrid galleon
# sleek cliff eugh

do this badges[#badges + 1] = create_badge('skaro', get_type_colour(self or card.config, card), nil, 1.2)

dull sage
#

This is going to be a long shot. I have a seal that will sometimes copy the effects of other seals, could the SMODS.blueprint_effect work to copy the seal?

hybrid galleon
#

or just erase the entire set_card_type_badge if you don't really want a custom badge

#

it's purely for cosmetics, it works all fine if you don't have a custom badge name

hybrid shadow
placid star
#

how do you make custom pools?

hybrid shadow
hybrid galleon
hybrid shadow
sullen fern
#

it’s adding the badge to everything because i haven’t told it to only put it on jokers yet

#

still haven’t figured out how to make it apply to only jokers

runic pecan
#

This is supposed to "add 3 random enhanced odd cards", but crashed upon use.
Does anyone know where the issue is?

hybrid galleon
# sleek cliff

ok, you should not name it's key planet, if you're at least planning adding more

sleek cliff
#

so change the key name, got it

#

damn it

hybrid galleon
#

and it's strange to see you have 'flush_Flush' as your hand type, I'm pretty sure you're wrong

sleek cliff
#

ah, cause thats what it was like in the example

sullen fern
hybrid galleon
sleek cliff
#

ohh

hybrid galleon
#

are your mod prefix flush? I don't think that's the case

sleek cliff
#

hah, no

wintry solar
hybrid galleon
#

this is an example of mine, it upgrades my custom hand named Chroma and bjwd is my mod prefix

hybrid shadow
#

if i have a sticker, and i want to detect if the sticker is on a card held in hand, what would that look like? would it just be if context.cardarea == G.hand?

hybrid galleon
#

sticker on hand? is that possible? or you mean seal

hybrid shadow
sleek cliff
#

back to square fucking one

hybrid galleon
wintry solar
#

@sullen fern ```lua
function create_tribe_badge(card)
local tribe = get_tribe(card)
return create_badge(tribe, G.C.EDITION. G.C.WHITE, 1.2) -- adjust these values
end

function get_tribe(card)
local tribes = {'Brave', } --Add keys for other types here
for _, tribe in ipairs(tribes) do
if SMODS.ObjectTypes[tribe].cards[card.config.center_key] then return tribe end
end
end

hybrid shadow
hybrid galleon
sleek cliff
#

I'm not trying to make a new hand, just a new planet

wintry solar
#

remove the generate_ui = 0

hybrid galleon
#

that's confusing? why would you make a planet if you didn't add any new hand types?

grand sage
sleek cliff
#

to make it upgrade two handtypes instead of one

hybrid galleon
#

you have to hard code the use function to make that

sleek cliff
#

well son of a bitch.

sullen fern
#

what do i replace the "_" with

wintry solar
#

nothing

grand sage
#

cryptid has planets that upgrade multiple hands right?

wintry solar
#

dont change anything I sent for now

sullen fern
#

all of the cards STILL have the brave tag

placid star
sullen fern
#

did i mean all of the cards?

#

i mean EVERYTHING.

#

even the tags still have them

wintry solar
#

oh woops I missed a line hold on

#

add if tribe then above the create_badge line

#

and an end after it

sullen fern
#

hey, it works!

#

only the brave tribe jokers have the brave badge

#

now to change the color of the badge

#

i think i can just use a hex code

wintry solar
#

does each tribe have a colour?

sullen fern
#

each tribe is associated with a different color

wintry solar
#

add the colours to the object types

#

then you can put SMODS.ObjectTypes[tribe].colour in the function

sleek cliff
#

there goes my planet plans

sullen fern
sullen fern
wintry solar
#

yes

sullen fern
#

how exactly would i do that

wintry solar
#

add colour = HEX('hexcode') to each object

hybrid shadow
sullen fern
wintry solar
#

no

sullen fern
#

does it need quotes around it

#

the hexcode i mean

wintry solar
#

yes it needs to be a string

sullen fern
wintry solar
#

yup

placid star
#

where is SMODS.ObjectType 's stroed

sullen fern
#

do i keep it as "tribe" or do i replace it with the tribe key

wintry solar
#

keep it as tribe

#

tribe is a dynamic value based on the card you're hovering on

sullen fern
#

wait i forgot to make one of them a string

#

got it to show different colors for different tribes but the badge still just says "brave"

wintry solar
#

yeah you changed the value

grand sage
#

=]]

sullen fern
#

idk why canio doesnt have a badge

frigid blaze
#

The value of 1 comes right away no whistle is in hand or not j_fut_testing, what is the correct way?

wintry solar
#

you probably typed his key wrong

sullen fern
wintry solar
#

should be j_caino

#

and this should be tribe

placid star
#

how can insert cards into my pool?

frigid blaze
rapid stag
frigid blaze
sullen fern
frigid blaze
#

I need to make a check if there is a Joker in my hand, if yes to return =1.

#

???

sullen fern
#

gilgaros and slurpent finally have effects

hybrid galleon
#

I made a lot of new hand types based on suits and that made normal Five of a Kind builds nearly impossible to play lol

#

if you want an ordinary five of a kind you must have a 2+1+1+1 combination suit-wise or it'll be another poker hand

loud vortex
#

bump

sullen fern
frigid blaze
#

I need to make a check if there is a Joker in my hand, if yes to return =1.

frigid blaze
stiff locust
#

SMODS.find_card creates a list of all instances of the card

maiden phoenix
#

It should be G.jokers.cards btw

primal robin
cyan lagoon
#

how can i create a tag?

red flower
#

add_tag(Tag("key"))

cyan lagoon
#

a random one?

zealous glen
#

keep in mind you need to do more work to make sure Orbital Tags work

red flower
onyx sonnet
red flower
zealous glen
red flower
zealous glen
#

so I'd just use that

onyx sonnet
#

i dont think i do?

zealous glen
#

also do you do anything with applying Edition shaders to soul sprites

red flower
#

not anything more than what you posted on the smods discord no

onyx sonnet
#
SMODS.Joker {
  key = "jokERROR",
  config = { extra = { } },
  unlocked = true,
  discovered = true, 
  blueprint_compat = false,
  eternal_compat = true,
  perishable_compat = true,
  rarity = 2,
  atlas = "EmeraldJokers",
  pos = { x = 0, y = 1 },
  cost = 8,


  calculate = function(self, card, context)
      if context.before and not context.blueprint and G.GAME.current_round.hands_played == 0 then
        local suit = pseudorandom_element(SMODS.Suits, pseudoseed('vandalised'))
        for k, v in ipairs(context.full_hand) do
                G.E_MANAGER:add_event(Event({
                    func = function()
                        v:juice_up()
                        v:change_suit(suit.key)
                        return true
                    end
                })) 
                v.base.suit = suit
        end
        return {
          message = localize('k_ERROR'),
          colour = G.C.PURPLE
        }
      end
  end
}

this is the joker that causes it

frigid blaze
sullen fern
#

i’ve never really made a booster before

#

how would i do that

abstract peak
#

i think it happened once i installed Talisman

red flower
#

or is it a string normally?

onyx sonnet
#

iirc its a string?

red flower
#

then you're assigning it wrong

onyx sonnet
#

oh

#

what would be the correct way

faint yacht
#

assert(SMODS.change_base(card, suit))

red flower
#

suit.key? maybe idk

sullen fern
red flower
#

or change all the logic to use that

onyx sonnet
#

thank you both!

red flower
red flower
onyx sonnet
#

yeah i changed it to .key and it worked

#

thanks!

rapid stag
#

bumping my issue - working on return to hand functionality and for some reason the returned card is flipped down and non-functional

'down' doesn't matter. i tried 'up' and it's the same

patching the original function instead of hooking into it makes no change, the behaviour is the same.

red flower
#

can you show me the definition of draw_card pls

onyx sonnet
#

not sure how that looks though, never interacted with stickers

rapid stag
red flower
#

yeah it's the stay_flipped argument

hybrid shadow
rapid stag
#

ah, i see it. so i need to adjust how i call the function cirDerp thanks

abstract peak
#

Could I get a 2nd set of eyes on this maybe?

https://github.com/SpectralPack/Talisman/issues/79

I've looked through the source code and also my inflated save file and I'm struggling to come up with what would cause this.

I tried to find numbers that are just like half defined or something but nothing. Maybe some number is not set when it needs to be? but I couldn't find anything like that.

I can try to post my save file if it helps.

#

it's crashing on e_ify so the exponent is nil? idk how that would happen

rapid stag
# red flower yeah it's the stay_flipped argument

i was about to say that i adjusted the function to pass false for stay_flipped to no effect, but i looked at draw_card() and... the stay_flipped argument appears to do nothing? cirDerp do i need to patch draw_card() to make it take stay_flipped into account

pure salmon
#

how do i make a joker do something when a card retriggers

onyx sonnet
#

i think ill go back to my original method but with the key

daring fern
sullen fern
#

does anyone have a booster sprite template

daring fern
polar star
#

is there SMODS.has_enhancements key for no enhancements?

daring fern
polar star
#

yeah pretty much

daring fern
polar star
#

I thought maybe there was like m_none or something

sullen fern
#

actually aikoyori's mod actually has blank booster sprites

abstract peak
polar star
#

I might be missing somethin

daring fern
polar star
#

sorry I should've given more context

#

I'm checking the playing card during scoring, since I'm making a joker that activates on non enhanced cards when scored

polar star
#

yeah it gives an error when trying context.other_card in the code you suggested

#

not with card though

#

actually nevermind same with card

onyx sonnet
polar star
daring fern
polar star
#

yea

#

along with context.cardarea == G.play

daring fern
polar star
#

ok wait it might just be my code editor marking it as an error when it isn't

#

lemme test in game first

polar star
#

yeah it works, it was just me being stupid

#

thanks :>

red flower
rapid stag
red flower
#

context.stay_flipped let's you keep cards drawn from the deck flipped like the blinds do

#

before it existed i patched the functions

#

let me look at the code and ill get back in a sec

sturdy compass
#

That’s a thing??? dissolved

red flower
wispy sparrow
#

trying to make my very first joker, although i'm not sure what context is needed when a hearts or clubs card scores

red flower
# red flower oh i think i got it

your returntohandfunc is evaluated in the if statement but it doesnt return anything so it never passes the check, so the game then tries to run the original draw from play to discard and flips the card

rapid stag
#

ahhhhhhhhhhhh

#

that makes sense

red flower
wispy sparrow
pure salmon
#

the code conditional on the tally isn't activating (everything after if tally >= 2 then)

wispy sparrow
#

and apparently there's an unexpected symbol near '=' on line 32, which is supposed to represent if the joker's discovered or not

#

oh wait maybe it has to do with the comma just before it

pure salmon
#

yeah that was the issue

#

thank you

loud vortex
#

bumpin'

wild escarp
#

Is there some good reference code to use for making blinds?

glad osprey
wild escarp
#

That stuff is so confusing.

red flower
#

blinds have calculate functions now so you can treat them like jokers

glad osprey
#

oh yea I forgot source code doesn't have that

glass scaffold
wild escarp
#

Already been looking at that, just wondering if there's any fully fleshed out blind code I can look at for reference.

glad osprey
wild escarp
#

Thank you!

abstract peak
stiff locust
#

can info_queues use joker values as variables

#

from the card they are on

shut crater
stiff locust
#

i need a value from a specific joker

#

to display on an info queue

#

because the value scales per joker

shut crater
#

what card is the info queue on

stiff locust
#

a joker

#

the joker that has that value

#

i'm hoping i can refer to loc_vars returned values with #1# and such like in a joker's description

#

is it that easy

red flower
#

{ set = "Joker", key = key, vars = {} }

#

i think

#

and you put what you would in loc_vars in vars

shut crater
#

or the localize function

red flower
#

no you add that to info_queue

stiff locust
#

that's something you would put inside a loc_vars to get it to pull an info_queue from somewhere

#

which is the opposite of what I want

shut crater
#

oh interesting

red flower
#

i dont understand what you're asking honestly

shut crater
#

I think they want an info_queue box to pop up but to use a variable from the joker creating the info_queue

#

instead of just using the other center's normal values

red flower
shut crater
#

unsure, I've never done that before and I'm not at my computer

zealous glen
#

does anyone know how to send args to shaders (manually)

stiff locust
#

oh oh the vars = argument

red flower
#

yeah

flint fern
#

how do i texture a modded thing in malverk
if you dont know, are there any example malverk texture packs that textures modded stuff?

spiral crown
#

is anyone able to give an example how they add their consumables to the collection? I have been unable to figure it out by looking at other mods

shut crater
#

did you add a custom consumabletype?

spiral crown
#

yea sorry should have been more clear

shut crater
#

(not that that changes the answer, those get added automatically too)

spiral crown
#

new type

zealous glen
#

@shut crater do you know how to pass args to shaders directly

shut crater
zealous glen
shut crater
#

try looking at the Sprite:draw (maybe it's called Sprite:draw_card ?) function

#

ah

zealous glen
#

I'm calling draw_shader

rapid stag
#

someone remind me how i shallow print a table again?

shut crater
shut crater
gusty iron
#

how do i access the current chips?

shut crater
#

the current chips for the blind or the currently scoring hand?

gusty iron
#

like

#

the scoring hand

#

i think

#

yeah

zealous glen
#

I'm not using any SMODS.Shader method

#

and I don't think I should based on vanilla's Card.draw and the SMODS.DrawSteps that I'm looking at

shut crater
# gusty iron the scoring hand

can you more specifically describe the intended effect cause there's like 15 different kinds of "current chips" and I want to give you the right one

#

(slight hyperbole but there are like 3 or 4)

gusty iron
#

when the joker is triggered, i want it to do the tangent of the current chips

#

not blind chips, the scoring chips

shut crater
#

I hate it
use hand_chips, it's a global variable

gusty iron
hallow forge
#

math

zealous glen
red flower
#

math

shut crater
#

as a math tutor I cringe

red flower
#

mult is mult tho

gusty iron
#

heres what they all do

red flower
#

hey this is just like in the hit videogame the world ends with you

shut crater
gusty iron
shut crater
#

valid

gusty iron
#

i would KILL for a ui helper tool

shut crater
#

it just opens a webapp in a new tab

#

and you fill it out there

gusty iron
#

true

hallow forge
#

r u insane

gusty iron
#

i know how to crash the game via jokers too

#

os.exit() go brrr

shut crater
#

while true do
hand_chips = hand_chips + 1
end

#

oops that's python

#

too many languages in my head

gusty iron
#

"what the hell"
repeat all cards in hand 2^900 times

zealous glen
shut crater
#

this joke is getting too close to becoming a reality

gusty iron
#

i might do that

#

yeah

placid star
#

has anyone made their own shaders? looking at the .fs files it seems like itd be hell

shut crater
#

shaders are dark magic and the toll they extract is emotional

placid star
#

haha i dont need to learn them for anything i want to implement but is there anyguides on how to make them? or how to learn

shut crater
#

Love2D uses a slight variant of GLSL so you can just learn GLSL

placid star
#

damn, did it take u long to learn?

shut crater
#

who said I learned anything lol

#

I struggled through it and technically have a working shader

placid star
#

lmaoo

shut crater
#

(I had some minimal shader experience prior)

shut crater
placid star
shut crater
gentle rain
#

wait nvm

#

just saw something crucial

sullen fern
#

does anyone have symbol ideas for the fighter, the malicious, and the leviathan?

#

i already have a bit of a theme going with the ones i already made (that being fictional languages)

#

symbols will simply not do.

spiral crown
#

okay, followed the github for 'ConsumableType' and it appears in collection now but the name on the button is ERROR? Tried using the key 'name' to fill in a value but no dice... anyone know the problem?

nova eagle
#

i have 2 questions... where would i put it so that it removes $200 every time the death save is used?

nova eagle
#

also how do i change the saved by dr.bones text?

shut crater
shut crater
#

or at least it didn't used to be

gentle rain
#

tried adding a hook to the ease_dollars function and now its just negating all money earned nothing?

sullen fern
#

al of which are from chants of sennaar

shut crater
sullen fern
#

i dont want to be just limited to chants of sennaar though

nova eagle
gentle rain
wispy sparrow
#

real quick, how do i set mult and chip gain to the highest number they reached previously

gentle rain
shut crater
wispy sparrow
shut crater
sullen fern
#

rock bottom, from the binding of isaac

wispy sparrow
shut crater
#

I've never played šŸ˜”

spiral crown
wispy sparrow
#

not sure how i'm gonna get the chip and mult gain to fit that logic though

shut crater
shut crater
placid star
#

how would i patch my game to allow me to change this line? do i need to use .toml??... i hate toml

spiral crown
cobalt arrow
#

How difficult is the code for this?

placid star
cobalt arrow
placid star
#

but considering that the draw runs off a pseudorandom line i belive, probably VERY difficult

cobalt arrow
#

this idea was so cool for Athena 😭

placid star
#

easier than changing how you fundamentally draw cards

gentle rain
#

fifteen jokers :D

#

time to work on my consumable type :3

nova eagle
#

am i right to just assume this will spawn in the soul spawn pool?

pure salmon
#

how do i get the cost of a card in context.buying_card and does it scale with clearance sale/liquidation

placid star
nova eagle
#

ok

#

so i just spent like 10 minutes looking for a soul for nothing

#

cool

placid star
#

and yes it does scale with vouchers

pure salmon
#

good, thank you

hybrid shadow
#

how do i have a voucher that doubles (and a tier 2 voucher that quadruples) the chances of select rarities appearing

placid star
#

e.g for rare being double as common def weight could go from 0.95 to 0.90

hybrid shadow
#

?

winged kernel
#

is there a way to store data in a sticker? the normal config = {} doesn't seem to work at all

umbral zodiac
#

anyone know why this consumable use code doesn't work? [crash below]

use = function(self, card, area, copier)
        card.ability.extra.active = not card.ability.extra.active
        
        local temp = copy_card(card)
        temp:add_to_deck()
        G.consumeables.emplace(temp)
    end,
#

i might be a bit braindead but i have no clue what the problem is since card is evidently not nil

hybrid shadow
gentle rain
#

if i want to keep my code in a file other than main.lua, do i have to write code that says to load that script, or does smods just load every lua file in my mod?

placid star
umbral zodiac
winged kernel
placid star
umbral zodiac
#

yea im trying to make it so it just copies itself, as it's meant to just be a toggle for an ability rather than a one-time thing

placid star
hybrid shadow
umbral zodiac
#

ooh thank you

winged kernel
#

hovering cause of the description

hybrid shadow
winged kernel
#

i'm just in the collection lol

hybrid shadow
short girder
#

how do i add repetition to this so i can stop the calculation from triggering 7 trillion times instead of once ?

winged kernel
faint yacht
short girder
#

okay !

faint yacht
winged kernel
#

ah that's unfortunate on my end

#

let me fix that then

hybrid shadow
winged kernel
wispy sparrow
#

i just got another idea for a joker: it acts like mr bones but instead of self destructing once it's used, it takes money from you. once you get into debt the joker won't save you

placid star
#

how can i hook my own joker to also have holograms shader

quartz ravine
#

Wow this is such a great idea, I am pissed

hybrid shadow
quartz ravine
red flower
#

let me look

shut crater
#

(not the debt part though)

hybrid shadow
#

but also how tf does weight work

hybrid shadow
red flower
red flower
hybrid shadow
red flower
#

i mean weight is relative to all other weights

#

so you would have to calculate it based on those

hybrid shadow
#

knowing the percent doesnt help if i dont know how its expressed

red flower
#

i know

#

sorry i cant be more helpful

#

you can print SMODS.Rarities and look

glass scaffold
#

Would it not be like 0.1 = 1% weight?

#

Lower is rarer and higher is more common?

red flower
#

if you have only one 0.1 weight that would still be 100%

shut crater
# hybrid shadow how would that be expressed in weight

(assuming the default values N provided are correct)
Common has a weight of .75
Uncommon has a weight of .2
Rare has a weight of .05
The sum of their weights is 1 so they have probabilities of 0.75/1, 0.2/1, and 0.05/1, respectively
Adding a rarity called Blork with a weight of 0.4 doesn't change the weights of the others, but it changes the sum of the weights to 1.4
Now Common has a probabilty of 0.75/1.4, Uncommon is 0.2/1.4, Rare is 0.05/1.4, and Blork is 0.4/1.4

red flower
#

if you have 0.1 and 0.1 each is 50%

wild escarp
#

Is it possible to make non animated blinds?

placid star
#

what is the easiest way of applying the hologram shader to another jerkler

red flower
#

do what hologram does but in the jokers draw function

placid star
shut crater
hybrid shadow
red flower
#

yes

pure salmon
placid star
red flower
pure salmon
#

oh yeah how do i chance the dollar value without dollars = because that sends a message

shut crater
red flower
#

there's probably a way to make that not send a message but i dont remember rn

hybrid shadow
shut crater
hybrid shadow
shut crater
#

I would guess G.GAME['key'] = G.GAME['key'] * 2
but I've never done this before, I'm just going off of documentation

nova eagle
#

how do i change this to all cards instead of face cards only?

shut crater
umbral zodiac
#

how could i make a consumable give 0.5xmult in context.post_joker

shut crater