#đŸ’»ăƒ»modding-dev

1 messages · Page 555 of 1

cursive gazelle
#

Sorry i’m on phone

#

@proud charm

proud charm
#

your a life saver, thank you so much for the help! ^^

cursive gazelle
#

Check cryptid code

robust marsh
cursive gazelle
#

They have a code card (consumeable )

#

That let’s you visit shop during blind

jaunty urchin
#

p sure its the run card

robust marsh
#

alrighty

cursive gazelle
#

Idk i played it once

#

Lol

jaunty urchin
#

@robust marsh want me to send you it in dms or you alr finding it

robust marsh
#

ye i found it just now no worries, thank you regardless c:

#

although this is pretty complex mm

pastel osprey
#

did you ever figure this out? i came up with a really similar deck concept that im doing

cursive gazelle
#

There’s

#

A joker in yahimod

#

That increases negative spawn rate

#

But i think it does it in a different way

pastel osprey
#

do you have any idea how i would implement that for a deck

#

im pretty new to modding balatro but not to programming so im not sure exactly where to do that

slim ferry
#

steal from cryptid

#

đŸ”„

cursive gazelle
#

It has a percentage chance to add negative to a card appears in shop if it’s a joker

#

That’s it

pastel osprey
#

i feel like just adding an if statement is not a good way to do it

cursive gazelle
#

I think decks have a calculate function

robust marsh
#

the run card is killing me

slim ferry
#

i mean the way negative normally works is that theres a base 4% that an edition rolls at all, and then from there its another 7.5% chance (i think) for it to be negative

#

so either you mess with the edition spawns or just inflate the rate of negatives so its more likely than other editions or do the yahimod way

cursive gazelle
#

There’s a context for rerolling and a table for cards in shop you just go through the table with a for loop and do pseudorandom to either add negative to said card or no

red flower
#

you can also take ownership of negative

pastel osprey
pastel osprey
#

ah cool

hasty kelp
#

how do i make so a joker is giving extra joker slots

red flower
#

make it negative :3

#

you can change the amount of joker slots in add_to_deck and remove_from_deck

cursive gazelle
#

You either do this or manipulate negative rate

pastel osprey
#

i also want to make consumable cards spawn with negatives at the same rate

red flower
cursive gazelle
#

Consumeables can’t spawn with an edition in vanilla

pastel osprey
#

thats the point of the change

red flower
#

for that you would probably need to patch create_card

slim ferry
#

well taking ownership wont change what cards can spawn with the edition, vanilla behaviour is only on playing cards and jokers and smods doesnt change that

cursive gazelle
#

I think adding negative by yourself is a lot easier man

red flower
#

it just doesnt spawn

pastel osprey
#

ah

robust marsh
#

yeah I just don't know how to do this on my own at all, can someone help by any chance? I tried looking at Cryptid's run card and it's starting to make my head hurt.

chrome widget
red flower
hasty kelp
#

It is made in yahimod the cat named koda

pastel osprey
#

how do i set the texture of my custom deck

#

i cant find anything documenting how to do this

hasty kelp
pastel osprey
#

about that

#

i have not messed with that at all

cursive gazelle
pastel osprey
#

cuz im the goat đŸ’Ș

#

and by the goat lets just say

cursive gazelle
pastel osprey
#

but also like

#

bro lua feels so easy

#

cuz im used to writing everything i do in rust

#

ayy would you look at that

cursive gazelle
pastel osprey
#

but yeah probably

cursive gazelle
#

If you’re confident i highly recommend read the src of steamodded

pastel osprey
#

cant wait for somebody to get streamer luck and find 5 negative blueprints by ante 7

pastel osprey
#

not in lua but in general programming

#

but lua is pretty simple so its not awful

cursive gazelle
#

Some old guy said 1% confidence is all i need to gamble

#

He lost all his wealth

pastel osprey
#

bro 0% confidence is all i need to gamble

#

thats why im built different (poorly constructed)

robust marsh
#

lowk starting to lose it, I don't understand why this doesnt work but works when it's parsed through debugplus' eval command

cursive gazelle
#

Good luck

gaunt thistle
#

just read lovely source

#

is much less complicated

cursive gazelle
#

Oh yeah

#

Lovely is toml

gaunt thistle
#

lovely is written in rust

cursive gazelle
#

I tried to make one lovely patch and paralyzed my game

proud charm
#

Okay so this might be potentially stupid question part 2 (electric boogaloo) but where the hell am I supposed to put this damn '}' at? I thought everything was closed off properly :'<

cursive gazelle
rotund sable
#

In loc_text

cursive gazelle
#

Also use vscode
It’s much better

proud charm
cursive gazelle
#

And even without lua extension it highlights your syntax perfectly

rotund sable
#

I mean what he's using is still better than regular notepad

proud charm
#

yeah regular notepad absolutely sucks. I didn't know about VScode tho so i went with the next best thing

cursive gazelle
#

That one guy who used notepad for his entire mod deserves a clap and a half

cursive gazelle
#

Spreading vscode propaganda like theres no tomorrow

robust marsh
rotund sable
proud charm
rotund sable
#

Yeah

cursive gazelle
#

As it should

proud charm
#

awesome i'll def be getting it then

rotund sable
#

What the fuck vscode

cursive gazelle
#

AI

rotund sable
cursive gazelle
#

Like literally everything is now ai powered bro it’s ridiculous

wheat jewel
#

The count doesn't increment with every debuffed card, is there a way to make it to where it does?

cursive gazelle
#

Pay me 30$ a month and get a review on your code and suggestions!!

cursive gazelle
#

Use a for loop instead

rotund sable
#

I think joker_main had access to context.scoring_hand

cursive gazelle
#

Calculate the mult amount with context.before and add it when context.joker_main

#

Also I recommend saving the value in your config and resetting it before the for loop

wheat jewel
cursive gazelle
#

I think the check for debuff is wrong tho

#

I thinking it’s ability.debuff

wheat jewel
#

ok

cursive gazelle
#

I might be wrong

wheat jewel
#

lemme try it

#

didn't work

cursive gazelle
#

I said I might be wrong lol

pastel osprey
#

ive had to uninstall copilot on my windows 10 pc twice now

#

because it LOVES to just show up again

cursive gazelle
#

I think Ai kills research and brain functionality

pastel osprey
#

yup

cursive gazelle
#

Depends on how you use it tho

daring fern
daring fern
wheat jewel
daring fern
#

Also it's scored_card.debuff

wheat jewel
#

ok gotcha

#

but if i remove the if then how will it check if the scored card is debuffed?

#

OH WAIT

#

you meant the context if

#

my fault

#

should be good now then

#

gonna edit it to be scored_card.debuff

cursive gazelle
drowsy acorn
#

im trying to make a consumable that Disables Boss Blind and 1 selected Joker for 1 Hand, is there going to be hiccups with the 1 hand part since the consumable is technically gone already and if so, is there a better way to rectify that that isnt just keeping the consumable around until it resolves?

frosty rampart
#

latest smods added a way for the whole mod to be a calculatable object, so you can just make the consumable set a global flag to "true" and then make the mod itself set that flag back to "false" after you play a hand

#

to do so, in your mod outside of any definitions (e.g. SMODS.Joker or whatever), add SMODS.current_mod.calculate = function(self, context) and then you can write a function under that like it was a joker calculating

final jewel
#

How do I make a condition to ignore itself in the loop

median rose
#

I'm learning how patches work here: https://github.com/nh6574/VanillaRemade/wiki#whats-a-patch, but what would the name of the file with the code A basic Lovely patch looks like this:?

Since I am replacing create_UIBox_HUD, I assume I would place the entire function's content within pattern. I plan to put this code on github, but i don't want to break the sharing source code rule. Am I thinking about this wrong, or would I need to ignore the file?

final jewel
red flower
#

Posting some part of the code is not really a problem although it would be better if you load a file instead of patching the whole function

#

a patch might fail

drowsy acorn
zealous glen
#

@red flower may I ask some questions about the new probability functionality

red flower
#

go ahead

zealous glen
#

I referenced JoyousSpring but I don't see you passing an identifier to SMODS.pseudorandom_probability

red flower
#

it takes the seed by default

zealous glen
# red flower it takes the seed by default

I expect that, as long as I don't want to have an effect that interacts with my own probabilities, I should just make the identifier distinct from everything else, right?

red flower
#

yeah

pastel osprey
#

cryptid mod wormhole deck has this in it, and defines cry_negative_rate to be 20, does that boost the negative spawn rate?

init = function(self)
  SMODS.Edition:take_ownership("negative", {
  get_weight = function(self)
    return self.weight * (G.GAME.modifiers.cry_negative_rate or 1)
  end,
  }, true)
end,
#

negative spawn rate of the cards with editions i mean

red flower
#

yeah

zealous glen
red flower
#

the x of "X in Y"

slim ferry
zealous glen
#

ah wait I misread the release notes

zealous glen
pastel osprey
#

so how should i go about doing this for my own deck

zealous glen
#

but upon reread it seems like I don't

red flower
pastel osprey
#

for testing purposes i kinda want negative spawn rate to be 5%

red flower
#

haha

pastel osprey
#

just to easily see if it works

zealous glen
#

the number might change, but it's always some number

red flower
#

not if i set it to a boolean

zealous glen
#

anyways, reading this it implies it handles G.probabilities.normal internally, so I just pass numerator (usually 1)

red flower
#

yeah

zealous glen
red flower
#

good

zealous glen
#

but some languages parse Boolean as numbers

cursive gazelle
#

Like some people who use 1 and 0 in C

zealous glen
#

so like this?

#

before/after of course

wintry solar
#

yup

zealous glen
#

Do I pass the seed when evaluating loc_vars?

#

because I didn't define an identifier

red flower
#

yes

wintry solar
#

it doesn't have to be the same though

zealous glen
#

demonic input

wintry solar
#

though it would make sense

zealous glen
#

Doofenshmirtz's new inator

wintry solar
#

and you only need the identifier if you're going to have effects that affect specific probabilities

pastel osprey
red flower
slim ferry
#

well neither of those do the functionality

#

its just the deck and sleeve

pastel osprey
#

yeah thats my point

#

i did the same thing cryptid does but it just causes a crash because there's no functionality there

red flower
#

the functionality is in the take ownership you posted tho?

pastel osprey
#

i mean i thought so

red flower
#

it is

pastel osprey
#

but clearly balala doesnt like it

red flower
#

well you did something wrong

#

whats the crash

pastel osprey
#

oh boy

red flower
#

and the code

pastel osprey
#

null pointer error WOOT

#
SMODS.Back{
    name = "Overflow Deck",
    key = "rad_overflow",
    pos = {x = 0, y = 0},
    config = {
        rad_negative_rate = 20,
        joker_slot = -2,
    },
    atlas = 'Radium',
    loc_txt = {
        name = "Overflow Deck",
        text ={
            "{C:attention}-2{} Joker slots",
            "{C:attention}X3 {C:dark_edition}Negative{} chance",
            "{C:tarot}Tarot{}, {C:planet}Planet{}, and {C:spectral}Spectral{}",
            "cards may be {C:dark_edition}Negative",
            "Start with an Eternal",
            "{C:dark_edition}Negative{} {C:green}Showman",
        },
    },
    apply = function()
        G.GAME.modifiers.rad_negative_rate = self.config.rad_negative_rate

        G.E_MANAGER:add_event(Event({
            func = function()
                if G.jokers then
                    local card = create_card("Joker", G.jokers, nil, nil, nil, nil, 'j_ring_master', "deck")
                    card:set_eternal({true})
                    card:set_edition({negative = true}, true)
                    card:add_to_deck()
                    G.jokers:emplace(card)
                    return true
                end
            end
        }))
    end,
    init = function(self)
        SMODS.Edition:take_ownership("negative", {
            get_weight = function(self)
                return self.weight * (G.GAME.modifiers.rad_negative_rate or 1)
            end,
        }, true)
    end,
}
zealous glen
#

And this is how the loc_vars should look?

pastel osprey
#

OH wait i realized

#

i figured it out nvm

slim ferry
pastel osprey
#

i poorly copy pasted code my fault gang

pastel osprey
slim ferry
#

buh

red flower
#

unless you copied the load system

pastel osprey
#

can you tell that i have no idea what im doing 💀

wintry solar
#

this is why we don't recommend looking at cryptid code to learn

pastel osprey
#

i had a fucking seizure there good lord

#

i cannot type

zealous glen
#

When this says "respecting Joker order", it means inside this specific context, since O!A6s applies to all Jokers regardless of order, right?

frosty rampart
#

pretty much yea
basically it means that it's more optimal to have a +numerator joker before a xnumerator joker than the other way around

pastel osprey
#

so how do yall recommend i do this

proud charm
slim ferry
zealous glen
#

Also this probably doesn't matter to me but what is this for

slim ferry
pastel osprey
pastel osprey
red flower
frosty rampart
pastel osprey
slim ferry
#

can i see the code

#

+crash

pastel osprey
#

yea im grabbing it

red flower
#

did you add self to apply

pastel osprey
#

i just put this in the main lua file

SMODS.Edition:take_ownership("negative", {
    get_weight = function(self)
        return self.weight * (G.GAME.modifiers.rad_negative_rate or 1)
    end,
}, true)
red flower
#

that was the other crash

pastel osprey
#

i forgot to do that

#

i said i would and i did not

slim ferry
#

😭

pastel osprey
#

this is what happens when your pharmacy fucks up and cant get you your adhd meds bro

daring fern
#

How would one bring discarded cards back from G.discard, to be discarded again?

pastel osprey
#

aight there's no crash

#

lets see if it actually worked

zealous glen
#

"drawing" means moving a card from one CardArea to another

#

The main difficulty is timing

cursive gazelle
pastel osprey
#

negative rate certainly seems to be boosted

zealous glen
#

I have a Joker that draws from G.discard to G.play IIRC

cursive gazelle
zealous glen
pastel osprey
#

so if i wanted to boost the number of negatives while keeping the number of foil, holo, and poly cards the same i should take ownership of the edition chance as well correct?

#

do some math to make the numbers work out

zealous glen
daring fern
cursive gazelle
#

Do you want them to return to hand ?

daring fern
zealous glen
#

You just need to watch for the timing

cursive gazelle
#

You can clone discarded cards and add them back yo hand temporarily

daring fern
final jewel
#

guys I don't understand why it doesnt work like I just want to ignore if its the card of the seal

median rose
#

I may be misunderstanding how to format the UI but how do I get it so these strings Hello world and the seed are vertically aligned in get_item_availability? I've tried changing return {n=G.UIT.C to return {n=G.UIT.R, and also putting an alternative child in there, but still get the same results.

local orig_hud = create_UIBox_HUD
function create_UIBox_HUD()
   local contents = orig_hud()

   local jokerFoundInfo = {n=G.UIT.R, config={id = "dv_joker_found_info", align = "cm", padding = 0.1}, nodes={}}
   table.insert(jokerFoundInfo.nodes, get_item_availability())
   table.insert(contents.nodes[1].nodes[1].nodes[4].nodes[1].nodes, jokerFoundInfo)


   return contents
end

-- Checks to see if the parametrized item is found within the filters
function get_item_availability()
    return {n=G.UIT.C, config={align = "cm"}, nodes={
                  {n=G.UIT.T, config={text = tostring(G.GAME.pseudorandom.seed), colour = G.C.UI.TEXT_LIGHT, scale = 0.5}},
                  {n=G.UIT.T, config={text = "Hello world", colour = G.C.UI.TEXT_LIGHT, scale = 0.5}}
            }}
end
daring fern
zealous glen
#

Which G.FUNCS.draw_from_discard_to_deck calls

slim ferry
wispy falcon
#

If I want to move something in a cardarea where it doesn't belong instead of the right one, how would I do that? Let's say a Joker. You buy a Joker but instead of moving to the cardarea for jokers, it moves into the deck of cards.

pastel osprey
#

@slim ferry how can i take ownership of the chance to find an edition

#

rather than the weight of a particular edition

slim ferry
#

the weight is the chance

#

oh wait

#

you mean like an edition in general

pastel osprey
#

yea

#

yes

#

the chance to find one at all

cursive gazelle
#

Is this done using love graphics ?

daring fern
cursive gazelle
#

Forgot to ping

pastel osprey
#

because i want negatives to be more common than they are with the weight cranked up but i don't want to mess with the rates of the other editions

zealous glen
slim ferry
#

you would have to do like some hook or patch shenanigans for that since the edition rate isnt tied to any object

zealous glen
pastel osprey
#

do you know where the behavior for that is located

slim ferry
#

i mean im fairly sure cryptid wormhole deck also just doesnt bother

faint yacht
#

🏾

pastel osprey
slim ferry
pastel osprey
#

yeah exactly

faint yacht
#

...right, oops.

daring fern
# zealous glen

No, that draws a random card, I need to draw back the discarded cards.

pastel osprey
#

no you are good

#

its confusing to explain lol

slim ferry
pastel osprey
#

here's a thought

would it be easier to, rather than calculate the weights and edition spawn chance such that non-negative edition rates aren't impacted, just set negative weight to 0 and then have a separate dice roll to make it negative

zealous glen
#

As is written

pastel osprey
#

that way i could make negative a separate chance entirely, thus unaffected

slim ferry
#

i mean i think the latter would be easier

pastel osprey
#

agreed

daring fern
zealous glen
daring fern
slim ferry
pastel osprey
#

eris do you know which file create_card is in

slim ferry
#

i think functions/common_events.lua

pastel osprey
#

im guessing card.lua maybe

pastel osprey
zealous glen
slim ferry
pastel osprey
#

im like really lazy though i just have the games source code open in 7z

#

💀

slim ferry
#

you can press the unpack all or whatever button and dump it into some folder

pastel osprey
slim ferry
#

awesome

pastel osprey
#

but again im lazy asf

#

(i make things hard for no reason)

wispy falcon
#

Like switch their places

pastel osprey
#

bro i am not a fan of john thunk inventor of localthunk's arithmetic formatting here

#
function poll_edition(_key, _mod, _no_neg, _guaranteed)
    _mod = _mod or 1
    local edition_poll = pseudorandom(pseudoseed(_key or 'edition_generic'))
    if _guaranteed then
        if edition_poll > 1 - 0.003*25 and not _no_neg then
            return {negative = true}
        elseif edition_poll > 1 - 0.006*25 then
            return {polychrome = true}
        elseif edition_poll > 1 - 0.02*25 then
            return {holo = true}
        elseif edition_poll > 1 - 0.04*25 then
            return {foil = true}
        end
    else
        if edition_poll > 1 - 0.003*_mod and not _no_neg then
            return {negative = true}
        elseif edition_poll > 1 - 0.006*G.GAME.edition_rate*_mod then
            return {polychrome = true}
        elseif edition_poll > 1 - 0.02*G.GAME.edition_rate*_mod then
            return {holo = true}
        elseif edition_poll > 1 - 0.04*G.GAME.edition_rate*_mod then
            return {foil = true}
        end
    end
    return nil
end
#

misinput

#

put spaces between your variables and your * please 🙏

red flower
daring fern
median rose
zealous glen
wispy falcon
daring fern
zealous glen
#

Text is usually organized in horizontal lines on top of each other, so text nodes go inside row nodes inside a column node

wispy falcon
red flower
zealous glen
#

Text of different colors or effects are different text nodes

daring fern
zealous glen
#

So a row can contain multiple text nodes

#

A common effect is a background color, which is actually a column node, so you could have a column with a row with text and (column with text)

wispy falcon
zealous glen
#

When you read a Joker's description, try to mentally break it down in terms of nodes and you should be able to visualize what the nodes are doing

pastel osprey
faint yacht
#

poll_edition is actually overriden by SMODS entirely.

pastel osprey
#

oh okay

#

i was thinking that because there is some stuff that i used with smods that is missing from there

faint yacht
zealous glen
#

@red flower I had a Joker whose intended effect was to add +1 to the numerator. So instead of whatever was happening on the left, I can now just have whatever is going on the right?

faint yacht
#

See src/overrides.lua for it.

pastel osprey
# faint yacht

is there a global avariable i can set inside my deck to control the overall chance of finding an edition?

faint yacht
#

Your deck can set a variable to the run itself in apply.

pastel osprey
faint yacht
#

G.GAME.negativefartchance or w/e.

median rose
#
  1. Is there some sort of data structure for jokers within the source code? And do jokers have some sort of id so you can check for a certain one, like "blueprint"
  2. How can I check which jokers are going to show up in the shop. Whether on first entrance, or on reroll?

I found these lines within state_events.lua end_round(), but I can't seem to get a reference to jokers

G.jokers.cards[i]:calculate_rental()
G.jokers.cards[i]:calculate_perishable()
wispy falcon
pastel osprey
#

i already have the negative weight change

#
SMODS.Edition:take_ownership("negative", {
    get_weight = function(self)
        return self.weight * (G.GAME.modifiers.rad_negative_rate or 1)
    end,
}, true)


SMODS.Back{
    name = "Overflow Deck",
    key = "rad_overflow",
    pos = {x = 0, y = 0},
    config = {
        rad_negative_rate = 20,
        joker_slot = -2,
    },
    atlas = 'Radium',
    loc_txt = {
        name = "Overflow Deck",
        text ={
            "{C:attention}-2{} Joker slots",
            "{C:attention}X3 {C:dark_edition}Negative{} chance",
            "{C:tarot}Tarot{}, {C:planet}Planet{}, and {C:spectral}Spectral{}",
            "cards may be {C:dark_edition}Negative",
            "Start with an Eternal",
            "{C:dark_edition}Negative{} {C:green}Showman",
        },
    },
    apply = function(self)
        G.GAME.modifiers.rad_negative_rate = self.config.rad_negative_rate

        G.E_MANAGER:add_event(Event({
            func = function()
                if G.jokers then
                    local card = create_card("Joker", G.jokers, nil, nil, nil, nil, 'j_ring_master', "deck")
                    card:set_eternal({true})
                    card:set_edition({negative = true}, true)
                    card:add_to_deck()
                    G.jokers:emplace(card)
                    return true
                end
            end
        }))
    end
}
#

heres my code

median rose
daring fern
faint yacht
#

You can perform your own probability roll and then set _guaranteed to be true in the hook.

drowsy acorn
# frosty rampart latest smods added a way for the whole mod to be a calculatable object, so you c...

so uh, this is an infinite loop and i dont really understand why

SMODS.current_mod.calculate = function(self, context)   
    if G.GAME.blind and G.GAME.blind.boss and not G.GAME.blind.disabled and Cosmic_Zapped then
        G.E_MANAGER:add_event(Event({
            trigger = 'after',
            delay = 50,
            func = function()
                G.GAME.blind:disable()
                return true
        end
        }))
    end
end```
should i set another flag/check to make sure it doesnt disable the boss blind 40 bajillion times in 2 seconds?
daring fern
zealous glen
wispy falcon
median rose
frosty rampart
faint yacht
# pastel osprey how though
local polleditionref = poll_edition
function poll_edition(_key, _mod, _no_neg, _guaranteed, _options)
  -- do chance roll here - if it succeeds, _guaranteed = true
  return polleditionref(_key, _mod, _no_neg, _guaranteed, _options) -- call original function
end
final jewel
#

how can I round down a number ?

daring fern
faint yacht
#

math.floor(number)

drowsy acorn
#

or math.ceil(x)

slim ferry
#

No

drowsy acorn
#

if you want to round up

slim ferry
#

Well yeah

pastel osprey
#

thats what im unclear on

slim ferry
#

It doesnt replace it

pastel osprey
#

like how does this actually do the thing

slim ferry
#

It modifies it

drowsy acorn
#

chat i cant read lol

pastel osprey
#

does it just kinda work

zealous glen
#

98%

slim ferry
faint yacht
#

local polleditionref = poll_edition sets a local variable to be equal to the original function, then we override the function with our own, but with calling the original function at the end.

pastel osprey
slim ferry
#

Yeah

#

Same with any hook

pastel osprey
#

oh thats fucking sick

#

sorry if i am overthinking this

#

i am used to game engine stuff in rust where everything is so much more complicated

slim ferry
#

Hooks are awesome they allow you to do like cool shit

pastel osprey
#

much more powerful but much more complex

zealous glen
pastel osprey
slim ferry
zealous glen
#

@red flower for April's Fools you should replace "What's a hook?" with a photo of Captain Hook and "How do I debug my code?" with a bug spray

red flower
#

i will just make the page redirect to jokerforge

zealous glen
faint yacht
#

Without 'em, wouldn't be able to do shenanigans with scoring stuff.

pastel osprey
#

and also which pseudorandom function do i use for the roll? ive seen several in the source code but i want to make sure i use the right one

#

cuz yknow seed stuff

faint yacht
#

_guaranteed = true & _options = { 'e_negative' }

zealous glen
pastel osprey
slim ferry
#

probably just regular old pseudorandom

pastel osprey
#

this might be a stupid question but what is the convention for random rolls in balatro modding

#

again im not very experienced with lua so im not super sure what the correct way to do it is

slim ferry
#

You should generally always use pseudorandom functions for stuff that happens in runs

zealous glen
faint yacht
#

Probability, more of.

zealous glen
#

To streamline how mods interact with it

pastel osprey
#

oh cool

zealous glen
faint yacht
#

đŸ”Ș

pastel osprey
slim ferry
zealous glen
#

-# Also rolling for stuff with weights is still rolling

pastel osprey
#

okay simple question

#

what do i actually write to do the roll

zealous glen
#

What kind of roll

pastel osprey
#

lets just say for example i want a 5% chance for the guaranteed negative

zealous glen
#

If you don't want it to be affected for anything else

slim ferry
#

Didnt the guy literally put a comment for where the roll should go

pastel osprey
faint yacht
#

Where, but not what exactly.

slim ferry
#

Fair

pastel osprey
#

again i have like zero experience with lua

#

i've written a script brush for axiom but thats like all my recent experience LMFAO

zealous glen
pastel osprey
#

i know how the math works

#

i just dont know what the code needs to look like

zealous glen
#

pseudorandom samples an uniform random variable according to a given seed

pastel osprey
#

for the 5% chance i would do a weighted roll with guaranteed being a weight of 1 and not negative being a weight of 19

zealous glen
ocean sinew
#

can we stop calling hooks hooks

#

and call them

zealous glen
#

That's the new one

ocean sinew
#

upvalues functions

#

cuz you don't use debug.gethook

#

you use debug.getupvalue

#

😎

#

hook sounds gay

#

upvalue sounds cool

pastel osprey
#

"upvalue" who let this guy cook get him off the grill

ocean sinew
#

"ermmmm can I hook you please sir"

#

"can I upvalue you sir 😎 "

pastel osprey
#

so maybe you make a good point

#

i do like tax fraud

ocean sinew
#

same

#

tax fraud is the best thing in the world

#

W tax fraud

pastel osprey
#

this is what i have

#
local polleditionref = poll_edition
function poll_edition(_key, _mod, _no_neg, _guaranteed, _options)
  -- do chance roll here - if it succeeds, _guaranteed = true
  return polleditionref(_key, _mod, _no_neg, _guaranteed, _options) -- call original function
end
#

what do i actually put in there

zealous glen
wispy falcon
#

Okay, quick question: What are the different cardareas called again or where can I find what they're called in the documentation?

pastel osprey
#

but like how to do that in lua ergonomically

daring fern
slim ferry
#

G.vouchers also exists

zealous glen
zealous glen
#

and the collection CardAreas

pastel osprey
zealous glen
ocean sinew
#

you just do the weighted random element algorithm normally

zealous glen
#

And suggesting you think of one to start with

ocean sinew
#

but you use pseudorandom instead in Balatro to keep the same results across the same seed

zealous glen
#

Because it's easier

red flower
#

for an example

vernal orchid
#

dont really have any clue about modding but how hard would it be to make a mod to remove the negative color inversion filter?

robust marsh
#
            for i = 1, played_count do
                G.E_MANAGER:add_event(Event({
                    func = function()
                        G.play.cards[i]:juice_up()
                        return true
                    end,
                }))

crashes when a glass card breaks, any ideas?

vernal orchid
#

like 0/10 braindead easy

ocean sinew
ocean sinew
#

easy but you gotta think

robust marsh
vernal orchid
# ocean sinew nah more like 2/10

best guide you think to show something like that? Im seeing guides for how to make jokers but that info doesnt feel super applicable to what i want to do

ocean sinew
robust marsh
#

ight

pastel osprey
ocean sinew
pastel osprey
#

how would i just do a weighted boolean roll

#

like i would expect that to have a util function right?

zealous glen
pastel osprey
zealous glen
#

You said you knew it so I didn't

#

Anyways

pastel osprey
#

its a lot easier for me to figure out how it works if i can just read it than if it is explained to me

pastel osprey
#

ive said like 4 times now that i understand how it works just not how i SHOULD do it in lua

zealous glen
#
if pseudorandom('your_seed') < p then
 

else
 

end
pastel osprey
robust marsh
#

i got softlocked

pastel osprey
#

if i want a 1/20 chance of the roll hitting, where do i specify that 20

ocean sinew
zealous glen
robust marsh
ocean sinew
zealous glen
pastel osprey
#

wait so is p 1/20

zealous glen
#

Yes but

pastel osprey
#

OHHH wait i see

vernal orchid
zealous glen
#

I'll reiterate what I said before

pastel osprey
#

i think i get it

#

sorry that took me a second

zealous glen
#

This is technically wrong

pastel osprey
#

im very tired lol

zealous glen
#

but it should be close enough

robust marsh
pastel osprey
#

pseudorandom gives you a float correct?

ocean sinew
wispy falcon
#

Is this what defines that jokers move into the joker cardarea?

        local joker_tally = 0
        for i = 1, #G.jokers.cards do
          if G.jokers.cards[i].ability.set == 'Joker' then joker_tally = joker_tally + 1 end
        end
        if joker_tally > G.GAME.max_jokers then G.GAME.max_jokers = joker_tally end
        check_for_unlock({type = 'modify_jokers'}) 
    end```
zealous glen
#

You'll end up with a greater than 20% chance of getting Negative

ocean sinew
#

you're only returning true If G.play.cards[i] exists

robust marsh
#

ah

ocean sinew
#

you need to keep return true outside the if statement

pastel osprey
robust marsh
#

ight, thank you

ocean sinew
#

np

zealous glen
#

If the original chance of getting Negative is q, and you do it as I suggested, the chance that you get Negative will end up as (1/20) + (19/20)q

pastel osprey
#

because of the existing 0.3% of getting a negative

ocean sinew
zealous glen
#

so YMMV if you want to care about that

robust marsh
#

yeah it works now tysm

pastel osprey
zealous glen
#

and 19.7% ~ 20%

zealous glen
pastel osprey
#

oh

#

yea

zealous glen
pastel osprey
#

i was about to ask about the seed thing

zealous glen
#

Seeds should be unique if you want to avoid random effects influencing each other

zealous glen
#

Though if you want them to influence each other, they should be the same

#

I think here you'd rather not

#

So just prepend your mod's infix to the seed, and that should be unique enough

pastel osprey
#

so how would i get the seed in that case

zealous glen
#

I mean, the seed can be whatever you want

pastel osprey
#

apologies if im overthinking this lol

pastel osprey
daring fern
pastel osprey
#

if i start two runs with the same seed, will that chance hit the same each time?

zealous glen
#

Yes, but I'm not talking about that seed

pastel osprey
#

okay cool thanks

zealous glen
#

I'm talking about the internal seed for this pseudorandom call

pastel osprey
#

i wasnt sure if that was bundled into the pseudorandom function or not

zealous glen
wispy falcon
zealous glen
#

this is based on number of calls to pseudorandom with this seed

pastel osprey
#

again sorry if im overthinking it ive been using a game engine in rust for a while now so im used to the whole thing of global variables dont exist n shit

zealous glen
#

If you don't make a call, it doesn't advance the seed

pastel osprey
#

cuz rust is not a fan of those

wispy falcon
#

I'm stupid

pastel osprey
#

so wait what did you say i should pass in to pseudorandom as the seed

#

it was my mod's id thing then what after that

zealous glen
#

whatever you want

pastel osprey
#

okay cool

#

thanks for the help

ocean sinew
#

is there a function for predicting what will happen with a certain seed?

wispy falcon
daring fern
pastel osprey
#

20% negative rate is so fair and so balanced

wispy falcon
# daring fern Yes.

And I would change that to G.deck:emplace(c1) to move them in deck and G.hand:emplace(c1) to move them into the hand?

daring fern
pastel osprey
#

how would i go about making planet, spectral, and tarot cards spawn as negatives?

#

maybe not spectrals because this isnt ghost deck

#

but yknow

#

i set the negative chance back to 5%

#

this is based

#

this deck might be fucked balance wise but that remains to be seen

#

im trying a run rn

#

the 3 joker slots thing is kinda crippling ngl

#

getting a run off the ground may be tough

median rose
drowsy acorn
#

im currently struggling getting the effects of the boss blinds back to work properly, any advice on how to fix it? (ive been using the candy sticks joker from cryptid as a reference)

Cosmic_Zapped = false
SMODS.current_mod.calculate = function(self, context)   

    if context.setting_blind then
       Boss_Ability = G.GAME.blind:save()
    end 
    if G.GAME.blind and G.GAME.blind.boss and not G.GAME.blind.disabled and Cosmic_Zapped then
            Cosmic_Zapped = false
        G.E_MANAGER:add_event(Event({
            trigger = 'after',
            delay = 0.2,
            func = function()
                G.GAME.blind:disable()
                return true
        end
        }))
    end
    if context.after and G.GAME.blind.boss and G.GAME.blind.disabled then
                G.E_MANAGER:add_event(Event({
            trigger = 'after',
            delay = 0.2,
            func = function()
            G.GAME.blind:load(Boss_Ability)
            return true
        end
        }))
    end
end```
pastel osprey
feral tree
#

how do i have a consumable detect when a joker is selected? wanna make a consumable that simply makes a selected joker negative

slim ferry
#

G.jokers.highlighted is the selected jokers

pastel osprey
wispy falcon
#

Why does this change nothing? It doesn't even do the print

version = "0.1.0"
priority = 0

#Change areas for jokers
[[patches]]
[patches.pattern]
target = 'button_callbacks.lua'
pattern = '''
G.jokers:emplace(c1)
'''
position = "at"
payload = '''
if G.GAME and G.GAME.selected_back and G.GAME.selected_back.effect.center.key == "b_cstorm_law_of_chaos"
    G.deck:emplace(c1)
    print("Works")
end
'''
match_indent = true```
vernal orchid
ocean sinew
#

but shaders are different

#

shaders are hard ngl

vernal orchid
#

yeah thats what ive been currently experiencing lol

#

anytime i try fuckin with em game crashes on seein a negative

#

nothin in game.lua even references the shader to my knowledge so ima try and look and see where it does call it out

vernal orchid
#
            if (self.edition and self.edition.negative) or (self.ability.name == 'Antimatter' and (self.config.center.discovered or self.bypass_discovery_center)) then
                self.children.center:draw_shader('negative', nil, self.ARGS.send_to_shader)
                if self.children.front and self.ability.effect ~= 'Stone Card' then
                    self.children.front:draw_shader('negative', nil, self.ARGS.send_to_shader)
                end```
#

this maybe?

#

in card.lua

slim ferry
#

If you just want to remove the negative shader you can just take ownership of negative right?

#

Plus the shader is already split into the shine and the colour inversion

vernal orchid
#

yeah I saw that, im fine with the shine existing i just want the inversion gone

#

trying to work out how to dump that. What do you mean by take ownership of negative?

daring fern
vernal orchid
ocean sinew
#

balatro modding

#

cuz SMODS is just api stuff

wispy falcon
remote shell
#

very soon

wispy falcon
#

Do I need to replace/patch the whole code for function G.UIDEF.deck_preview(args) to show the jokers instead of the cards?

daring fern
primal robin
#

imaginary price goddamn

wispy falcon
daring fern
wispy falcon
#

Wait, what is the card? I didn't define it...

wispy falcon
vernal orchid
wispy falcon
pastel osprey
#

how do we think this is balance wise

#

like i said earlier, the -2 joker slots is a massive kick in the nads

cursive gazelle
pastel osprey
#

elaborate

#

too strong or too weak

cursive gazelle
#

For reference painted deck -1 joker slot +2 handsize

pastel osprey
#

yeah but bro

#

5% negative chance is crazy

cursive gazelle
#

What if you can’t afford it tho

pastel osprey
#

that is a fair point actually

#

i might make the deck have negatives not expensive

#

and remove the showman

cursive gazelle
#

Actually idk if it’s balanced you’ll have to playtest

pastel osprey
#

yeah im playtesting it

#

do you wanna try a run on it?

cursive gazelle
#

I don’t have access to my pc i’m not home

#

Good luck tho

pastel osprey
#

it seems to be kind of similar to plasma deck progression wise

#

the earlygame is not bad

#

midgame is hard

#

but once you can get it off the ground with some econ, the extra negative jokers can make the run go crazy

cursive gazelle
#

Not every negative is useful to your build

#

What can ancient joker do if you’re running a baron build

#

Lol

pastel osprey
#

hello there

pastel osprey
#

but it goes from 0.3% ro 5%

#

thats huge

#

ah fuck right 3 joker slots

#

yeah ouch

cursive gazelle
pastel osprey
#

im gonna hang on to invis until i see something good

#

i still need to make the code that allows consumables to be negative

#

lowkey part of me thinks

#

maybe this deck could start you with an ecto rather than the goofy ass showman

#

the showman's purpose is simply to be funny tbh

cursive gazelle
#

Why ecto when you can get free negative

#

If anything ankh would be the best

pastel osprey
#

i can work with this

pastel osprey
pastel osprey
cursive gazelle
#

Not 100% free but increased chance

pastel osprey
#

yea

cursive gazelle
#

I mean i’m taking a negative if i see it

pastel osprey
#

i might change -2 joker slots to -1

clear ocean
#

a free negative often doesn't hurt

pastel osprey
#

-2 is such a lead pipe to the skull

cursive gazelle
#

Rental free negative

pastel osprey
vernal orchid
#

boys i dont know wtf im doin rn help

if im tryna prevent negative edition from having the color inversion and using negative.fs is this the right direction even somewhat??

    {
     disable_base_shader = true,
     shader = "negative",
     }
) ```
cursive gazelle
#

You can’t change shaders to my knowledge

vernal orchid
#
GitHub

A Balatro Modding Framework. Contribute to Steamodded/smods development by creating an account on GitHub.

GitHub

Steamodded example mods. Contribute to Steamodded/examples development by creating an account on GitHub.

vernal orchid
cursive gazelle
#

Try to

#

Shader= custom shader

pastel osprey
#

is this better than chad here

#

idk

cursive gazelle
#

If it works then you can make the shader do nothing

#

Editions don’t work without shaders to my knowledge

pastel osprey
#

real talk tho like why do you want to disable the negative shader

#

how can you tell its negative at that point

vernal orchid
#

i just wanna see if i can do this

pastel osprey
#

lmao real

#

we are in BUSINESS

vernal orchid
pastel osprey
#

chat do i sac the scoring for the bag

cursive gazelle
vernal orchid
#

do you know what the code should look like?

#

gonna ref that edition examples rq

pastel osprey
cursive gazelle
#

Just add shader=“holographic”

pastel osprey
#

im so helpful i know

cursive gazelle
#

Api docs says to edit parameters

pastel osprey
#

you have GOT TO BE KIDDING ME

#

right after i pick up golden ticket

#

showman shows his man

#

when showman show man he show you golden ticket

cursive gazelle
ivory citrus
#

Hi, Can anyone help me with this?

pastel osprey
#

im gonna cry

vernal orchid
#

when you take ownership do you need to include the assets in your mod that youre replacing with

#

like do i need to include the holo.fs

#

if im trying to change it to holo temporarily

pastel osprey
#

hi chad

#

there we go

#

so uh

#

i only found one nat negative

wind steppe
#

when is debuff_card called

charred widget
#

Alright friends i need some help

#

i have two jokers that apply red and purple seals to wild and steel cards respectively

#

and when the hand starts scoring it just applies all the seals instantly

#

but i want it to apply the seals one at a time and only after the card is scored

#

how would i do this

rocky plaza
# charred widget how would i do this

you need to move context.other_card:set_seal to a different spot
more specifically you'd need to return a function that creates an event which sets the seal
it's kind of a lengthy process to explain so do you want me to give you the proper calculate function or do you want me to guide you into inserting the event properly?

charred widget
rocky plaza
# charred widget i'll save you the trouble of explaining, just the calculate function pls

for koraidon it'd be

calculate = function(self, card, context)
    if context.individual and context.cardarea == G.play  then
        if SMODS.get_enhancements(context.other_card)["m_wild"] == true then
            return {
                func = function()
                    G.E_MANAGER:add_event(Event({
                        func = function()
                            local temp_card = context.other_card
                            temp_card:set_seal("Red", true)
                            return true
                        end
                    }))
                end
            }
        end
    end
end
hexed saffron
#

I'm trying to make a (what I imagine is) basic card texture replacement pack but I'm struggling with lua, is this the correct channel to get support for that?

so far I've changed the enhancements texture and trying to get the game to load but it crashes on load and I've looked at the steamodded documentation but it didn't really explain how to get the atlas key to work (I'm also very new to lua and this is my first mod I've created so sorry if there's something I missed)

also I'm on linux and using r2modman

charred widget
#

and i presume i can just replace "m_wild" with "steel" and "red" with "purple"

median rose
charred widget
#

for miraidon

errant arrow
#

question, does the code shown below add every instance of the selected joker or just sums them all up to one?

        if G.jokers and G.jokers.cards then
            for i, joker in ipairs(G.jokers.cards) do
                if joker.config.center.key == 'j_rose_hydrangea' then
                    duplicate_count = duplicate_count + 1
                end
            end
        end
charred widget
rocky plaza
#

oh
hmm i thought it worked like that

rocky plaza
errant arrow
#

okay, so with the code as it is if i had x amount of j_rose_hydrangea, i would have duplicate_count = x + 1, gotcha

languid ginkgo
#

Does anyone know how to change the background color of the menu?

rocky plaza
charred widget
rocky plaza
# charred widget sure thang
calculate = function(self, card, context)
    if context.individual and context.cardarea == G.play  then
        if SMODS.get_enhancements(context.other_card)["m_wild"] == true then
            local temp_card = context.other_card
            return {
                func = function()
                    G.E_MANAGER:add_event(Event({
                        func = function()
                            temp_card:set_seal("Red", true)
                            return true
                        end
                    }))
                end
            }
        end
    end
end
#

there we go

charred widget
#

cool i'll let you know how it goes

#

it works well

#

although there is a little tweak i'd like to make if you're down to help me

rocky plaza
#

sure

charred widget
#

alright cool

#

I'd like the seal to apply like it does when you use a consumable like talisman or deja vu

#

like it does a little wiggle and a thunk sound plays

#

a local thunk if you will

rocky plaza
# charred widget like it does a little wiggle and a thunk sound plays
calculate = function(self, card, context)
    if context.individual and context.cardarea == G.play  then
        if SMODS.get_enhancements(context.other_card)["m_wild"] == true then
            local temp_card = context.other_card
            return {
                func = function()
                    G.E_MANAGER:add_event(Event({
                        func = function()
                            temp_card:set_seal("Red", true)
                            temp_card:juice_up(0.3, 0.5)
                            play_sound("tarot1")
                            return true
                        end
                    }))
                end
            }
        end
    end
end
#

juice_up does the wiggle and play_sound does the sfx

charred widget
#

oh that's what "juice up" means

rocky plaza
#

yep

charred widget
#

i saw that in joker forge and i was like "wtf does that mean"

rocky plaza
charred widget
#

alright i'll see how it goes

rocky plaza
split saddle
#

can you add a custom color to G.C?

rocky plaza
rocky plaza
split saddle
#

I was gonna say tag return color but i'm having trouble loading the tag XD

rocky plaza
split saddle
#

the little + icon when they're redeemed

rocky plaza
#

oh

split saddle
#

wait i think i found it

#

you can declare a color with a variable

charred widget
#

ok thunderedge it is almost perfect, i just need it to pause before it gets to the next card, i dont want every event to happen at the same time

rocky plaza
charred widget
#

yeah

#

i just don't want it to score and apply the seal at the same time

rocky plaza
# charred widget i just don't want it to score and apply the seal at the same time

try this

calculate = function(self, card, context)
    if context.individual and context.cardarea == G.play  then
        if SMODS.get_enhancements(context.other_card)["m_wild"] == true then
            local temp_card = context.other_card
            return {
                func = function()
                    delay(0.9)
                    G.E_MANAGER:add_event(Event({
                        func = function()
                            temp_card:set_seal("Red", true)
                            temp_card:juice_up(0.3, 0.5)
                            play_sound("tarot1")
                            return true
                        end
                    }))
                    delay(0.9)
                end
            }
        end
    end
end

increase the 0.9 if the pause is too short

charred widget
#

ty! ^v^

rocky plaza
#

lemme know if it still doesnt do what you want it to do

charred widget
#

well hold on

#

i'm thinking of a different kind of delay

rocky plaza
#

oh

charred widget
#

i'm not looking for a satic delay

#

just like the normal delay between scoring cards that is based around your game speed

rocky plaza
charred widget
#

oh

#

do you know the base delay the game works with?

#

is it just 0.9

rocky plaza
charred widget
#

alright cool

#

i'll see how it feels

#

ok its almost there

#

and this last adjustment i could probably do myself

#

i just want the joker to get "juiced up" at the same time the seal appears

rocky plaza
#

yeah if its pausing too short or too long just change the delay values

#

oh

#

hmm

hexed saffron
#

also thank you for helping me sorry for not responding earlier.

rocky plaza
hexed saffron
#

in on the main menu in the options screen in the game I presume is where I find the "textures" button of which there is none

rocky plaza
#

also strange the menu should be there

split saddle
#

how do you open a booster pack from a tag?

#

i tried copying code from paperback and bunco (they were the same code in the end) but it didn't work

#

with this crash:

red flower
#

i think the crash is because the key is not correct tho

split saddle
#

i'll check

#

thx

glass scaffold
#

Are the create_card and SMODS.ObjectType needed in this case, or can I do with just create_card?

charred widget
#

@rocky plaza do you know how to make this last adjustment? i'm gonna need to go to bed soon but i dont wanna rush you either

rocky plaza
charred widget
#

the joker shakes, pauses, then it applies the seal and the card shakes

rocky plaza
#

oooohhhhh

rocky plaza
charred widget
#

alright

#

IT WORKED LOL

glass scaffold
red flower
#

yeah you're literally not using it lol
but objectypes are nicer

#

also create_card needs the area iirc

glass scaffold
#

The retrigger isn't happening, anyone got a clue on how to fix?

red flower
#

context.repetition

glass scaffold
hexed saffron
#

I cloned the repo directly into the mod folder instead of downloading a zip and installing it through r2modman

crystal perch
#

anyone know why my tag isn't working? i just want it to create a free booster pack when you enter the shop

SMODS.Tag {
    key = "ghostly_shopper",
    atlas = "Tags",
    pos = { x = 2, y = 0 },
    loc_txt = { -- local text
        name = 'Ghostly Shopper Tag',
        text = {
                'The next shop will have',
                'an additional {C:attention}free',
                '{C:chak_sticker_ethereal}Ethereal Buffoon Pack{}'
            }
        },
    loc_vars = function(self, info_queue, tag)
        info_queue[#info_queue + 1] = G.P_CENTERS.p_chak_buffoon_ethereal
    end,
    apply = function(self, tag, context)
        if context.starting_shop then
            tag:yep('+', G.C.GREEN, function()
                local booster = SMODS.add_booster_to_shop('p_chak_buffoon_ethereal')
                booster.ability.couponed = true
                booster:set_cost()
                return true
            end)
            tag.triggered = true
            return true
        end
    end
}
#

it doesn't even get used up atm

hexed saffron
#

what does this mean

crystal perch
#

either your localisation files are inputted incorrectly or your loc_text was inputted incorrectly

hexed saffron
#

it looks like this

old void
hexed saffron
#

how so?

gray void
#

Why theres an openng bracket, without a closing bracket-

#

Oh rite

#

Me blind

vernal path
rotund sable
rotund sable
hexed saffron
vernal path
#

oh, that also makes sense. why not use kate tho?? lol

#

i mean the two are so similar

rotund sable
hexed saffron
#

aerothemeplasma

vernal path
#

there are themes for plasma that make things look like vista
or macos
or fuckin, idk, windows 3

hexed saffron
#

tru

#

wait nvm I see it

rotund sable
#

There are themes for everything in Linux

hexed saffron
#

anyway I'm not sure why it's error-ing out and not applying

old void
# hexed saffron how so?

because its. it seems to be a linux text editor but it has the windows theme and our brain just errors out on that one

hexed saffron
#

oh

#

it looks like this now, not sure if that helped

lost current
#

I am currently doing some bugfixing for my mod and I can't get this Joker to work. It's effect is to draw hands to card before scoring, which works, but the drawn cards do not trigger held-in-hand effects (steel, Baron, etc.). Any ideas on how to fix?

rotund sable
hexed saffron
#

yes

#

well now it's completely different and it all works now

rotund sable
#

Well that's good at least

manic rune
#

đŸ€” how do u ease the position of an uibox

#

like, having it move

#

stuff

stiff locust
#

I don't see anything

manic rune
#

do u know what red is :3

robust marsh
#

is there a way to hard set a specific value for the booster/voucher/shop size? I know SMODS.change_booster_size and things like that exist but as I said I wanna know if I can just hard set the value that it is changing instead.

wet crag
#

I use a very similar method for one of my jokers

stiff locust
#

so

no

wet crag
#

For booster packs you can set the config for the number of picks and choices

daring fern
wet crag
#

And I'm not really familiar with change booster size but could you not do like, change booster size * 0 + number

#

That's what I was thinking

robust marsh
wet crag
#

Sorry im about to go to sleep I'd check my code otherwise. If you still need help with stuff tomorrow feel free to message me

robust marsh
daring fern
robust marsh
#

alrighty

robust marsh
robust marsh
daring fern
robust marsh
robust marsh
#

i think i can just remove them instead of setting their limit but idk how to remove them really

daring fern
robust marsh
robust marsh
proud charm
#

Managed to get things mostly working, however i do need help with this text box thing. Is this a syntax error or am I missing something?

proud charm
#

☠ ofc i would miss that lmao thxs for the help

#

Also unrelated question: is it possible to change the white background of the cards in your deck to another color? (Doing a Luigi Poker mod and I wanna get it as close to the OG game as possible)

robust marsh
robust marsh
#

they still stack on top of each other

proud charm
# daring fern What do you mean?

so lets say I wanted to change the white background of these cards to the light blue color that the Luigi Poker cards have, is that possible to do or am I stuck with the white color?

daring fern
proud charm
#

gotcha, i'll look into setting that up. It's not really that important but I think it would just be better if it was as 1:1 as possible lol

proud charm
# proud charm Managed to get things mostly working, however i do need help with this text box ...

okay everything is mostly working, my last hurdle is just the Xmult calculation not working (and the fact theres the extra tag under where the joker rarity shows up, dunno if that can be removed or hidden). I'm following this tutorial to a T but it's still giving me issues 😭 sorry for all the probably super dumb questions I really shouldn't be doing this with like 4 hrs of sleep ☠

proud charm
daring fern
pastel kernel
#

I plan to make a joker called Golden Freddy which gives a random rare consumable at the end of the round. How do you make specifically a random rare consumable spawn?

manic rune
daring fern
manic rune
#

oh nvm its hidden

#

does seem like either would work though unless there are consumables with soul_set thats not rare somehow đŸ€”

pastel kernel
manic rune
#

no

pastel kernel
proud charm
# daring fern `no_mod_badges = true` on the joker definition.

Oh ty for the mod badge fix! I hate to bug ya again but I also need help with the Xmult calc. The x7 mult for every ace card played is not being triggered and when i'm looking at the code some of the values say unknown. I'm having a hard time figuring out if its another syntax error or if maybe vscode isn't able to get the smod/game values it needs to đŸ„Č

manic rune
#
local pool = {}
for _,v in ipairs(G.P_CENTER_POOLS.Consumeables) do
  if v.hidden then pool[#pool+1] = v.key end
end
local random_key = pseudorandom_element(pool, "random_rare_consumeable")
if random_key then SMODS.add_card{key = random_key} end
#

probably smt like that

manic rune
#

oh

#

oh yeah its G.P_CENTERS with i thats a key

daring fern
#

Also you're returning dollars instead of xmult

pastel kernel
manic rune
#

yes

pastel kernel
daring fern
#

‎

daring fern
proud charm
pastel kernel
#

Wait, what’s the difference between not having context.main_eval and having context.main_eval?

daring fern
#

And remove the first if

manic rune
#

not having context.main_eval will catch all of the triggers

proud charm
manic rune
#

(keep the return {} and put the thing i said inside the table, went too broad there)

pastel kernel
#

Idk what for though

manic rune
#

it doesnt go through every card, just specific cardareas that are enabled in your mod iirc

red flower
#

it's for mime

manic rune
#

oh that makes sense

pastel kernel
#

Oh right, the same happens when I use context.individual without cardarea G.play

red flower
#

what if there was a start of round enhancement

proud charm
pastel kernel
#

I should make those exotic cards Jen has.

daring fern
#

‎

chrome token
#

how would one modify an already existing joker's info_queue without interfering with their loc_vars?

#

like say i wanted to add another info_queue to the Lusty Joker, how would i do that?

pastel kernel
#

Trying to make a joker that creates negative “perishable” jokers, but it doesn’t seem to be making PERISHABLE JOKERS