#đŸ’»ăƒ»modding-dev

1 messages · Page 256 of 1

hushed field
#

Oh that's a fun concept!

vivid solstice
#

probably dumb question but how do you make a planet card only appear after you discover the hidden hand?

glad osprey
#

if there's ever a mod that gives a shit ton of negative mult this would be so good

lofty axle
#

i keep getting the error message [SMODS _ \"src/loader.lua\"]:571: [SMODS tribouletions \"thing.lua\"]:96: '}' expected (to close '{' at line 95) near '=' whenever i do this. im currently trying to upgrade the joker's chips and display the "Upgraded!" message after a 1 in 10 chance. any pointers?

#

probably shouldve added actual code line numbers oops

faint yacht
#

Move the card.ability.extra.chipsAdded outside the return.

vivid solstice
#

how come the name isnt showing?

        ['en-us'] = {
            ['name'] = 'CFBDSIR2419'
        }
    },```
lofty axle
#

wait nvm it just shows the +chips and thats it

#

realized thats how its supposed to be for other jokers lol

#

thank you!!

vast lily
#

anyone know how to make an event that messes with the probability weight of certain card types appearing in the shop for the rest of the run?

#

nvm i got it, the GAME script just stores the rates as ints and stuff like the Tarot Merchant voucher just applies a change to that int to the run

next timber
#

im a little confused about the variables being passed into shaders, does texture_coords go from 0 to 1 or from 0 to pixel width/height, or from top left x/y on atlas to bottom right x/y on atlas

knotty copper
#

@wintry solar If you are not busy, would you be able to help me figure out this issue?

worthy stirrup
#

I know that context.discard happens once per card discarded, is there an equivalent for playing the card

worthy stirrup
#

ah, thanks

heady siren
#

I might be stupid, but I'm trying to add a deck that just gives you one of my jokers so I can test it's functionality, and it just throws an error whenever I click play

#

The smod modding guide doesn't say anything about a center field, do I need to add it, and if so, what do I put in it?

frosty dock
#

there's prefixes added to object keys

heady siren
#

This is my first mod, I do not know what you mean by incomplete, what do I need to do to make it complete?

frosty dock
#

in this case the full key looks like j_modprefix_tennisjoker where modprefix is the prefix from your mod's metadata file

heady siren
#

Alright, thank you

frosty dock
#

also you should probably update steamodded and lovely, both of those are a good bit out of date

heady siren
#

It works with the mods I play, and when I update a lot of them stop working

frosty dock
#

then you need to update those mods as well

#

I really don't recommend developing on an outdated version, any features you see in the docs or elsewhere might not yet be supported on the version you're using

heady siren
#

Now it says area is nil even though area is specifically defined

frosty dock
#

two things there

#

you should use SMODS.add_card instead of SMODS.create_card or it won't be placed into the jokers area properly

#

and you need to do it inside of an event, otherwise you're acting before the jokers area is created

simple mural
#

What do you think of this mod structure?

frosty dock
#

yes you can remove the set and area, set is only needed when generating something random and area defaults to G.jokers anyway

heady siren
#

Got it

simple mural
next timber
#

i am trying to comprehend shaders, how is image_details a vec4? i presume the first 2 values are width and height of the atlas, so what are the 3rd and 4th??

#

wait nvm i may be stupid

#

its texture_details a vec4

#

ok why is texture_details a vec4

#

oh shit the z and w are its position in the atlas

#

incredibly useful

#

OUGHGHGHHHGH

#

I KILLED JIMBO

#

PROMISING

#

NOPE

#

I MEANT THIS

#

ok now does it work on all jokers

#

thats the deciding factor

#

no.

#

no it does not

vivid solstice
#

game crashes on load, it says unexpected symbol on the 23rd (second here) line

            { hand }```
open aspen
#

is there a context for when the played hand is on screen, and after the scoring is done, but before the played cards disappear? (e.g like a context that would activate before stuff like mime works on gold cards)

worthy stirrup
#

im trying to make blueprint but in the other way, would this be right?

pulsar canyon
#

I've trying to make a config menu for my Gamepad Button Prompt mod. I'm looking into adding a menu portion where you can simply choose between button icons without needing to drag-and-drop specific icon files.

I already got the config.lua portion mostly sorted (in terms of getting the menu to se it), but I haven't gotten the actual config menu to work.

here's a concept image on what I'm trying to achieve right now:

thin anchor
#

bump

open aspen
#

the effect of my card happens before the message pops up

#

can I delay the effect or have the message appear sooner?

maiden river
#

G.GAME.chips is what you've scored, and G.GAME.blind.chips is what the blind requirement is

maiden river
#

note that they're not going to be numbers if you have talisman installed

open aspen
#

how does this work?

thin anchor
hexed heath
#

the malverk experience

maiden river
#

there's more info on talisman's readme

thin anchor
#

interesting

red flower
#

so the timing of whatever you want to run is correct with the scoring steps instead of doing everything before

long sun
#

hi! having trouble getting a Tarot card to work

#

wait hold on i might've fixed it

next timber
#

fuck you (melts your jokers)

#

anyways I CAN REST!! THE HARD PART IS FINALLY FUCKING DONE

#

it looks a bit jank on square joker

#

but quite frankly

#

i do not

long sun
#

yep, nope, still broken -w-

next timber
#

care

long sun
#

the error's telling me that line 561 of card.lua is throwing

thin anchor
long sun
#

which is this line:
for k, v in pairs(G.P_SEALS[_seal].config or {}) do

next timber
thin anchor
#

but actually how did you do that

#

its really cool

long sun
thin anchor
long sun
#

OOP OKAY I FIXED IT NEVERMIND :D

#

still getting weird errors, but the card works!!

red flower
# open aspen sorry i didnt get it?

all the scoring contexts run immediately when the hand is played and the returns run inside events so they get played in order
func allows you to put an event at the appropriate place in the queue

next timber
long sun
#

ignore the fact that the ability doesn't line up btw, i made the seal first because the code was at hand for creating seals

vivid solstice
long sun
#

ah, i don't have one of those

vivid solstice
#

anyway my one card scoring hand doesnt work and shows high card even though its higher than high card

warped marsh
#
SMODS.Joker{
    key = 'pumpkinmoon',
    atlas = 'Jokers',
    pos = { x = 3, y = 3 },

    cost = 6,
    rarity = 2,
    blueprint_compat = false,
    eternal_compat = true,
    unlocked = true,
    unlock_card = true,
    discovered = true,
    config = { extra = { money = 8}},

    calculate = function(self, card, context)
        if context.cardarea == G.play and context.individual and next(conext.poker_hands['Three of a Kind']) and context.destroy_card then
            return{
                money = (card.ability.extra.money or 8),
                destroy_card = card,
                destroying_card = card
            }
        end
    end
}```
I'm getting an error for missing context value, what am I missing here?
faint yacht
#

conext?

warped marsh
#

omg

#

my horrible spelling

#

strikes again

next timber
#

conext

vivid solstice
lofty axle
#

how would i go about destroying all cards in hand when a joker is sold?

#

i cant lie, looking at all the stuff about contexts with destroying cards is confusing me LOL

open aspen
next timber
#

why does the edition property not have any of the config data?

#

this is being printed in on_apply

#

ok so it has it after the fact so it seems i just can't access it during on_apply?

red flower
next timber
thin anchor
#

would this be how you use an if statment?

next timber
#

missing an end on it

#

otherwise yes that checks out

thin anchor
#

sweet

red flower
#

you have extra commas too

thin anchor
#

ah

red flower
#

none of those commas go there

heady siren
#

How does one make a joker not trigger in the individual context if the scored card is being retriggered?

warped marsh
#

Is there docs on info_queue? I want to put an infoqueue on glass card based Joker :)

thin anchor
#

is this correct

marble finch
#

is there any way i can get a jokers original config? i thought G.P_CENTERS would be right but nope, for some reason the values there are also modified?

sonic cedar
marble finch
# sonic cedar like from base game?

essentially as if the joker just spawned in, im trying to revert a certain food joker to its original state but when i use G.P_CENTERS its also already changed

sonic cedar
#

game.lua

#

has each joker’s config, but some are in thunk code format

#

i should send an example in case you mean something else

#

here's ice cream

marble finch
#

thats in G.P_CENTERS. i literally had used that .-.

#

so i guess i modified the original index or ive used it wrong, brb

sonic cedar
marble finch
#

so i did modify the original index. WHAT

sonic cedar
#

im saying cause as far as i knew that’s where they go

marble finch
#

G.P_CENTERS is definetely right, but somehow the way i modify my joker modifies it too

heady siren
chrome widget
#

When you're accessing from G.P_CENTERS or G.P_CENTER_POOLS, what's the nesting for the center's basic config values? I'm trying to access the cost of all centers in the game, not just existing cards (as Clearance and Liquidation do to update existing ones)

thin anchor
#

how would you make it so you earn money if the chips earned is equal to or more than the blind requirement?

crisp elbow
#

is there a context that exists for a start of an ante?

red flower
#

setting_blind? or what do you mean by start of ante?

sonic cedar
#

how to check if a played hand included a certain suit?

manic rune
#

for loop through the entire G.play.cards

#

check suit

#

if v:is_suit("...") then

sonic cedar
#

like i can add context.after

knotty copper
#

Need help diagnosing an issue for some reason when I have the TexturePack object in my code it causes some of the decks descriptions for plasma - erratic decks to not update when you select a new language and only updates when you reload the game and I don't know why, I'm not sure if the issue is due to a mess up in declaring the AltTextures or the TexturePack object itself
I know the issue is coming from this as when I remove the TexturePack object it works fine

manic rune
#

i mean, if G.play.cards is still the same in context.after then yes

sonic cedar
#

would work right?

#

suit is a variable i have set in the joker’s config

rain slate
#

how do I make something open a random booster pack?

vocal cedar
#

is there a mod or a way i can quickly reload the game without having to close and reopen it each time i change one single line in my mods code lol

rose dragon
#

is there a way to replace all joker slots in the shop?

rain slate
vocal cedar
#

correct thank you

rain slate
#

careful though because if you have your cursor in the IDE it can just type a bunch of m's and it won't reload correctly because of the syntax errors caused by that

vocal cedar
#

mmmmmmmmmmmmmmmm

#

HA yeah

#

that just happened in discord 😱

#

how do i pull the edition of a played card again?

#

context.scored_hand[i].edition?

manic rune
rain slate
sonic cedar
manic rune
#

yeah

sonic cedar
manic rune
#

that's supposed to be a condition

sonic cedar
#

ohh ok

simple mural
sonic cedar
sonic cedar
simple mural
#

I've just never seen this kind of file splitting before

sonic cedar
simple mural
#

What can you offer in return?

#

I want to make ~450 new jokers

vocal cedar
#

whats an easy and quick way to define blueprint features?
like if i have a super simple joker how do i define his blueprint behavior

modern kindle
#

im at just over 50 and scraping bottom of the barrel

simple mural
sonic cedar
#

and then put your corresponding jokers into each file

#

like 90 jokers into 90.lua

#

etc

vocal cedar
#

like if i have a joker that just adds x2 mult how do i make a blueprint or brainstorm do this?

simple mural
simple mural
vocal cedar
simple mural
sonic cedar
vocal cedar
#

yeah

#

Ah i see

manic rune
modern kindle
#

hi bepis, i sent u a dm bestie

sonic cedar
simple mural
manic rune
#

else it will probably trigger more than once

zinc forum
#

I am getting a weird issue, anyone knows why card.ability.extra.parity doesn't actually swap around?

if context.end_of_round and context.cardarea == G.jokers then
    if card.ability.extra.parity == 1 then card.ability.extra.parity = 0
    else card.ability.extra.parity = 1 end
    return {
        message = localize('k_reset')
    }
end```
#

The "Reset!" message does appear so I know the code is being run

sonic cedar
zinc forum
#

Unraveling it it's just lua if card.ability.extra.parity == 1 then card.ability.extra.parity = 0 else card.ability.extra.parity = 1 end

sonic cedar
#

no but

#

why are you using double on the first one

zinc forum
#

I tried some fancier stuff before but no dice

sonic cedar
#

if it’s a number

#

== and not =

zinc forum
#

Ok now I'm lost x)

#

I am checking to see if parity is 1

sonic cedar
#

you set your parity equal to a number but you didn’t use the number equality sign

zinc forum
#

I also tried removing the == 1 which should've worked but didn't work so I specified as much I could

sonic cedar
#

change it to = 1

toxic rain
#

???

zinc forum
#

That would assign it 1 wouldn't it?

toxic rain
#

isnt single = for assigning value and not checking it

zinc forum
#

Unless it's some weird lua thing I'm too java brained to understand x)

sonic cedar
toxic rain
#

understandable

vast lily
#
loc_txt = {
    name = "Clueless Deck",
    text = {
        "Start with {C:attention,T:v_tarot_tycoon}Tarot Tycoon{}",
        "and 7 {C:negative,T:e_negative}Negative{} copies",
        "of {C:tarot,T:c_fool}The Fool{}",
        "{C:inactive}at a price...{}",
    },
},

The C:negative indicator isn't changing the text color. Anyone know what the color indicator I need for the spooky color changing text is?

zinc forum
paper zealot
lethal ridge
#

hi guys

vast lily
#

oooo thanks

lethal ridge
#

how do i modify how the game does score calculations?

zinc forum
#

Ooh that's a handy chart, where did you get it?

vast lily
#

was about to ask the same thing

simple mural
lethal ridge
#

the game can only go up to e308 before naninf

#

and also it doesnt work with imaginary numbers

toxic rain
#

how would imaginary numbers work for scoring?

lethal ridge
paper zealot
lethal ridge
#

it would mess up your score

zinc forum
lethal ridge
#

unless you multiply by imaginary again

#

until its back to normal number

#

but with a higher multiplier

toxic rain
#

that sounds like an interesting mechanic

lethal ridge
#

i know how i will make imaginary number gameplay but idk how to make the calculations

lethal ridge
#

its a bit hard to read

zinc forum
toxic rain
#

i tried studing uni math but dropped out so this is way too big brain for me

vast lily
fervent thicket
#

I'm VERY new to coding balatro mods. What am I doing wrong?

sonic cedar
zinc forum
#

Maaaan, and I wanted it to look good x)

sonic cedar
#

that doesn’t matter if it’s not gonna work 😭

zinc forum
#

Trying the more verbose one see if it works

sonic cedar
#

i think it might be messing up your end statements

simple mural
#

gn

zinc forum
#

G'night!

hardy viper
zinc forum
#

Why is it still not working.

if card.ability.extra.parity then
                card.ability.extra.parity = 0
            else 
                card.ability.extra.parity = 1
            end```
hardy viper
#

which is why it doesnt exist

fervent thicket
#

I was just looking at a guide lol.

hardy viper
fervent thicket
#

So how should I initialize my jokers so they appear in game?

hardy viper
#

you can just put the code in the top level scope

#

SMODS.Joker

zinc forum
hardy viper
#

it looks like youre initializing them the 0.9.8 way

#

so yeah that guide is completely worthless

#

0.9.8 is long gone

zinc forum
#

This is literally my code lua if context.end_of_round and context.cardarea == G.jokers then if card.ability.extra.parity == 1 then card.ability.extra.parity = 0 else card.ability.extra.parity = 1 end return { message = localize('k_reset') } end

fervent thicket
#

I see. That's fantastic.

zinc forum
#

I am checking, yes my config is config = { extra = { parity = 0, chips = 20, mult = 2 }}, so naming is right, the reset message is shown so the code gets run

sonic cedar
zinc forum
#

That's just me not copying right, it looks fine in code

thin anchor
#

may i have an example of how this is used?

zinc forum
#

Besides Lua doesn't use indents for blocks, that's a python thing

sonic cedar
sonic cedar
zinc forum
#

I swear I saw some weird indents in the base code

sonic cedar
#

thunk coding...

zinc forum
#

In any case guess I'll just try to like, put it in an event or something???

sonic cedar
#

oh you meant functionality "matter" no with lua indents just make the code readable

zinc forum
#

Yeah nah I meant functionally Lua doesn't do anything with indents

sonic cedar
#

yeah

zinc forum
#

I reassure you my code is properly indented everywhere x)

sonic cedar
zinc forum
#

Sure

#
calculate = function(self, card, context)
    if context.individual and context.cardarea == G.play then
        if (context.other_card:get_id() <= 10 and
        context.other_card:get_id() >= 0 and
        context.other_card:get_id()%2 == card.ability.extra.parity)
        then
            return {
                chips = card.ability.extra.chips,
                mult = card.ability.extra.mult
            }
        end
        -- I can't be bothered to write it better right now...
        if context.other_card:get_id() == 14 and card.ability.extra.parity then
            return {
                chips = card.ability.extra.chips,
                mult = card.ability.extra.mult
            }
        end
    end
    if context.end_of_round and context.cardarea == G.jokers then
        G.E_MANAGER:add_event(Event({
            func = (function()
                if card.ability.extra.parity == 1 then
                    card.ability.extra.parity = 0
                else 
                    card.ability.extra.parity = 1
                end
                return true
            end)
        }))
        return {
            message = localize('k_reset')
        }
    end
end```
#

It's basically a Joker that's like, a fusion of Even Steven/Odd Todd that changes parity each round

vocal cedar
#

based upon my good friend who loves balatro

fervent thicket
vocal cedar
# sonic cedar yeah

thank you to @hushed field for the help with this last night also i 100% used some of your empress of light polychrome code from way ago so thanks for figuring this out

#

so thanks lmao

#

this whole discord server is the best wiki

vocal cedar
#

no i know

#

i replied to you on purpose lol

sonic cedar
#

villainous

vocal cedar
#

you did an empress joker a while ago right>

hardy viper
sonic cedar
vocal cedar
#

OH no

#

nvm sorry lol

sonic cedar
vocal cedar
#

you helped @warped marsh with their joker lmao

sonic cedar
#

yes 😭

vocal cedar
#

so thank you to both of you lol

fervent thicket
sonic cedar
#

yeah run some print checks and see what’s going on

fervent thicket
#

Although I did get another error now lol.

fervent thicket
#

Now I got this error.

zinc forum
#

And it's just the card description that didn't update properly

zinc forum
#

(In my defense it's almost 3am)

warped marsh
#

Oh toma

sonic cedar
warped marsh
#

I forgot to tell you

sonic cedar
#

hi

sonic cedar
warped marsh
#

I changed all my files so it actually looks decent now and like I have it all localisation based now

vocal cedar
# warped marsh Huh

you made a really cool empress of light joker a while ago that so happened to exactly have the code i was scratching my head trying to figure out how to get

vocal cedar
#

i was just searching thru the discord and i was like "OH thats how i do it"

warped marsh
#

The changing to the polychrome?

#

Or the colour of the name

vocal cedar
#

mhm! made a joker that has a 1 in 10 chance to turn each played and scored card into a negative playing card

#

couldnt figure out how to target one specefic playing card at a time

#

you did the scoring_hand[i] for loop

#

which was the answer

warped marsh
#

Oh yeah yeah

vocal cedar
#

so thanks

warped marsh
#

No worries :)

sonic cedar
errant fulcrum
#

I understand that Castle picks a suit from your playing cards, but how does Ancient Joker pick? Does it just pull a random suit from SMODS.Suit?

warped marsh
# vocal cedar so thanks

That Joker took me actual hours to code (originally used for another Joker) I’ve been so proud of the code I’ve recycled it 3 times already

vocal cedar
warped marsh
#

The code is above it

vocal cedar
#

i feel like thats exactly how midas works

also the flipping of your cards to make em fancy is quite cool

zinc forum
#

Quick question, do the loc_var variables update over time or are they locked to the variables set at the start
Apparently card.ability.extra.parity and "even" or "odd" didn't work, so I just wanna make sure for later

warped marsh
#

Since you have to do it manually (cringe)

vocal cedar
#

now i gotta make a spectral card that does a few things

Ghost:

  • Select up to 3 playing cards
  • For each chosen card, add Negative to that card and have a (amount of cards chosen) in 4 chance to lose 1 discard
#

thats gonna be fun to figure out i think

#

i wish there were example tarot cards like the example jokers mod somewhere

warped marsh
#

What do you mean?

#

Creating Tarots?

errant fulcrum
vocal cedar
#

a framework i g

warped marsh
vocal cedar
#

if i could see like The Magician in SMODS terms this would be fire

warped marsh
#

Look into my mod again, I have a lot of creating Tarot cards

#

Miku and Terraria one

vocal cedar
#

ill take a look lemmie check

warped marsh
#

More specially for specific tarot cards it’s Rotten Girl in MIKU mod

#

I have an update version of my Terraria mod that I’ll update tomorrow that’s cleaner and more refined btw

primal shoal
#

does hanging chad increase the amount of context.scoring_hand

vocal cedar
#

that shits kinda clean with it

warped marsh
#

For terraria?

vocal cedar
#

mhm

warped marsh
#

No. Only for my Miku mod

vocal cedar
#

oh okay

#

dude the person who did your terrara art is clean with ut

warped marsh
#

I collared with someone :)

vocal cedar
#

peak shit

#

some people have talent

warped marsh
#

Collabed*

vocal cedar
#

some people can code lol

warped marsh
#

I mean I did both

#

And it got too much to manage

#

Here’s my Miku stuff

vocal cedar
#

king

vocal cedar
warped marsh
#

I do digital art so the full art jokers are the easiest xd

vocal cedar
#

AH

#

i see

#

i am

warped marsh
#

Well it’s a hobby

vocal cedar
#

not articically talented!

warped marsh
#

I study programming, art is my hobby

#

Because originally I learnt art to make art for my games, got into art instead

vocal cedar
#

I study AI, programming is my hobby 😭

warped marsh
#

Ah me too! I do Data science with ai

pearl jacinth
#

might need some help

pearl jacinth
#

how do i make a consumable create a joker

zinc forum
#

except for aces but that's a tomorrow me problem

vocal cedar
pearl jacinth
#

yes

#

but a set joker

zinc forum
#

It should be fairly easy

pearl jacinth
#

it's my first time modding

fleet mango
#

ight i dont understand lua much

primal shoal
#
        if G.jokers.config.card_limit > #G.jokers.cards then
            SMODS.add_card{
                set = 'Joker',
            }
        end
    end
minor furnace
fleet mango
#

anyone know why morejokerpacks is bricking rn

minor furnace
#

There is also smods.add_card I suppose

zinc forum
#
use = function(self, card, area, copier)
    G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.4, func = function()
        if G.jokers.config.card_limit > #G.jokers.cards then
            play_sound('timpani')
            local card_t = {
                set = "Joker",
                area = G.jokers,
                key = "j_rh_lockstep"
            }
            local new_card = SMODS.create_card(card_t)
            new_card:add_to_deck()
            G.jokers:emplace(new_card)
            card:juice_up(0.3, 0.5)
        end
        return true 
    end }))
end```
fleet mango
#

i understand nil

#

but thats it

zinc forum
#

That's how the base game does it

#

Look at the j_rh_lockstep string, that's where SMODS defines which joker to spawn

fervent thicket
#

Can someone please tell me why I'm getting this error? I'm very new to modding.

fervent thicket
#

Oh... welp, I'm a little dumb. Probably should've noticed that looking at the docs.

#

Thank you

primal shoal
#

why does hanging chad overide the #context.scoring_hand

            if #context.scoring_hand == 1 then
                card.ability.extra.count = card.ability.extra.count + 1
            end
        end
thin anchor
#

what ability shall this poker joker have

glad crane
warped marsh
primal shoal
quartz ravine
#

Anyone super great with Lua? I feel like surely there must be a more efficient way to do this, but I don't know if lua is just really limited. Many languages let you use

foreach (var x in collection) to spin out an easy enumeration of an array

In Lua this was the best way I could come up with to build an array of cards that aren't scored

for i = 1, #context.full_hand do
   local thisCard = context.full_hand[i]
   if has_value(context.scoring_hand, thisCard) then
      sendInfoMessage("card " .. thisCard:get_id() .. " was played and scored", self.key)
  else
    sendInfoMessage("card " .. thisCard:get_id()  .. " was played but not scored", self.key)
    local cardINdex = #unscoredCards + 1
    unscoredCards[cardINdex] = thisCard
  end
end

sendInfoMessage("count of unscored cards " .. #unscoredCards, self.key)

for i = 1, #unscoredCards do
   local thisUnscoredCard = unscoredCards[i]
   sendInfoMessage("confirming would be modifying card " .. thisUnscoredCard:get_id(), self.key)
   --to do decrease this card
end

primal shoal
#
       if v.var then
             rest of code`
``` this right?
k is i and v is all the elements in the collection
warped marsh
#

so yep

primal shoal
#

yippe i know my stuff

quartz ravine
#

i was hoping there might be some 'syntax sugar', but I guess not

warped marsh
#

Like it’s only super minor things I think could be changed

quartz ravine
#

Why the heck doesn't lua have a continue?!?!?! I read the Lua authors statement on it and they said it would cause confusion with variable scopes, but to me it is very intuitive

warped marsh
#

Wait Fox can you try something for me?

quartz ravine
primal shoal
#

i miss var++

#

or var += 1

heady siren
#

How would I go about referencing a joker to the left of the current joker?

gentle rain
#

:131: attempt to perform arithmetic on field 'felt_discards' [a nil value]
attempted to copy yorick's homework, but what confuses me is that yorick's variable for how many discards are left uses self.ability.yorick_discards, when normally don't variables like this use self.ability.extra.[...]?

warped marsh
#
local scoringSet = {}
for _, card in ipairs(context.scoring_hand) do
    scoringSet[card] = true
end

local unscoredCards = {}

for _, thisCard in ipairs(context.full_hand) do
    if scoringSet[thisCard] then
        sendInfoMessage("card " .. thisCard:get_id() .. " was played and scored", self.key)
    else
        sendInfoMessage("card " .. thisCard:get_id() .. " was played but not scored", self.key)
        table.insert(unscoredCards, thisCard)
    end
end

sendInfoMessage("count of unscored cards " .. #unscoredCards, self.key)

for _, thisUnscoredCard in ipairs(unscoredCards) do
    sendInfoMessage("confirming would be modifying card " .. thisUnscoredCard:get_id(), self.key)
end ```
quartz ravine
#

me too, it is like i am working in an ancient language suddenly. Also to see the % sign used for modulo really shocked me! I am used to that being foreach

warped marsh
#

See if this works

#

It might break

#

I’m not sure

gentle rain
primal shoal
#

what are felt_discards

sonic cedar
gentle rain
warped marsh
sonic cedar
#

yes of course

gentle rain
native zinc
#

how doth one send a message to the playing card and the joker

#

i assume card_eval_status_text

chrome widget
#

Uhh.... I'm having a very strange circumstance where modded jokers correctly have their atlas stored on card.config.center.atlas, but vanilla cards don't?

sonic cedar
sonic cedar
quartz ravine
#

That does work, but I don't understand this ipairs(context.scoring_hand) syntax.

I really like that this syntax assigns the variable directly, it removes the need to assign a local thisCard = cards[i] which is fantastic! @warped marsh Thanks 🙂

vocal cedar
# fleet mango

nil value: your trying to reference something on line 18 that doesnt exist

#

check there first

vocal cedar
gentle rain
vocal cedar
#

localthunk my goat

#

putting jokers basically anywhere bro feels like it

gentle rain
#

wdym

vocal cedar
#

the base game code is so hard to scout through sometimes 💀

gentle rain
#

ctrl f my friend

warped marsh
#

It’s late

#

No brain

vocal cedar
#

like

#

the code for midas is not in the same file as yorick etc

#

stuff like thagt

gentle rain
#

is every ability not in card.lua?

vocal cedar
#

no lol

#

only the onces that like

sonic cedar
# warped marsh Wait sorry what?

the joker does the flip animation after a scoring hand, which is correct. however, it repeats the animation for each card that was scored, which i do NOT want. how do i make it so the animation only plays ONCE

vocal cedar
#

actually effect the score

heady siren
vocal cedar
gentle rain
#

yeah like i cant find where yorick applies its own xmult or where it stores any of its variables

#

like. where is the 23 discards

sonic cedar
gentle rain
vocal cedar
#

OH so

chrome widget
#

Yeah this is really bizarre to me. This log shows that the center for the jokers are valid (both modded and vanilla), but trying to access config.center.atlas on the vanilla joker is nil??????

sendDebugMessage('atlas: '..tostring(rand_joker.config.center.atlas))```
vocal cedar
#

thats

#

actually really funny lol

sonic cedar
#

it is

warped marsh
#

If i remember correctly removing the bottom third should do it

vocal cedar
warped marsh
#

Because the first part flips it

vocal cedar
#

obvs question i know but

vocal cedar
#

if theres a for loop shawty gonna flip a bunch

open aspen
sonic cedar
vocal cedar
#

was that it 😭

warped marsh
#

Because how the code works Toma is that the card flips and it changes suits (in you are king for example) and then it flips again, but it goes by so fast it looks somewhat natural

gentle rain
vocal cedar
#

lol

minor furnace
#

who else up developing they mods

errant fulcrum
#

Oh my god I figured it out

vocal cedar
minor furnace
sonic cedar
edgy reef
#

real

warped marsh
primal shoal
warped marsh
#

Get rid of the last bit of code and see how it reacts

#

And shorten delay maybe?

#

The delay is there so you can see the cards turn into whatever

fleet mango
warped marsh
#

Adding delay like most people don’t play on x8 or x16 egg

fleet mango
#

there is nothing there for line 18

vocal cedar
#

like the error statement isnt gonna say much unfort

rancid bridge
#

making a joker that has a chance to give Xmult
how would i add the chance

warped marsh
heady siren
lucid owl
#

why are cards just... not being destroyed? am i using context.destroy_card incorrectly?

errant fulcrum
#

If anyone wants a joker to pick a random suit like Ancient Joker and not from your deck pool like Castle, you can do something like this:

function SMODS.current_mod.reset_game_globals(run_start)
    G.GAME.current_round.traffic_card = { suit = 'Spades' }
    local valid_traffic_cards = {'Spades', 'Clubs', 'Diamonds'}
    if valid_traffic_cards[1] then
        local traffic_card = pseudorandom_element(valid_traffic_cards, pseudoseed('traf' .. G.GAME.round_resets.ante))
        G.GAME.current_round.traffic_card.suit = traffic_card
    end
end

I removed the loop that gathers all the suits in your deck and indexed the table valid_traffic_cards with the suits I wanted

sonic cedar
warped marsh
vocal cedar
#

@rancid bridge

fleet mango
plush cove
hushed field
vocal cedar
# vocal cedar make something like this

bascially set up a config to have your chance not be hardcoded
then that if function is the most important part so you joker can work with things like Oops all 6 etc

#

@rancid bridge

lucid owl
sonic cedar
vocal cedar
hushed field
lucid owl
warped marsh
vocal cedar
warped marsh
vocal cedar
#

like change 3 cards to clubs wont work if i have 5 chosen

sonic cedar
warped marsh
#

HESR ME OUT

sonic cedar
#

OK

warped marsh
#

PUT IT IN ANOTHER LOOP

#

SO IT DOES IT TWICE

sonic cedar
warped marsh
#

HOLY

vocal cedar
#

lol

sonic cedar
chrome widget
#

Hmm okay I figured out the weird atlas issue but im annoyed by it

warped marsh
#

WEE LOVE LOOPS

quartz ravine
#

Check out this legendary card I added. If you play a high card for your first hand, but play multiple cards, it will decrease the rank of the other cards!

It also will eat played 2's and increase mult. I am not sure why other than I like the idea of kirby eating cards

warped marsh
#

1/4 of the screen

#

Tihihi

quartz ravine
#

yeah I don't know what that is about, sorry

hushed field
warped marsh
sonic cedar
rancid bridge
warped marsh
sonic cedar
#

okidoke

hushed field
quartz ravine
#

the very last thing I am going to do before release is to fix rarities, I promise

vocal cedar
#

thank you

warped marsh
#

And tell me again, what you want it to do

#

Actually Toma go to the thread we made

sonic cedar
#

true

warped marsh
#

This chat is overwhelming

hushed field
#

Also lucky you found me because it's 4 am for me haha

lucid owl
#

also yup, you're right about the effect

vocal cedar
#

@rancid bridge check ya dms king

vocal cedar
lucid owl
#

it gains .5x permanent mult for a random card in the deck every round, then destroys it

hushed field
lucid owl
heady siren
warped marsh
heady siren
#

My question keeps getting lost in the sauce

quartz ravine
# lucid owl

Wow, that is gorgeous and a fantastic design idea too.

hushed field
# lucid owl all good, i appreciate you helping me out with this lol

https://github.com/icyethics/Kino/blob/main/items/Jokers/fight_club.lua

You can ignore everything but the calculate function, but this joker picks a random card to destroy, and it does that by setting an arbitrary boolean on the other_card. The naming is entirely unimportant!

GitHub

a balatro mod for movie dorks. Contribute to icyethics/Kino development by creating an account on GitHub.

hushed field
# lucid owl

Very similar to my Indiana Jones legendary joker, haha, so I have to like the concept

lucid owl
marble flint
#

Does anyone know offhand how to add an entry to info_queue for e_negative applied to a consumable? never mind, found it

fleet mango
#

@vocal cedar

vocal cedar
lucid owl
vocal cedar
#

to the dms

quartz ravine
hushed field
lucid owl
hushed field
marble flint
heady siren
hushed field
hushed field
primal shoal
quartz ravine
#

I wrote a bunch of editions and fell into the weirdness of shaders, never did enhancements

#

let me finish my mod before I sign up, but I really like doing this 🙂

hushed field
heady siren
#

inb4 I see jokers based on Rule34 tags

primal shoal
vocal cedar
#

ill make one right after this specral card

i was gonna make one anyway for my practice mod you can use it in yours

heady siren
#

Would this be correct for debuffing the joker to the left?

stable agate
#

Quick question: How does hologram check for a card being added to the deck to update its xMult? The copy in question is:

            G.E_MANAGER:add_event(Event({
                func = function() 
                    local jacks = {}
                    for k, v in pairs(G.playing_cards) do
                        if v:get_id() == 11 then jacks[#jacks + 1] = v end
                    end
                    local chosen_jack = pseudorandom_element(jacks, pseudoseed('the_function'))
                    if #jacks > 0 then
                        card_eval_status_text(card, 'extra', nil, nil, nil, { message = 'Pull up' })
                        G.E_MANAGER:add_event(Event({func = function()
                        local card = copy_card(chosen_jack, nil, nil, G.playing_card)
                        card:add_to_deck()
                        G.deck.config.card_limit = G.deck.config.card_limit + 1
                        table.insert(G.playing_cards, card)
                        G.hand:emplace(card)
                        return true end }))```
hushed field
# primal shoal ooh throw me a enhancement type and I'll try it to learn how to do enhancement

Haha they're all a bit cumbersome to set up and need either sprite rendering code or some card eval patching, so I'm not sure they're the best ones to practice with, haha. But if you wanna take a crack at Mystery Cards, which are always face down, showing your deck's card back, and give X2.5 mult but lose x0.5 mult every turn they're in your hand, while also revealing either randomly suit, rank, seal or edition each hand, you're definitely welcome to!

stable agate
red flower
primal shoal
gentle rain
stable agate
vocal cedar
hushed field
red flower
vocal cedar
#

i might need a few more days of modding under my belt first... good luck lol

hushed field
#

It's why it's one of the enhancements I haven't implemented yet after 200 jokers haha

vocal cedar
#

love it but

#

shiver

#

cant wait to rework smeared joker into a rare and make all rnumbers count as all numbers and all faces count as all faces

#

while making aces count as anything

#

go ahead

#

play a straight flush every round

#

see if i care

vocal cedar
#

give it a whilr

#

if it errors we will know what caused it

#

just rip it and see if it works ol

#

if it doesnt and it crashes its gonna tell us why

heady siren
#

It doesn't like the if stoppos != nil then line for some reason

#

Should I make it define a number and check if it's not that number instead?

vocal cedar
#

the if statement is probl written wrong one sec

#

no np this should be fine

#

nil is just a scary thing to use in code

stable agate
# red flower anoywhere in that event after you make the copy `cards` should be `{ card } ` pr...

Here's what I tried adding, still haven't gotten it to trigger hologram

        if context.cardarea == G.jokers and context.setting_blind then
            G.E_MANAGER:add_event(Event({
                func = function() 
                    local jacks = {}
                    for k, v in pairs(G.playing_cards) do
                        if v:get_id() == 11 then jacks[#jacks + 1] = v end
                    end
                    local chosen_jack = pseudorandom_element(jacks, pseudoseed('the_function'))
                    if #jacks > 0 then
                        card_eval_status_text(card, 'extra', nil, nil, nil, { message = 'Pull up' })
                        G.E_MANAGER:add_event(Event({func = function()
                        local card = copy_card(chosen_jack, nil, nil, G.playing_card)
                        card:add_to_deck()
                        G.deck.config.card_limit = G.deck.config.card_limit + 1
                        table.insert(G.playing_cards, card)
                        G.hand:emplace(card)
                        return true end }))
                return true end
                SMODS.calculate_context({playing_card_added = true, card = card})
            return true end }))
        end
    end
})```
vocal cedar
#

thats why

#

!= isnt actually a lua thing lol

#

use ~=

heady siren
#

Ah

#

Too used to GLua

vocal cedar
red flower
vocal cedar
open aspen
#

is there a context for after score is fully calculated and displayed, but before the hand played disappears

vocal cedar
heady siren
#

Also, it's not debuffing the card to it's left

primal shoal
#

end_of_hand

modern kindle
modern kindle
#

oh hi ice

heady siren
hushed field
# vocal cedar thats a viceral idea

I doubt it'll be too complex, it's just that I need to look into how sprites are actually rendered in this game. Same reason for why I haven't implemented Crime Cards yet, which Retrigger for each crime card you are holding in your hand, but only give 2 chips on each Retrigger, instead of the nominal value + upgrades

stable agate
# red flower `SMODS.calculate_context({playing_card_added = true, cards = {card}})`
        if context.cardarea == G.jokers and context.setting_blind then
            G.E_MANAGER:add_event(Event({
                func = function() 
                    local jacks = {}
                    for k, v in pairs(G.playing_cards) do
                        if v:get_id() == 11 then jacks[#jacks + 1] = v end
                    end
                    local chosen_jack = pseudorandom_element(jacks, pseudoseed('the_function'))
                    if #jacks > 0 then
                        card_eval_status_text(card, 'extra', nil, nil, nil, { message = 'Pull up' })
                        G.E_MANAGER:add_event(Event({func = function()
                        local card = copy_card(chosen_jack, nil, nil, G.playing_card)
                        card:add_to_deck()
                        G.deck.config.card_limit = G.deck.config.card_limit + 1
                        table.insert(G.playing_cards, card)
                        G.hand:emplace(card)
                        return true end }))
                return true end
                SMODS.calculate_context({playing_card_added = true, cards = {card}})
            return true end }))
        end
    end
})```

Tried envoking it here, is this right?
modern kindle
open aspen
left lance
#

Quick question: I wanted to make a joker that was default negative (and had no other effects). I have code
card:set_edition({ negative = true }, true)
which almost works? In the collection it's always negative but in the shops it isn't. Any guidance much appreciated

heady siren
#

Also, the game runs now, but it isn't actually debuffing the joker, is there a dedicated function for debuffing cards, and am I using SMODS.recalc_debuff correctly?

modern kindle
#

i always used set_debuff

red flower
heady siren
#

Will this debuff the joker to it's left?

#

It is not debuffing the joker to it's left

quartz ravine
#

When using context.destroying_card, is that context window looking at an individual card, or the whole hand of cards?

red flower
#

individual

primal shoal
#

context.individual my beloved

quartz ravine
#

it looks like card in that context is actually the joker itself. So what is the handle for the other card? I need to check it's ID to see what it's number is

red flower
#

it's literally context.destroying_card

lucid owl
#

it seems like it shouldn't work but it basically acts the same as context.other_card

quartz ravine
#

ah, so I could call context.destroying_card:baseId or whatever

Thank you guys, or girls

lucid owl
#

context.destroying_card.base.id or context.destroying_card:get_id()

#

pretty sure get_id() is generally recommended more than the base id but not sure

fervent thicket
#

Why is there no text on the joker?

#
SMODS.Joker {
  name = "Mouthwashing",
  key = "mouthwashing",
  text = "Gives 20X Mult",
  config = {
    extra = {
      x_mult = 20
    }
  };
  atlas = 'test',
  pos = {x= 0, y= 0},
  rarity = 3,
  cost = 10,
  blueprint_compat = true,
  eternal_compat = true,
  unlocked = true,
  discovered = true,
  effect = 'XMult',
  calculate = function (self, context)
    if(context.joker_main) then
      return {
        card = self,
        x_mult = self.ability.extra.x_mult
      }
    end
  end
}

My main lua file.

#
return {
  descriptions = {
    Joker = {
      j_mouthwashing = {
        name = 'j_mouthwashing',
        text = {'Gives 20X Mult'}
      }
    }
  }
}

And here's my localization file.

heady siren
#

You probably need the mod prefix

fervent thicket
#

What would that be? I have it set to "Frosted Gambler" in the json but I don't think that would work for it, right?

heady siren
#

You have that set as the prefix or as the name?

fervent thicket
#

So, I thought the prefix was that little name that shows up on the cards at the bottom with the card name. It should be changed then, shouldn't it?

heady siren
#

The prefix is internal identifier for the mod

fervent thicket
#

So could I use "fg" and change the joker id to "j_fg_mouthwashing"?

#

Well the reference to it I mean.

heady siren
#

I'd use the name instead to avoid conflicts, but yeah

fervent thicket
#

Ok, will do, thank you!

#

Still didn't work. Nevermind

open aspen
#

at least from the calculate functions page on the wiki

last sentinel
#

When within a joker's calculate function, and then in context.discard, would context.other_card reference each discarded card individually?

glad crane
#

I'm trying to use a custom gradient for my editions badge color, but its crashing due to a number comparison to nil. When calling a custom gradient, im assuming I just use the gradients key right? Such as:
badge_colour = 'gradient_key_here'

open aspen
#

any documentation on this?

lucid owl
lucid owl
open aspen
# open aspen any documentation on this?

i want a function to be called at the time the message pops up in my calculate function. as of right now, the function runs (causing a visible change on the screen) and its out of sync with the message

#

this is my current code

fervent thicket
lucid owl
open aspen
#

xMult, not x_mult

fervent thicket
#

Ah, ok, thank you!

#

Still doesn't work.

#
SMODS.Joker {
  key = "mouthwashing",
  config = {
    extra = {
      xmult = 20
    }
  };
  atlas = 'test',
  pos = {x= 0, y= 0},
  rarity = 3,
  cost = 10,
  blueprint_compat = true,
  eternal_compat = true,
  unlocked = true,
  discovered = true,
  effect = 'XMult',
  calculate = function (self, context)
    if(context.joker_main) then
      return {
        xmult = self.ability.extra.xmult
      }
    end
  end
}
feral jay
#

confused because this exact value is accessed for judgement, why is it screaming at me

#

wait nvm i just notice

#

that is not G.jokers

quartz ravine
#

This destroying_card business is weird!

When I played a hand full of 2's instead of each of them being destroyed, it replayed the animation over and over for the last card

            --it was a  high card, we will eat 2's

            if context.destroying_card:get_id() == 2 then
                sendInfoMessage("This is a 2 " .. context.destroying_card:get_id(), self.key)

                card.ability.extra = card.ability.extra + card.ability.extraGrowthRate
                G.E_MANAGER:add_event(Event({
                    trigger = 'after',
                    delay = 0.45,
                    func = function()
                        play_sound("Fox_yoshiEat", 1.05)
                        context.destroying_card:juice_up(0.3, 0.3);
                        return { remove = true }
                    end
                }))
                sendInfoMessage("we are going to destroy this card", self.key)

                return { remove = true }
            end
        end
feral jay
lucid owl
open aspen
lucid owl
#

card references that specific joker's variables, which is useful when jokers have changing variables that are independent of each other (therefore why it's used, at least iirc). self references the general joker object

open aspen
#

your also missing card in the calculate hook i think

heady siren
#

Can anybody tell me what's wrong with my code? It's not establishing the stoppos value when iterating through the table, so it isn't debuffing any cards

lucid owl
open aspen
#

ah okay

open aspen
lucid owl
fervent thicket
#

It worked, thank you trif and balatroni

fervent thicket
lucid owl
heady siren
lucid owl
#

hm, i see

#

idk if that will work perfectly

heady siren
#

Should I replace it with calculate, would that fix anything, or is it just an optimization fix?

#

Either way it isn't doing the thing I need it to do

daring fern
#

Is there a context for redeeming a voucher?

heady siren
#

Changing to calculate does not fix the problem

lucid owl
#

definitely keep it calculate though, update happens every frame

heady siren
heady siren
#

It's still not debuffing

open aspen
#

and i have no idea how to do that

heady siren
#

The message is in the return so it tends to be more closely tied to the visual part of the context rather than the actual code execution of the context

fluid tapir
#

is there a way to make a joker that does X mult if there are less than a certain number of cards in the full deck?

heady siren
#

But I don't know how you'd make the message appear otherwise or make the visual appear in the return

lucid owl
open aspen
lucid owl
last sentinel
#
            context.other_card:explode()
        end ```

This the correct way to destroy discarded gold cards?
open aspen
lucid owl
heady siren
#

The visual change is probably happening right as the scoring is calculated

lucid owl
#

you can always put the visual change itself into an event

lucid owl
# open aspen

are you wanting the two to both occur after scoring, or before?

open aspen
#

i changed it to before in that screenshot

#

the video was when it was context.after tho

#

and i would want after if possible

daring fern
lucid owl
#

as in card_eval_status_text being lines after the visual change lines

open aspen
#

when would the event happen?

lucid owl
open aspen
#

okay

rancid bridge
#

trying to add a joker that has a chance to disable the boss blind (like the ability)

#

i am slightly stuck at loc_vars

#

as in i am just sitting here, looking at this

lucid owl
#

why is that

rancid bridge
#

what

#

did i do something wrong

lucid owl
#

no, like why are you stuck on loc_vars

rancid bridge
#

oh
i don't really know what variables to put there..

daring fern
#

How does one check when buying a card that it is a voucher?

lucid owl
#

well first off, loc_vars is just for setting variables to a card's description

#

config is where variables are declared

#

and secondly, i would assume you would have a variable for the card's chance to trigger (as in, if it's a 1 in 2 chance, a variable for 2)

rancid bridge
#

yeah

open aspen
#

alright, well this code again changes the enhancement immediately and doesnt display a message (probably because i fucked up something with the message code)

#

why are the contexts ambigious in nature

#

wait

#

oh thank god

rancid bridge
#

would this all work...

open aspen
#

this worked. its voodoo on why this configuration in the code worked. but it worked

#

fuck yea

lucid owl
lucid owl
heady siren
#

The game is now telling me that "ability" on card is nil, when I'm just referencing a variable

rancid bridge
heady siren
lucid owl
#

agh

lucid owl
#

then just do G.GAME.blind:disable() and optionally return something

scarlet spire
#

is it possible to get a random joker without creating it? I'm attempting to create a joker that will spawn a completely random joker when sold, but tells you what that joker is going to be, which changes every round

daring fern
lament agate
#

in which lua in the game that contains the balancing system for plasma

heady siren
#

Can card variables not be tables?

rancid bridge
heady siren
rancid bridge
heady siren
#

That it won't be based on the seed, if you put in the same seed twice and use pseudorandom, it'll have the same outcome both times, but if you put in the same seed twice and use math.random, it'll be two different outcomes

#

Psuedorandom should be used for functional random outcomes, math.random should be used for visual random outcomes

daring fern
rancid bridge
heady siren
# heady siren

I got it working, I had to make the variable start as 0, and then it'll run the code to un-debuff the old joker if the debuffed joker variable isn't 0

heady siren
scarlet spire
modern kindle
heady siren
# modern kindle would you mind posting your joker debuff stuff so i can snag it for some odd rea...

        local stoppos
        local currentpos = 0

        for k,v in pairs(G.jokers.cards) do

            currentpos = currentpos + 1

            if v == card then

                stoppos = currentpos
                break

            end
            
        end

        print(stoppos)

        local debuffjoker

        if stoppos then

            debuffjoker = G.jokers.cards[stoppos - 1]

                if card.ability.extra.debuffed_joker ~= 0 then

                    if card.ability.extra.debuffed_joker ~= debuffjoker then
                        SMODS.debuff_card(card.ability.extra.debuffed_joker, 'reset', 'stopjoker')
                        SMODS.recalc_debuff(card.ability.extra.debuffed_joker)
                    end

                end

                if debuffjoker then

                    SMODS.debuff_card(debuffjoker, true, 'stopjoker')
                    SMODS.recalc_debuff(debuffjoker)
                    card.ability.extra.debuffed_joker = debuffjoker

                end

        end

end,```
rancid bridge
modern kindle
heady siren
scarlet spire
#

i mean yeah the key can be whatever you want, just as as long as its not the same as a different key

rancid bridge
#

brilliant.

lucid owl
heady siren
#

Since it dynamically changes based on your joker order in real time in needs to well, change in real time

#

Also I made the card infinitely more annoying by making it debuff your first hand drawn in it's put in the leftmost slot [=

rancid bridge
#

also uhh
for some reason this only works if you have more than two aces
like if you have 3 aces THEN it gives +25 chips
yeah why why's it doing that.

#

it's not subtracting chips either, no
if you have one or two aces in your hand it just does nothing

brazen tusk
#

Hi, I just started learning and putting together a few jokers today and was wondering if i could have a hand with getting the same functionality as Egg (increasing sell value) after the pseudorandom if, I tried looking at egg itself but can't figure it out

heady siren
daring fern
#

I think.

brazen tusk
#

thats what i had in there but i didn't have the actual number adding to it 💀
i'll try it out ty

daring fern
lament agate
brazen tusk
native zinc
#

hey how does deck.cards in SMODS.Challenge work

red flower
rancid bridge
#

i know i've been stupid a lot let me retest it

red flower
#

it looks ok to me so it might be because some other values are wrong

brazen tusk
rancid bridge
#

it's not giving chips
and i haven't restarted a run yet

#

okay why is it just not giving chips now

#

wait

#

HUH???

#

OH MY GOD I JUST REALIZED

#

IT'S GIVING CHIPS BASED ON HOW MANY ACES ARE IN THE PLAYED HAND

#

NOT HELD IN HAND

#

OH MY FUCKING GOD

tall wharf
#

me when i didn't see you saying anything

#

and then thought

#

logic looks correct

rancid bridge
#

okay now i need to rewrite the code so that it gives chips based on aces held in hand not in the played hand

tall wharf
#

just use G.hand.cards instead of context.scoring_hand ig

brazen tusk
#

Chips Ace Baron??

#

or more like shoot the moon ig

primal shoal
#

joker art mock up don't know what to call it

tall wharf
#

sorry

brazen tusk
#

whats it do?

unkempt kestrel
#

so uh wondering if i could get a bit of help with something, i was trying to make it so that the shop would pretty much be only this rarity and it kinda works, but the default joker is also in there for some reason

primal shoal
#

idk the art just came to me

brazen tusk
#

Make it give +4 Mult and -4 Mult xD

rancid bridge
primal shoal
#

kinda thinking it swaps in and out of negitive

rancid bridge
#

i need to fix my formatting with some of my descriptions now

brazen tusk
#

Could give it +4 mult and +1 joker slot so its basically just a free Joker and if it gets negative then you essentially have +2 slots

unkempt kestrel
#

tbh im not sure how it works the wiki doesnt give examples

tall wharf
#

if pool empty it fills the pool with a Jimbo

unkempt kestrel
#

so if they arent all full give some more

scarlet spire
#

why isn't this following psuedorandom rules? every time I load from a save state, this spits out a completely different joker key even though it should be the same

rain slate
scarlet spire
#

surely a game so heavily based on deterministic randomness and seeded RNG wouldn't do that

rain slate
#

surely

unkempt kestrel
rain slate
#

You can't escape him

#

He will always find his way to you

tall wharf
#

does the rarity even have things in it

unkempt kestrel
#

i mean ive got this in the one joker i have

#

tbh im not sure how rarities work

#

it wasnt working before so i tried adding the pools thing

rain slate
brazen tusk
#

rarities are typically numbers but beyond that i have no idea

#

taking a guess though i'd imagine you'd have to implement the rarity?

tall wharf
#

i think you have to set by indexing SMODS.Rarities idk

#

I'll try that later

unkempt kestrel
rain slate
#

maybe the weight is too high and it can't process the number correctly?

brazen tusk
#

could it be the "ja_" difference or is that intentional?

rain slate
#

set it to like 99999 and see what happens

rain slate
#

I looked it up and rarity key format is {mod prefix}_{rarity key set in SMODS.Rarity}

scarlet spire
#

oh god, is there any way to fix nil values on jokers when they're in the info_queue

heady siren
#

How would one run code if the joker you want to run it on is sold?

heady siren
rain slate
heady siren
#

Got it

unkempt kestrel
#

do i actually need this pools table like what does it do

#

is it just the chance of getting each joker in that rarity?

unkempt kestrel
#

its still seems weird that when i add just jimbo into the pools thing both jimbo and the other joker have an equal chance of appearing

#

and nothing else

#

just with jimbo

scarlet spire
heady siren
#

Because you sell your joker to do something

scarlet spire
#

ah, yeah it's just selling_self iirc

#

but I haven't implemented that part yet

daring fern
#

How could one do the misprint effect on the text?

heady siren
#

How do I add a card to the hand or deck with a direct card table?

primal shoal
#

oh no i just had the idea to do a wordle joker
you type in the info box that show up and if you get the wordle correct it give you X5 mult

iron iron
#

trying to make a hiker but for mult and only lucky cards, but this doesnt work

tall wharf
#

don't you dare

primal shoal
#

oh you did it already LMAO

tall wharf
#

nuh uh

iron iron
#

i love the infinity symbol being a sideways 8

tall wharf
heady siren
#

How hard is it to add a playing card to the player's hand or deck? I'm looking around for how to do it and I can't find anything in the documentation

tall wharf
#

area:emplace(card)...

tall wharf
lofty axle
#

so i have a joker thats meant to destroy all cards held in hand once sold, but i have no idea how id go about doing that. closest thing ive done is print the value for all cards held in hand :/

heady siren
tall wharf
#

then you look at code for it

#

not finding the function directly

primal shoal
# lofty axle so i have a joker thats meant to destroy all cards held in hand once sold, but i...
  if context.other_joker and context.other_joker ~= card and not self.safe then --safe chance roll fails
            G.E_MANAGER:add_event(Event({
                func = function()
                    play_sound('tarot1')
                    context.other_joker.T.r = -0.2
                    context.other_joker:juice_up(0.3, 0.4)
                    context.other_joker.states.drag.is = true
                    context.other_joker.children.center.pinch.x = true
                    -- This part destroys the card.
                    G.E_MANAGER:add_event(Event({
                        trigger = 'after',
                        delay = 0.3,
                        blockable = false,
                        func = function()
                            G.jokers:remove_card(context.other_joker)
                            context.other_joker:remove()
                            context.other_joker = nil
                            return true;
                        end
                    }))
                    return true
                end
            }))
``` this deletes all other jokers on a chance roll
you can use this is a base if you want
lofty axle
#

sweet, thanks!!

heady siren
#

I don't even know where the source code is

#

Just crack open the .exe?

primal shoal
heady siren
#

So I don't have the luxury of using like, any of the stuff I've used thus far, awesome

#

Okay I've looked through every .lua file in the .exe file and can't find anything related to "dna" that actually shows it's functions

heady siren
tall wharf
#

look for like

#

something in the base game

primal shoal
# heady siren ***How*** do I look through the source code to find what I want?
                        if #context.full_hand == 1 then
                            G.playing_card = (G.playing_card and G.playing_card + 1) or 1
                            local _card = copy_card(context.full_hand[1], nil, nil, G.playing_card)
                            _card:add_to_deck()
                            G.deck.config.card_limit = G.deck.config.card_limit + 1
                            table.insert(G.playing_cards, _card)
                            G.hand:emplace(_card)
                            _card.states.visible = nil

                            G.E_MANAGER:add_event(Event({
                                func = function()
                                    _card:start_materialize()
                                    return true
                                end
                            })) 
                            return {
                                message = localize('k_copied_ex'),
                                colour = G.C.CHIPS,
                                card = self,
                                playing_cards_created = {true}
                            }
                        end
                    end
``` here
tall wharf
#

that does kinda what you want

#

then mix them together

solar eagle
heady siren
solar eagle
brazen tusk
#

which file are the joker things in because im looking in card.lua atm and its like, half there

heady siren
solar eagle
brazen tusk
#

ah ty!!

solar eagle
#

all the definitions are

#

you can find vouchers, decks, tarot spectral etc etc

solar eagle
#

card.lua is just the handling

solar eagle
#

go see how death does it

heady siren
#

Does that allow a card variable to be passed through?

solar eagle
#

go look at the code

#

and test it!

#

find out for yourself

daring fern
solar eagle
#

no clue

#

havent needed to yet

#

look at the big loc_vars table i forget where it is

#

or the localization files maybe idk

vast fractal
#

Ctrl + F it

solar eagle
#

ctrl+f is your friend

daring fern
#

I do not understand that.

solar eagle
#

like

#

press control (or command)

#

then F

#

then type in the name of the joker or something

#

until you find what's relevant

daring fern
#

No, I don't understand what this means.

solar eagle
#

it's what does the misprint random text

daring fern
#

I know.

solar eagle
#

i am not here to understand things for you

#

that's your job

solar eagle
#

perma_mult isnt a thing