#đŸ’»ăƒ»modding-dev

1 messages · Page 368 of 1

hybrid shadow
#

you replied to atlas.lua

shut crater
#

Ah sorry, I meant main

#

You may have to do some research to see if you can disable smart quotes

#

Or just as a test try copy pasting a straight quote everywhere you see a curled quote

hybrid shadow
#

should the keys be red when done properly

shut crater
#

What do you mean red

hybrid shadow
shut crater
#

That looks right

#

The colors are a little different for me but that seems like it's actually picking them up as strings now

hybrid shadow
#

so this one is the phone's fault, brb to fix that

celest timber
#

sometimes when i use this G.FUNCS.discard_cards_from_highlighted, the game just doesnt redraw the cards to fill the hand size

hybrid shadow
hard mica
#

how can i make a custom rarity btw?

tall wharf
#

why does this still retrigger

hybrid shadow
#

do i need to do anything special to have my tarot card appear in packs or will it do that by default

sullen fern
#

grafics...... desigmn,..

#

i was originally going to use this image for the nate joker but i found the little sprited nate to be funnier

wintry solar
wintry solar
hybrid shadow
#

actually i can probably look at the cryptid code for that one huh

#

yup got my answer from there

tall wharf
cyan lagoon
#

?

tall wharf
#

alr

cyan lagoon
#

how i can make this retrigger (as in joker retrigger)?

sullen fern
#

eight legendaries.

#

one for each tribe

wintry solar
cyan lagoon
#

if you hit the 1 in 4, it triggers twice

wintry solar
#

Probably something like checking for the retrigger context and just giving the consumable, it should only count as having triggered if you hit the chance initially

hard mica
#

does anyone know all the rank ids of the played cards?

cyan lagoon
mystic river
cyan lagoon
wintry solar
analog spoke
#

is there any guide that tells you how to make your own "soul" style consumable? by this, I mean, having a custom rarity, then, having said custom rarity only show up via a custom consumable which makes them
this would be my first real consumable btw

#

this is what I have so far btw, just the skin of a rarity, really

pale venture
#

Hey, just to check, there isn't a straightforward way to make a tag impossible to copy even by other mods' tags right? For example cryptid's triple/quadruple/quintuple tags.

cyan lagoon
hybrid shadow
#

not gonna ping bc i dont need an answer from any specific person, but starting on the second half of this and wondering if this looks right

pale venture
# cyan lagoon

Probably stupid question but did you enable joker retriggers? It's an experimental feature

cyan lagoon
#

of course

tawdry shale
#

been getting this error while trying to add sounds

loud vortex
#

bump

sturdy compass
# tawdry shale

Can you show your sound implementation? Both the creation of the Sound object and the usage of it

lofty sand
#

hey does anyone know the color for xchips in steam modded, or where that might be listed in the smod wiki?

sullen fern
sturdy compass
# tawdry shale

First off, I don't think it's the sounds causing the problem, but I can't find the line that's crashing in the vanilla code because of all the injects on my end. Secondly, this would not function in your intended way, as joker_main check would never go off due to local booleans being reset every calculate call, and your loop would stop as soon as one of the criterias are met due to the returns

red flower
analog spoke
lofty sand
#

I blame it on not wearing my glasses

sullen fern
# sullen fern

if anyone knows what the thingies are on the blinds then uh, idk. you can have a slice of cheese or something.

dull sage
#

Is there any example anywhere of a Blueprint Joker implementation?

sturdy compass
#

Check the vanilla code

analog spoke
wintry solar
tawdry shale
sturdy compass
cyan lagoon
wintry solar
#

You need brackets around the chance check

tawdry shale
sturdy compass
wintry solar
tawdry shale
wintry solar
# cyan lagoon

Oh, you set active to 0 and then check if it’s not zero

sturdy compass
sturdy compass
#

Yeah starting a new run is probably your fix

sullen fern
#

before i impliment ANY jokers. i want to implement the yo-kai tribe system

#

i’ve been saying this before but i want it to be a seperate variable i can slap onto any joker

cyan lagoon
sullen fern
tawdry shale
red flower
sullen fern
#

i have 9 tribes that i want to impliment from yo-kai watch. brave, mysterious, tough, charming, heartful, shady, eerie, slippery, and wicked

#

i’m not including enma and wandroid because those two are very niche and don’t really fit balatro

sturdy compass
sullen fern
#

can i do that actually?

analog spoke
#

how would I make a joker that adds +1 Shop Slot WHILE in said shop?

#

basically, like, a freebie, I guess

#

idk

#

maybe I should think on this more, lol, idk what'd be best here balancewise, lol

red flower
sullen fern
#

like this

analog spoke
modern kindle
#

good schmorning modding crew

analog spoke
#

what are the weights of the base game rarities btw?

modern kindle
#

thats my goat N right there

analog spoke
#

she says hi

modern kindle
#

who the heck is dat

analog spoke
#

crispy, she commits arson <3

faint yacht
# sullen fern
set_badges = function(self, card, badges)
  badges[#badges+1] = create_badge("texthere", backgroundcolor, textcolor, scale)
end
analog spoke
#

anthropormophic pretzel creature <3

modern kindle
#

arson is not healthy for longevity

red flower
# sullen fern

i would patch the part of G.UIDEF.card_h_popup that add badges and use some function like get_card_tribe(card) to add the corresponding badge
there are multiple ways you can tag the cards tho, i dont know which specific one would be best

#

i would probably make a table of all the cards with a tribe for each in a file and then after hook some function that runs after all mods load that adds a field to each center called yokai_tribe = list[key]

but that's the first thing that comes to mind

sullen fern
#

yo-kai medals are different from the usual consumables so there probably WON’T be a spectral yo-kai medal

#

unless.

modern kindle
#

make them better than spectrals, make them ethereals

high sinew
#

for this joker it is supposed to check the playing card and if it has enhancement in geneneral it seems to be not working and adding xmult for scoring

#

it just adds +.1 xmult for each enhanced card in scoring hands

shut crater
#

so right now it adds +.1 for each enhanced card, but you want it to be +.1 if the hand contains an enhanced card

#

is that right?

red flower
high sinew
#

yes scoring hands

high sinew
red flower
#

next(SMODS.get_enhancements(card))

marble hatch
#

Hey, where and how do I begin modding, and is there some documentation I can find to help me?

high sinew
shut crater
# high sinew yes scoring hands
  1. Don't use context.individual for this (otherwise the code will get run for every card you play)
  2. Check context.scoring_hand, not G.play.cards (G.play.cards includes unscored cards)
  3. Use N's suggestion for checking for enhancements
high sinew
shut crater
#

(shoutout N)

shut crater
#

context.before is probably best

cobalt arrow
#

what's the difference between SMODS.Consumable and SMODS.ConsumableType?

shut crater
cobalt arrow
#

oh a got it right so

#

thanks chase

#

where's the doc for SMODS.ConsumableType? I didn't find in Git

cobalt arrow
#

oh it's in ObjectType

#

thanks again Chase

#

It's possible making a text Italic with TypeStyling?

analog spoke
#

did I mess something up here? the rarity isn't displaying correctly :<

#

it's showing up as a white backed "ERROR"

scarlet spire
#

is straight detection hardcoded to account for shortcut? how can I make a joker do the same thing as shortcut?

red flower
scarlet spire
#

saw this, but the code confuses me

#

what is the double not?

#

also, would this not potentially break if another mod does the same thing for its own shortcut-type joker

red flower
#

yeah it would, you would need to probably patch get_straight to not break

red flower
tawdry shale
scarlet spire
#

ahh okay

red flower
scarlet spire
#

yeah I work off of the lovely patch dumps

red flower
#

yeah but the original isnt patched

scarlet spire
#

oh wait is get_straight redefined in utils?

red flower
#

smods completely replaces it

#

i think it's in smods/overrides

scarlet spire
#

oh wait this one doesn't even look for the specific jokers

red flower
scarlet spire
#

oh okay yeah I have to patch the poker hand part in smods game_object.lua

#

now I just have to remember how to patch smods files

#

the format is different, right

red flower
#

'=[SMODS _ "path"]'

#

as the target

scarlet spire
#

thanks

sullen fern
sturdy monolith
#

how can i have it so that localization is completely disabled for a specific edition?

turbid maple
#

like a joker with a specific edition doesnt get localized?

red flower
# hybrid shadow bump

the first argument of pseudorandom_element has to be a table like {"option1", "option2"}

turbid maple
#

like some sort of edition that forces your jokers to be in french?

sturdy monolith
hybrid shadow
turbid maple
#

oh that looks sick

red flower
# hybrid shadow

yes but you still need the parenthesis to give it the second argument pseudorandom_element({...}, pseudoseed(...))

sturdy monolith
#

so yeah either i need a way to display a shader on them without needing an edition or i need to disable the localization ui for those specific editions

red flower
#

you can use draw or a DrawStep for that I'm pretty sure

sturdy monolith
red flower
#

like this

turbid maple
#

never did anything with shaders but I know Hologram uses one in the base game

hybrid shadow
red flower
#

that looks fine

sturdy monolith
#

nvm didn't pay attention

#

lemme try that out

red flower
sturdy monolith
#

like this?

red flower
#

yeah

sturdy monolith
#

Oki lemme see if this works

#

nope

hybrid shadow
scarlet spire
#

what is the right method here?

sturdy monolith
daring fern
#

I finally fixed this by hooking SMODS.calculate_individual_effect instead of using func

red flower
sturdy monolith
scarlet spire
#

here's the full patch

red flower
#

also if you're doing an 'at' patch there's no much difference from the take_ownership thing

scarlet spire
#

do I have to patch the entire line in order to do that?

#

the idea is that the patch still contains the original pattern, so anyone patching that pattern would still be able to patch on top of this as if it didn't exist

red flower
#

yes, you can maybe use regex to not overwrite it completely but idk

#

but anyone else would have to sidestep your patch too

#

that's why i said it was probably better to patch get_straight

scarlet spire
#

would I just be setting skip to 1 in the get_straight function if the joker is owned?

red flower
#

skip is a boolean so just skip = skip or not not next(SMODS.find_card(...))

#

you probably hook too

sullen fern
scarlet spire
#

oh right it's a bool, okay yeah

sullen fern
#

like, actually implementing the tribes

red flower
#

when i made my mod i did all the yugioh type stuff beforehand too

sullen fern
#

so all the tribes should be like, a seperate object type, right?

red flower
#

yeah

#

thats what makes sense to me at least idk

sullen fern
#

so the shady tribe would be its own seperate object from the heartful tribe

red flower
#

yeah, objecttypes are more like lists of objects most of the time

#

i would look into how mods like cryptid do the food jokers

sullen fern
#

if the joker is a part of a specific tribe it’ll have a tribe badge

#

if it’s not a part of any tribe then it’ll just have no badge

#

i just impliment all the tribes and then apply them to all of the basegame jokers

#

just have one big “vanilla.lua” for all of the basegame jokers and their tribes

scarlet spire
#

okay wait, this is still crashing lovely, what?

cobalt arrow
#

is there a way to check the current ante in the code?

lofty sand
#

If I'm trying to make a joker that copies the ability of adjacent jokers, is there a better way to do that than merging their effects into a single table?

daring fern
gusty iron
#

Pro tip! os.exit() just closes the game! Dont know if youll ever need this, but its good to know!

sullen fern
#

still have no idea where to start in terms of actually making the tribes real though

#

all i know is that they’re all gonna be seperate object types

cobalt arrow
daring fern
tired kestrel
#

I've arrived.

cobalt arrow
#

sorry

red flower
scarlet spire
chrome widget
#

Need a little help: I have a card here that causes retriggers lucky cards, and I want to juice/flare it every time the lucky card is retriggered. However, although I have a good place to trigger the first visual (in time with the 'again') text, I'm not sure the best way to add it on each successive instance

red flower
# scarlet spire

this looks similar to the outdated lovely error but idk what it means

chrome widget
#

What I do right now is just call the visuals on the consumeable before returning from the repeititon context

    G.FUNCS.csau_flare_stand_aura(card, 0.38)
    G.E_MANAGER:add_event(Event({
        trigger = 'immediate',
        blocking = false,
        func = function()
            card:juice_up()
            return true
        end 
    }))
    return {
        message = localize('k_again_ex'),
        repetitions = gold_count * reps,
        card = context.other_card
    }
end```
scarlet spire
#

I guess I'll try updating lovely?

cobalt arrow
#
  key = 'Odysseus',
  set = 'Homerus',
  atlas = 'Homerus',
  pos = { x = 0, y = 0 }
  loc_txt = {
    name = 'Odysseus'
    text = { 'Retriggers the first {C:attention}King{} played',
      'after using this card the number of times',
      'equals the current {C:attention}Ante{}',
      '{C:inactive}s"What if I the Monster?"{}'}
  },
  config = {
      repetitions = G.GAME.round_resets.ante
    }
  


 function use (self,card, area)
if context.cardarea ==G.play and context.repetition and context.other_card:get_id() == 13 then
  return {
    message = localize('k_again_ex'),
    repetitions = self.ability.repetitions,
    card = self

  }

}``` Is this code right?
scarlet spire
#

okay yeah updating lovely fixed it

cobalt arrow
chrome widget
#

Hello!!!!

modern kindle
#

how are you my friend

chrome widget
#

Doing decent!!

modern kindle
#

:D

hybrid shadow
#

how do i make loc_vars in my SMODS.Consumable so that when something else changes the variable, it also changes in the localization file

brisk rose
#

finally done with this for the time being :3 It's part of @willow plinth 's reimaging of elbe's card exporter, but I decided to take the shader thing on. I ended up reimplementing the relevent draw steps and sprite draw routines, lol

#

most of the code is directly ripped from smods and the base game, just adapted for rendering off screen

daring fern
hybrid shadow
shut crater
daring fern
shut crater
chrome widget
hybrid shadow
red flower
chrome widget
#

Does that time them in the event queue correctly?

#

That doesn't sound right, admittedly

red flower
#

hmm it would time it after the message i think

#

if you use func

shut crater
cobalt arrow
#

oh

hybrid shadow
chrome widget
#

You also can't use extra tables in the repetition context without getting a warn (which may be completely benign obv if you don't actually have debug tools)

red flower
shut crater
chrome widget
#

Wixard, the vars table in the loc_vars return table is an array of values. You pass in the number of variables you want, and then you reference them in the localization text using #1#, #2#, #3#, etc, where the number is the position in the passed array

chrome widget
red flower
#

recently might have been like 3 months ago tho im bad at time

lofty sand
#

yo, how does copying vanilla jokers work? since they don't have a calculate function I'm not sure what I should use

chrome widget
#

Copying how?

#

Like with Blueprint?

lofty sand
#

like blueprint, yeah

chrome widget
#

Also they technically do have a calculate function, in the sense that all jokers call the vanilla Card:calculate_joker() function, and just go through the vanilla logic if it doesn't find an SMODS calculate function and return early

lofty sand
#

ah okay, cool

chrome widget
#

Otherwise you kinda just have to copy the blueprint logic, which is, uhh, this whole thing

shut crater
red flower
chrome widget
#

Definitely not all of them. Some specific jokers are overwritten, but SMODS leaves a lot of them vanill as possible

cobalt arrow
#

How can I determinatecan_use(self, card) for only when a round is being played?

chrome widget
red flower
#

i love undocumented functions

shut crater
#

documentation is optional

cobalt arrow
#

yes

red flower
#

G.GAME.blind.in_blind

cobalt arrow
#

thanks

hybrid shadow
primal robin
chrome widget
hybrid shadow
#

the plan was to have a joker somewhere else in the mod that doubled the effects of all tarot (including the one im working on rn)

chrome widget
#

So yeah you'd store a value in config or config.extra, and then you access it via card.abillity or card.ability.extra in the loc_vars function

#

Is the relevant number the highlight count?

hybrid shadow
#

yeah

chrome widget
#

So in your consumeable defintion, you would have

    extra = {
        highlight = 1
    }
}```

And then in `can_use` and `loc_vars`, you call `card.ability.extra.highlight` when you need to compare the number of how many can be highlighted

However, in `use`, you'll need to make a for loop to loop through all the highlighted cards rather than just applying to a single one
tired kestrel
#

Hey, good question.

chrome widget
tired kestrel
#

I know I've asked a lot

#

but right now I'm having troube about

hybrid shadow
chrome widget
hybrid shadow
chrome widget
#

You'll want to also check for can_use that it's between 1 and your highlight limit. For example in the vanilla game, you can highlight only one card with Hierophant to apply the Bonus enhancement to

#

And you don't need to check for it twice btw

#

Curently you're doing the same check twice in a row and returning if both are true (which will always be true)

hybrid shadow
chrome widget
#

oh wait I see the second checks for consumeables

#

Hmm then you'd need to also highlight the same amount of consumeable which is not what you want

#

Genuinely I don't think you need the latter check

hybrid shadow
#

ill just remove it

tired kestrel
#

Hey has anyone got a moment? otherwise I'll wait.

hybrid shadow
chrome widget
#

Basically, whenever can_use is called, it's when the consumeable itself is highlighted

#

In which case, the number of consumeable highlights will always be 1, because you can't highlight more than one at a time

hybrid shadow
#

right

#

now how would i do the for loop

chrome widget
#
    -- your code goes here, 'v' is the card you need to apply the sticker to
end```
shut crater
chrome widget
#

your same sticker appliation code that you're already using

tired kestrel
#

Waht it's supposed to do is copy a random playing card effect

chrome widget
#

But when you pass in card to apply, you use v instead of what you were using before

tired kestrel
daring fern
tired kestrel
#

I thought it was just more than seals

chrome widget
#

Nope

#

Oh, that's what you meant by "the blank"

#

The underscore is used to basically "exclude" a key or a value from an iteration

#

It just means it's unused

#

You literally put the underscore there _

daring fern
hybrid shadow
shut crater
chrome widget
#

You have the do way earlier, it would give you a compilation error

hybrid shadow
#

otherwise it's alright?

chrome widget
#

Also you need to call :apply(v, SMODS.Stickers['hmlt_br_st'].key), since it's a function

#

Erm, wait, that's wrong

hybrid shadow
#

'hmlt_br_st' is the key for the sticker

#

or is that not what you meant

chrome widget
#

I think maybe you just pass in 'true' as the second argument?

#

I'm not as 100% on stickers as I am on some other stuff, they're a bit weird

hybrid shadow
#

from what's been told to me they act the same as seals

#

so whatever code is applied to seals also probably applies here

red flower
#

nah for seals it's just :set_seal(key), stickers are different

#

afaik

hybrid shadow
chrome widget
#

do :apply(v, true)

hybrid shadow
chrome widget
#

Think so

red flower
#

no comma after apply

tired kestrel
#

sorry for the delay

hybrid shadow
hybrid shadow
chrome widget
#

Yeah, commas are for table declarations

red flower
#

no, because it's a statement

daring fern
hybrid shadow
chrome widget
#

Test it out

#

You'll know if it's broken if you test it

hybrid shadow
#

i cant test it for another few hours, so will update when i can

chrome widget
#

Ah, hrm

#

How do I arbitrarily nest tables within tables?

#

Smth smth recursive function here

red flower
hybrid shadow
chrome widget
#

No, I need to do it at arbitrary depth depending on a variable

#

Which is more complicated

tired kestrel
daring fern
red flower
tired kestrel
#

not sure if I needed to start a new run

daring fern
chrome widget
tired kestrel
chrome widget
#

Like yes I do understand vaguely how this works but ughhhhh reference tables hurt me

#

It shouldn't be as complicated as it feels trying to wrap my head around it

lofty sand
daring fern
tired kestrel
red flower
tired kestrel
#

alright let me try that and see.

#

but also

chrome widget
lofty sand
chrome widget
#
main_end = (self.area and self.area == G.jokers) and {
    {n=G.UIT.C, config={align = "bm", minh = 0.4}, nodes={
        {n=G.UIT.C, config={ref_table = self, align = "m", colour = G.C.JOKER_GREY, r = 0.05, padding = 0.06, func = 'blueprint_compat'}, nodes={
            {n=G.UIT.T, config={ref_table = self.ability, ref_value = 'blueprint_compat_ui',colour = G.C.UI.TEXT_LIGHT, scale = 0.32*0.8}},
        }}
    }}
} or nil```
red flower
daring fern
chrome widget
#

I believe Blueprint/Brainstorm's self.ability.blueprint_compat_ui value is set in Card:update and it just checks every frame (which is bad, you can do it much more efficiently than vanilla does it)

tired kestrel
lofty sand
tired kestrel
#

so yes.

#

that's what I was trying to do based on that description

red flower
chrome widget
#

Personally I use localization files because I find it a little easier, but whether or not it's easier depends very heavily on how decentralied you want your information for certain things to be

red flower
#

if you need to localize a message you need a loc file as well as some objects that don't allow loc_txt

chrome widget
#

Ultimately I think they're better if you have multiple localizations

#

Plus yeah, for a number of things, you'll need to put arbitrary loc strings such as in the dictionary table which isn't item-based

tired kestrel
lofty sand
#

cool, I'm sold lol

#

I'll look into making one

daring fern
tired kestrel
#

or an area of the code?

daring fern
tired kestrel
#

alright.

chrome widget
#

I realize you said you're already sold but for example, we use localization files for a bunch of assorted flavor callouts that cards do when activated as well as hold all the text for custom badges since it's the best centralized location for it

tired kestrel
chrome widget
#

You've got a syntax error. Check your code, it should appear red around where it's missing a brace

daring fern
primal robin
#

Practice shows that localization files just better

#

Use them

tired kestrel
chrome widget
#

Hm. Now I'm getting an error saying a return table for this doesn't have repetitions in it.........

#

oh wait I see

tired kestrel
chrome widget
#

I think the the topmost table in the nest doesn't have it

daring fern
tired kestrel
#

ah.

sturdy monolith
tired kestrel
#

Now it did work!

#

But theo nly thing missing is getting thep laying card to display "Copied!"

#

Is this possible?

tired kestrel
chrome widget
#

Whelp, triggering this after the Again text is the best I've got

#

I guess that's alright

daring fern
red flower
tired kestrel
#

to see the result

sturdy monolith
red flower
#

maybe that works? I don't know if the whole UIBox needs the property too

tired kestrel
brisk rose
#

composited externally

#

i'm gonna have to find a lua gif library, lol

sturdy monolith
red flower
#

yeah that's what I was saying, I think the whole tooltip is not clickable

tall wharf
#

😭

sturdy monolith
#

OHH
oh that makes sense

red flower
#

you might be able to add the property tho

#

i think card.ability_UIBox_table.states.click = true might work

frigid blaze
#

What am I doing wrong?

sturdy monolith
red flower
#

you might need to do it in a hook tho, loc_vars might be too early

red flower
frigid blaze
sturdy monolith
red flower
#

yeah sounds right

red flower
brisk rose
frigid blaze
red flower
frigid blaze
red flower
#

you also need the modifier you want after the =

frigid blaze
#

I need default_weight = 1

brisk rose
# brisk rose

huh, it's definitely sped up. I still think 60 frames at 20fps is a good idea, just gotta put the right value to add to G.TIMERS.REAL and G.TIMERS.REAL_SHADER. I just realized what I did wrong

brisk rose
#

I think it's the compositing I did wrong

#

I did one frame every 5/100 of a second instead of 1/5

sturdy monolith
brisk rose
sturdy monolith
red flower
#

oh sorry it's
.click.can = true

#

also try
.collide.can = true

brisk rose
red flower
#

i remember messing with those for jokerdisplay

sturdy monolith
brisk rose
#

just updating the timers works to animate shaders in my experience. I just gotta update them right, lol

sturdy monolith
brisk rose
#

which I am doing i think

#

one second

brisk rose
#

I'm curious if it looks weird

sturdy monolith
sturdy monolith
brisk rose
frigid blaze
#

It's not working

brisk rose
sturdy monolith
red flower
zealous glen
brisk rose
frigid blaze
sturdy monolith
red flower
brisk rose
#

anyway, here's the tentacle shader at the proper speed

frigid blaze
#

I want my Joker to increase the chance of other Jokers falling out, how can I do that?

sturdy monolith
zealous glen
brisk rose
sturdy monolith
brisk rose
#

but maybe it was a mistake

#

idk thunk is thunk

brisk rose
sturdy monolith
zealous glen
wheat pulsar
#

hi, i want to do a function like is_face(), this make sense? ;;

function Card:is_stone(from_boss)
    if self.debuff and not from_boss then return end
    local id = self:get_id()
    if SMODS.has_enhancement(context.other_card, "m_stone") then
        return true
    end
end```
sturdy monolith
pure salmon
#

how do i check if a card is unenhanced? is it just SMODS.has_enhancement(context.other_card)

red flower
daring fern
sturdy monolith
#

nvm i guess

zealous glen
#

Something reacting with something other than đŸ€”

red flower
#

quantum enhancement stuff

pure salmon
#

still don't know what a quantum enhancement is lol but i see why that check works

red flower
#

basically just multiple enhancements on a single card

#

never used it tho

brisk rose
#

I have been looking at that code for days

sturdy monolith
wheat pulsar
zealous glen
red flower
frigid blaze
#

I want my Joker to increase the chance of other Jokers falling out, how can I do that?

sturdy monolith
wheat pulsar
red flower
#

consider making a function when your code is like >3 lines and repeats in various places

wheat pulsar
#

ohh okay

#

so the function look like this?

for _, removed_card in ipairs(context.removed) do
if SMODS.has_enhancement(context.other_card, "m_stone") then stone_cards = stone_cards + 1 end
  end
red flower
#

yeah

wheat pulsar
#

I have a problem with the logic of the calculate, when a stone card is destroyed gain chips

            local stone_cards = 0
            for _, removed_card in ipairs(context.removed) do
                if SMODS.has_enhancement(context.other_card, "m_stone") then stone_cards = stone_cards + 1 end
            end
            if stone_cards > 0 then
                card.ability.extra.chips = card.ability.extra.chips + stone_cards * card.ability.extra.chips_gain
                return { message = localize { type = 'variable', key = 'a_chips', vars = { card.ability.extra.chips } } }
            end
        end```
brisk rose
#

does anyone know how to accomplish animated gif encoding in a mod?

#

like taking png data frames from love and encoding a gif

sturdy monolith
#

could probably make it also work with gifs

brisk rose
red flower
brisk rose
brisk rose
sturdy monolith
brisk rose
#

if that makes any sense

analog spoke
#

so, uhm, turns out, yet another problem exists with iridescent joker, lmao 😭
so, the thing is, uhm, it didn't remove the effect on remove, before, so I uh, I tried to add a remove from deck effect, and with it, I also tried to turn something that used to be a local into a config var and now it's having all sorts of problems, I don't even know anymore 😭

brisk rose
#

like technically I'm in a run, but all the output is off screen to files

wheat pulsar
red flower
#

ohh yeah sorry, it should be removed_card instead of context.other_card

sturdy monolith
#

i have officially given up on trying to add a button to go to the original shader and have instead resorted to doing this

wheat pulsar
pure salmon
#

is there a way to get a joker to do something every time a card is drawn from the deck?

red flower
#

a joker is not drawn from the deck normally

#

you mean when obtained?

sturdy monolith
red flower
#

yeah but it's funny

sturdy monolith
red flower
#

i think you can use context.stay_flipped or context.hand_drawn?

sturdy monolith
#

like this

pure salmon
modern kindle
#

i beg of people to utilize snipping tool

daring fern
sturdy monolith
sturdy monolith
red flower
sturdy monolith
pure salmon
red flower
#

context.hand_drawn can do that

pure salmon
#

is there a way i can get the amount of cards drawn by using context.hand_drawn, then?

sturdy monolith
red flower
#

that gets called every time draw_from_deck_to_hand is

wheat pulsar
#

to return a message is only this?

return { message = localize { type = 'variable', key = 'a_chips', vars = { card.ability.extra.chips } } }

i make my own dictionary to work but the message doesn't appear

dictionary = {
      k_lucky = "Lucky",
      a_chips="+#1# Chips",
    }
red flower
sturdy monolith
red flower
pure salmon
#

doesn't need to

red flower
#

??

sturdy monolith
red flower
#

?????

pure salmon
#

i want it to work when ANY card is drawn, including from booster packs

#

that is a card drawn from the deck

sturdy monolith
red flower
#

the booster pack doesnt use draw_card i dont think either anyway

sturdy monolith
lofty sand
pure salmon
#

oh do packs not use draw_card? hm

red flower
lofty sand
chrome widget
#

No, you can return custom text nodes to put colored text in badges like that

red flower
pure salmon
#

any time a card from your deck appears on the screen

#

so that's during blinds, and during applicable booster packs (arcana, spectral)

red flower
#

oh, ok
then use context.hand_drawn

red flower
sturdy monolith
red flower
#

what's the difference if you have all the cards

#

for that effect there's no difference

thorn flame
sturdy monolith
thorn flame
#

thoughts

pure salmon
red flower
sturdy monolith
zealous glen
shut crater
# thorn flame thoughts

in a strictly game design sense, it incentivizes uninteresting play by making the most optimal play the least fun one
but in a meme sense that's very funny

pure salmon
#

be funny if it was the other way on

zealous glen
thorn flame
#

id play it more as a low low chips joker

#

maybe it could be like ice cream

pure salmon
#

+100 chips, -1 chip for every seconds spent in this blind

shut crater
#

unless it's literally ante 1

thorn flame
#

its op if you dont like having fun

#

the downside is that it wastes real life time if you want it to be good

modern kindle
#

Then its just a free shit ton of chips

sturdy compass
#

I am a machine that turns typing into functional things GalaxyBrain
(I just made another VanillaRemade PR lol)

modern kindle
#

Can you type me up a bazillion dollars

sturdy compass
#

$100000000000000000000000000000000000000000000000

#

here you go

shut crater
#

integer overflow, you now have -$50807134500809

sturdy compass
modern kindle
#

Did

#

Did my sticker get ibliterated

#

Obliterated

#

Bepis!

manic rune
#

you can no longer send stickers and gifs (unless you send them straight from your files) here

#

hi dilly

wheat pulsar
#

hi why this message doesn't show up? all the joker works fine but the retunr message no

if stone_cards > 0 then
                card.ability.extra.chips = card.ability.extra.chips + stone_cards * card.ability.extra.chip_mod
                return { message = localize { type = 'variable', key = 'a_chips', vars = { card.ability.extra.chip_mod } } }
            end
manic rune
#

that exists now

#

and uh, stricter moderation i guess?

modern kindle
#

Mid
I'm only in this channel

manic rune
#

same

modern kindle
#

This is where the cool people are

shut crater
#

cool is a strong word

modern kindle
#

Nah
N is dope, bepis is dope, winter is dope, ice is dope, victin is dope, something is dope

shut crater
shut crater
#

do you have to add card = card to the return? I'm not sure otherwise

modern kindle
#

I fw u 2
We just haven't talked as much yet...

manic rune
sturdy compass
#

I do be a bit elusive

#

just a bit tho

modern kindle
#

My real life went to hell for awhile so ive been less active
But I wanna return large and in charge

#

Once my art is finished I'm finally releasing the first part of dilatro

shut crater
#

I've been less elusive, but time zones are a thing so maybe we don't interact as much

naive raptor
#

what's the proper code to destroy a joker?

shut crater
modern kindle
modern kindle
shut crater
daring fern
naive raptor
#

oh just that?

daring fern
naive raptor
#

i thought there was more to it

#

and then use card_eval_status_text?

lucid owl
#

can multiple enhancements be passed to enhancement_gate in a joker?

shut crater
naive raptor
#

oh yeah

#

ok thanks

#

i got confused looking at examples that did it in other ways

wheat pulsar
lucid owl
daring fern
daring fern
lucid owl
#

alright, thanks

manic rune
#

is a crafting table

sturdy compass
naive raptor
#

alright

shut crater
manic rune
#

i think it should return ERROR if the key is wrong

#

idk

shut crater
#

I think you're right so idk

wheat pulsar
#

i need to add another thing ?

wheat pulsar
tidal ice
#

chat help how in the world do I make this look better and actually like an origami heart

glad osprey
glad osprey
wheat pulsar
glad osprey
brisk rose
wild escarp
#

Anyone know why this might not be resetting when a card of suit "G.GAME.current_round.willowmod_jokeinthebox" is played?

calculate = function(self, card, context)
    if context.before and context.main_eval and not context.blueprint then
        local reset = false
        for k, v in ipairs(context.scoring_hand) do
            if v:is_suit(G.GAME.current_round.willowmod_jokeinthebox) then
                reset = true
                break
            end
        end
        if reset == true then
            card.ability.extra.x_mult = 1
        else
            card.ability.extra.x_mult = card.ability.extra.x_mult + card.ability.extra.Xmult_gain
        end
    end
    if context.joker_main then
        return {
            xmult = card.ability.extra.x_mult
        }
    end
end
#

Welp, realized after typing it out.

brisk rose
wild escarp
#

It changes every round, and this how I found it done.

brisk rose
#

so the suit itself at that location is variable?

wild escarp
#

yes

brisk rose
#

interesting

wild escarp
#

I essentially copied all the suit changing code from VanillaRemade.

gusty iron
#

how would i remove perishible/eternal/rental from a joker?

daring fern
shut crater
#

and there is no simpler way to do it in SMODS

red flower
#

the simpler way is to do it individually by card

shut crater
#

true

red flower
#

but it's a different effect then

shut crater
#

but the functionality will be different

#

yeah

gusty iron
#

like

#

for the can_use function

tidal ice
shut crater
gusty iron
shut crater
#

you'd have to iterate over G.jokers.cards

red flower
shut crater
#

check each one for any of those stickers

daring fern
gusty iron
#

yuh!!

wild escarp
shut crater
gusty iron
#

i wish

#

would make or statements so much better

red flower
gusty iron
#
    use = function(self, card, area)
local jokersyuh = {}
 for k, v in pairs(G.jokers.cards) do
    if v.ability.eternal or v.ability.perishable or v.ability.rental then
       table.insert(jokersyuh, v)
    end
local randomjoker = pseudorandom_element(jokersyuh, pseudoseed('YUH'))
randomjoker.ability.eternal = nil
randomjoker.ability.perishable = nil
randomjoker.ability.rental = nil
    end,

would this work?

gusty iron
brisk rose
#

a ref to it

#

or on the card itself rather

#

I don't think there's anything that stops you from doing that

brisk rose
#

if you mean the thing that ancient joker does

#

idk if this is similar enough to apply

red flower
#

yeah the problem is that it needs to be the same for all cards

#

you never want to save things that change per game in the center

#

but personally i just make all the effects individual so i dont need to do any of that

brisk rose
red flower
#

yeah but that's not the same for a second copy of the card

brisk rose
#

then yes do it on the center?

#

I mean yeah you have to remember to change it back

#

but eh

red flower
#

you could do it on the center but I wouldn't recommend it because you need to reset it each game

#

there's a cool smods function for these kinds of effects anyway

hasty mist
#

how do you lovely patch another mod

shut crater
# brisk rose a ref to it

technically (if I understand lua) you could put the suit in a table and store that table on G.GAME and also in the ability table of each joker and then because it's a table they would all be accessing the same object

brisk rose
#

or is this back to the same complexity

red flower
daring fern
hasty mist
#

ty

brisk rose
#

from what i know

#

lua even lets you access the locals of other functions if you want

#

iy can be wild if you do it wrong

#

:P

#

it's in the debug library ofc, but balatro does include it

red flower
#

anywhere else and you need to remember to reset it yourself and that's a bigger hassle

brisk rose
#

you don't have to do the current_round and give it a long name though

#

you can change it every round anyway

shut crater
brisk rose
#

so you'd change the suit object

#

which is a table

#

directly

gusty iron
#

should i make a balatro pixel art font to make making consumables easier

shut crater
brisk rose
#

or if it isn't a direct reference to the suit object then it'd be wheever_the_suit_centers_are[suit]

#

instad of just suit

lucid owl
#

is there an easy way of testing if something is in the current pool? i'd like to make sure my in_pool function works without having to cycle through the entire shop or anything lol

gusty iron
#

or in the inpool funcrtion

#

have it print the variable

red flower
gilded narwhal
#

How would I check if something is being added to the pool correctly other than just by rerolling a million times?

lucid owl
red flower
gilded narwhal
#

bro

#

ngl

#

I didn't even read the other message

#

lmao thank you

brisk rose
#

I've learnt a lot from fucking around with shader and draw stuff, it's dedintiely jumping right in

#

even if I was just copying vanillia and smods code and reimplementing it for the scope and purpose I was dealing with mostly

#

just adding more and more from SMODS.CardDraw and the sprite draw routines in the engine until it did the thing

#

lol

gilded narwhal
hasty mist
#

i love banner

sullen fern
#

okay, time to, well, start coding

hasty mist
#

is there a way to directly reveal hidden poker hands

gilded narwhal
#

how would you guys recommend i reword this

hasty mist
#

i would replace "gains" with "and gains"

gilded narwhal
#

and the left card and gains

hasty mist
#

maybe a comma then?

#

or do

#

"destroy adjacent cards and gains"

#

thats most consistent with how other people word things ike this

daring fern
hasty mist
#

i mean ingame

#

for testing

lofty sand
#

does anyone know how I could check for vanilla jokers being blueprint compatible?

daring fern
hasty mist
#

works thanks

hybrid shadow
#

i mean technically in Inscryption they also combine the values of the "same card" so i suppose that isnt really what youre going for here

lofty sand
#

based

gilded narwhal
#

Like

hybrid shadow
gilded narwhal
#

Does it mean just the chips? Can you stack enhancements/seals?

daring fern
gilded narwhal
#

Maybe I could just put it in an infobox

hybrid shadow
lofty sand
#

if played hand is a Pair, merge the attributes of the left card with the right?

gilded narwhal
#

Hmmm

#

How it's coded is exactly how it's worded

hybrid shadow
hasty mist
#

i think "If played hand is a Pair, destroy adjacent cards and gain their chips, enhancement, and edition" would be the most intuitive and the most consistent with other mods

daring fern
gilded narwhal
#

I didn't actually code it lmao

#

I'm just touching up descriptions in the build I'm working with

#

And I wanted to figure out the most efficient and non-confusing way to word it

gilded narwhal
#

the card does

#

This description implies the joker gains it

hasty mist
#

so does your original description though

gilded narwhal
#

OHHHH I SEE HOW THATS CONFUSING

#

OHHHH

#

What it's supposed to do is merge the stats of the right card into the left card

#

bro why are you ❓ing me I don't think it's very confusing 😭

gilded narwhal
#

man i didn't make it okay

#

snow didn't implement seals

#

I'm just gonna put a comma after "right card"

#

So it doesn't read like it's destroying both cards

hasty mist
#

maybe "destroy card to the right, the card to the left gains"

weak gate
#

how do I detect a right click? I want to open a custom window when a joker is right-clicked

gilded narwhal
hybrid shadow
#

alr finally putting the code in and it's saying this is wrong

hasty mist
hybrid shadow
sage crater
#

Wheres the wiki page with taking ownership of a vanilla thing?

daring fern
sage crater
#

Cheers

#

Ah, api docs

hybrid shadow
#

still pointing to line 36

#

saying the extra is nil

shut crater
#

what does your config look like

#

gotta give us a little more code to work with

hybrid shadow
#

1 sec

#

oh its when i try to hover over the card

hybrid shadow
#

does the path need another piece

shut crater
#

no that looks right

#

can you just show the whole consumable

hybrid shadow
#

do i need to put my loc_vars after the config (getting the screenshots of the code rn)

narrow iron
#

im trying to get the most played poker hand, this should set local hand to the poker hands name but it just sets it to nil

narrow iron
#

ahhh

daring fern
#

Also you should be setting played = v.played

#

Elsewise it'll always get the last hand on the list as long as it's been played more than 0 times.

narrow iron
#

thank you, i cant believe i overlooked that

hybrid shadow
# hybrid shadow

i removed the parenthesis from the last return since it's unnecessary but it's still saying that the extra there is an issue

high sinew
#

seems this calculates where its adding more than its supposed too

#

did .2 instead for one card

shut crater
# hybrid shadow

I honestly can't see what's wrong, I'm about to drive home so I can help you more in like an hour

daring fern
high sinew
#

wdym?

shut crater
# high sinew wdym?

You're using scoring_hand as your context check but that's a table with the scoring hand, which exists for most contexts

shut crater
high sinew
daring fern
wet adder
#

what are kings listed as in terms of rank.

manic rune
#

13

wet adder
#

thanks

hybrid shadow
#

in the meantime how does cryptid handle the whole "more than 5 card selection limit" deal

daring fern
hybrid shadow
# daring fern `G.hand.config.highlighted_limit = number`

so if i had a sticker that increased the card selection limit when card held in hand would it be something like

       G.hand.config.highlighted_limit = G.hand.config.highlighted_limit + [variable for number of the specific sticker on cards held in hand]
end```

or something like that
daring fern
hybrid shadow
#

ah

sullen fern
hybrid shadow
daring fern
sullen fern
hybrid shadow
daring fern
red flower
hybrid shadow
sullen fern
sullen fern
# sullen fern

so i would just add the jokers i want to modify in the "cards" section

#

right

red flower
#

yeah
idk what happens if you add something from a mod that's not loaded tho

stiff locust
#

alright how do I get the stake completion for a deck

#

get_joker_win_sticker() didn't work on a deck
figured i may as well try it anyway

narrow iron
#

how do i debuff a card with debugplus?

daring fern
narrow iron
#

i just need to debuff a card for testing

#

im not writing any code here

daring fern
narrow iron
#

ohhhhhhhhhh

weak gate
#

how do I detect the right mouse button click in code?

daring fern
weak gate
#

what does it mean to hook, here?

hasty mist
#

where are the hex codes for rarity badges stored

sturdy compass
#

globals.lua

hybrid shadow
red flower
#

it's always good to start a new run before testing something

narrow iron
#

this should flip all played cards, turn them into glass, and flip them back, but they dont get enhanced to glass until after the hand is resolved. they still flip 2 times, but they're still glass afterwards

wheat pulsar
#

hi another time, i want to make every time play only 1 card add a hand size, but pop ups a error un this line

card.ability.h_size = card.ability.h_size + card.ability.extra_h

red flower
hybrid shadow
red flower
#

extra_h is probably not getting saved

hybrid shadow
wheat pulsar
sullen fern
narrow iron
red flower
# wheat pulsar

can i see the config? also try saving stuff in an extra table

red flower
#

idk what the correct timing would be rn

sullen fern
#

should be easy then

red flower
#

ok try restarting a run and using card.ability.extra.extra_h

wheat pulsar
#

where i use it?

red flower
#

yes

surreal coral
#

Am I missing something with the load function cause I swear every time I try to reference a variable inside it, that variable just isn't loaded yet. Like it can't see into 'extra' for jokers (joker.ability.extra), and #G.hand.cards returns 0

wheat pulsar
red flower
#

h_size should also use extra.h_size

#

and the return should say extra instead of extra_h

wheat pulsar
soft echo
#

how does one check to see if a joker is currently in your joker slots

#

like check to see if the player currently had another specific joker

wheat pulsar
narrow iron
#

can i hook smods functions?

sturdy compass
#

You should be able to yeah

narrow iron
#

there is probably a better way to do this but i dont know what,i want to change the odds and xmult of glass cards depending on whether i have a specific joker, but this isnt working

sturdy compass
#

Instead of taking ownership, you could probably do this with an add_to_deck function in the joker itself

sullen fern
sturdy compass
sullen fern
#

besides showman which seems to be "ring_master"

sturdy compass
#

It's more than that

sullen fern
surreal coral
sturdy compass
sullen fern
#

would be nice to know

surreal coral
narrow iron
#

yea that would be useful, but i still dont know how else to modify the glass cards

sturdy compass
#

What I'd do is change the extra value in the prototype for m_glass, and afterwards loop through your deck to do the same with glass cards you already have

#

Or instead of changing the prototype, you could hook Card:set_ability and change it whenever a glass card is made

narrow iron
#

i'll probably go with that

sturdy compass
#

Here's how I did something similar with Stone Cards. It'd obviously look a little different with Glass Cards but it's a decent reference point

narrow iron
#

thank you!

sturdy compass
#

np!

narrow iron
#

would it be v.extra.odds?

torpid plume
#

my work on Star Card art for Entropy! all of them besides Multiverse, Star.Lua, Nemesis, Pulsar/Quasar and the five “suit stars” (all drawn by ruby iirc) is my art!

sturdy compass
narrow iron
#

ahh okay

sturdy compass
torpid plume
#

coming from another total space nerd, thank you :3

#

i was really proud of Dyson Swarm, Betelgeuse, TRAPPIST-1 & Kepler-90’s art

sturdy compass
#

I believe in Trappist-1 system supremacy
(Micro's full name is Microscoppi, Geist's is Poltergeist, and Proxima's is Proxima Centauri)

torpid plume
#

hell yeah

sturdy compass
#

(All art done by Maxis)

torpid plume
#

hence why theres so many

sturdy compass
#

Aw damn, not gonna play that :/

torpid plume
#

ah fair

sturdy compass
#

Not a big Cryptid guy unfortunately