#💻・modding-dev

1 messages · Page 575 of 1

spring gyro
#

I fix this problem".
Paperback" not "paper"

stiff locust
#

add next(SMODS.find_card("j_modprefix_jokerkey")) to the if statement

#

that'll make it only trigger if you have that joker

spring gyro
#

But he didn't show up

#

Invisible joker.....

wispy falcon
stiff locust
#

nothing

#

the card is still its original suit, and will pass is_suit checks for its original suit

#

all we are doing is, when the card is checked to be Spades, making it set to true regardless of the card's original suit

#

this won't get in the way of any other suit checks on the card

#

just don't do return false if your check fails
if you did that, it would override the original suit check

wispy falcon
#

Would I just use suit == "Spades" in my joker then to make that work?

stiff locust
#

nope

#

your joker doesn't have to do anything

#

the suit argument is what is passed into the is_suit function for which suit to check

#

is_suit("Spades") returns true if the card is spades

#

your joker could have zero calculate code and this would still work, it just has to exist to trigger the effect

wispy falcon
#

Kinda funny

stiff locust
#

yeah it works out that way sometimes

wispy falcon
#

Would other jokers trigger on the cards too? Like the one's that give mult if the card is spades, for example?

stiff locust
#

yep

#

it affects ALL suit checks

#

which includes scoring

#

it could score in a spades flush

#

unless the effect is coded to check card.base.suit specifically
(in this case they'd be actively trying to avoid things like smeared joker anyway, so it's fine)

#

but pretty much every modded effect should use is_suit

wispy falcon
#

Okay and if I wanted to make it be noticable on the card with like an effect/shader/info_queue I would do that in the joker or where?

#

And how?

stiff locust
#

uhh

#

that one I don't know

slim ferry
#

Just say it in the description?

stiff locust
#

yeah the joker's description is good enough for vanilla standard

slim ferry
#

That should be enough to convey the information usually

stiff locust
#

smeared joker doesn't have any additional visuals

#

so your card doesn't need them either

wispy falcon
#

True

#

Okay, I'm going to try it out now

stiff locust
#

alright

#

@wispy falcon i forgot something

#

you should add and not SMODS.has_no_suit(self) to the if check

#

so it doesn't trigger on cards with no suit i.e stone cards

#

unless you want it to do that?

#

up to you

wispy falcon
#

Gonna think about that but thank you for telling me

wispy falcon
# stiff locust so your card doesn't need them either

Okay, so with the following code it should make Wrathful Joker give mult even on a club, diamond or heart when I have my joker, right?

function Card:is_suit(suit, bypass_debuff, flush_calc)

    -- Code before
    print("Before :O")

    local ret = card_is_suit_ref(self, suit, bypass_debuff, flush_calc)

    -- Code after
    if self.base.suit and suit == "Spades" and next(SMODS.find_card("j_cstorm_joker_the_riveter")) and not SMODS.has_no_suit(self) then
        print("Check worked >W<")
    end

    return ret
end

SMODS.Joker {
    key = "joker_the_riveter",
    pos = { x = 0, y = 0 },
    rarity = "cstorm_chatter",
    cost = 15,
    blueprint_compat = false,
    eternal_compat = true,
    unlocked = true,
    discovered = false,
    --atlas = "chatters",

}```
stiff locust
#

yep

#

wait

#

you need to return true if the check passes

#

that's what makes it actually work

wispy falcon
#

Damn, that's why it didn't do anything

stiff locust
#

yeah you forgot the one functional part of the code

#

it happens

wispy falcon
#

IT WORKS

#

OMG, THANK YOU SO MUCH

stiff locust
#

👍

wispy falcon
#

Now I know how hooking works but I still don't get what suit == "Spades" does. In my eyes it would check if the suit is spades, which it isn't so it is wrong

#

Like, in my eyes I would need to make it suit ~= "Spades" to make it work

stiff locust
#

card:is_suit("Spades") should be true if the card is spades suit

#

the "Spades" is a function argument

#

which is referred to as suit inside the function

#

suit == "Spades" makes it so you only override suit checks for Spades specfically

#

otherwise, it would override the suit checks for any suit

wispy falcon
#

Ohh, I think I understand it now

#

Damn, hooking and patching is so useful when modding this game

stiff locust
#

it really is

#

you can hook any context for anything apparently by the way

#

on top of these other functions

#

ive always found lovely patching to be more annoying to deal with anyway

ocean sinew
#

Guys It's not hooking

#

I'm saying this the 932903290130193th time 🤓

#

It's called making a upvalue of a lua function

wispy falcon
stiff locust
#

it might come up one day

frosty rampart
#

lovely patching is a lot of overhead, but it's still preferable when you just want to insert a line of code in the middle of a function or something. i do try to use hooks over patches whenever possible tho

ocean sinew
wispy falcon
#

I hate searching through the code to find the exact place of a function that I need to patch

frosty rampart
ocean sinew
#

yes

stiff locust
#

how can I check if a pool exists

#

an smods.objecttype or whatever it's supposed to be called

#

if <key of objecttype> is returning nil

rotund sable
stiff locust
#

what

#

will that return true if it exists

#

alright i'm really close to the thing i wanna do

#

but something is going wrong

rotund sable
stiff locust
#

cards["j_gros_michel"] = true would be the same as cards = { j_gros_michel = true }, right?

chrome widget
#

The former would error if cards wasn't already previously declared as a table

#

The latter is declaring a new table with the single key mapping in it

stiff locust
#

okay

#

assuming cards already exists

#

they would be the same?

wintry solar
#

no

#

the second overwrites the previous value of cards

stiff locust
#

well yeah

#

assuming cards exists as an empty table

#

these would both result in the same outcome

wintry solar
#

sure

stiff locust
#

okay

#

yeah i'm lost then

#

i've got a table with a bunch of joker keys in it and I'm trying to convert that into an SMODS.ObjectType pool which contains all of those jokers

#

and I'm not sure if it is working or not

#

but when I try to have a booster pack use this pool, it crashes on opening the pack

#

which doesn't happen if I give the code an SMODS.ObjectType pool which is already set up with ["j_gros_michel"] = true inside its cards argument

#

so I assumed something was wrong with the pool? and if it's not that diifference then idk what it is

wintry bramble
#

Hello, a friend and I are making a mod for Balatro, but we don't understand the SMODS API very well, so we don't know how to make a certain Joker in our mod create a consumable when selecting Blind, could someone help?

vernal path
#

look at vanilla remade, cartomancer is your friend here

vocal helm
#

^

cursive gazelle
vernal path
wintry bramble
#

but it will create spectral card

unkempt rover
#

Someone can test my mod?

wintry bramble
vernal path
unkempt rover
#

Please dm to portuguese lol

wintry bramble
vocal helm
#

What function is used to score a playing card? I'd like to see if I can make a Joker that scores cards left in your hand even if they weren't played

vernal path
#

Try looking at nichola from paperback 👍

vocal helm
#

ty :>
solution: It's just called SMODS:score_card()

stiff locust
#

how do I use ObjectType.inject_card(self, center)

#

smods wiki tells me what it does but not how to use it (as in what values to put in self and center)

#

if that doesn't work then I'm out of options idk what to do

red flower
#

i have code in my mod that dynamically inserts all my cards into an objecttype

#

does that help

stiff locust
#

assuming it's not done by putting pools = {poolkey = true} inside the jokers' code

stiff locust
#

this seems like it would do it

#

SMODS.ObjectTypes["joy_monster"]:inject_card(v)

#

and v is the center of the card?

red flower
#

yeah

stiff locust
#

gotcha

#

if that doesn't do it then it has to be an issue with my booster pack

#

yeah it didn't work

robust marsh
#

@chrome widget im going to bed because it's 1am and i feel quite sleepy, dont feelthe need to rush it at all I appreciate wnaht you are doing either way

chrome widget
#

It's okay I just got on a plane anyway 😭

stiff locust
chrome widget
#

Had to put my laptop away. It's nearly done, just trying to solve a crash with a delayed event in Blinds, cause I'm recreating the entire UI and there are some stale references it needs to account for

modern kindle
#

Airplane

red flower
#

hi dilly

modern kindle
#

Hi N

stiff locust
#

damn

modern kindle
#

How are you

red flower
#

i am hungry

modern kindle
#

Get some food

robust marsh
#

besides the UI still being there, some minor jank and the whacky boss armor scaling this is almost complete

chrome widget
#

Basically, the required score boxes just slim down and only show the blind reward, and the total round score will just be either a blank color or completely invisible

modern kindle
#

I hope your flight goes awesome winter

chrome widget
#

Whichever works to keep the original spacing

#

It's going fine except the babey is upset

robust marsh
modern kindle
#

Kibby

robust marsh
#

CUTE KITTY

robust marsh
chrome widget
#

I have a setup from one of my own mods that sets all score fields to say ????? instead, with an effect of a randomized blind score within a range

#

So I'm just modifying that with what you need. Main issue is just cleaning up some nodes that other places in the code access by ID and maintaining the general tree structure so nothing breaks

robust marsh
quick scarab
#

Quick question
Is there a way to make a booster pack not have obligate you to immediately use your card, since I have some of them that can only used in certain conditions, like during an blind or something. But they are practically uselessness on booster packs and only take up space

wintry solar
#

put select_card = 'consumeables' in your booster definition

stiff locust
#

on the smods boosters wiki

is this supposed to say newCard?

#

regardless it's still not working I just jumped through like

#

3 hoops just to end up at the same crash 😭

quick scarab
quick scarab
stiff locust
#

yeah i'm pretty sure it is

frosty rampart
stiff locust
#

atp i'm pretty sure something is wrong with my pool

#

i don't really know how to debug this

wintry solar
#

I can take a look at this at some point, if there’s not an issue in GitHub, creating one would make it more likely that I remember to look at it 🤣

stiff locust
#

how would I print out the pool from its key

frosty rampart
signal slate
#

Hey could someone give me beginner code on how to make a rank I'm trying to make the BACE

frosty rampart
#

if you want reference code, the "unstable" mod is probably helpful
if you specificallly want bace to be able to go below a low ace or above a high ace in straights, you'll need to put in a bit of work and the "apostle" rank + auxiliary code from paperback will be very helpful

unkempt rover
#

Someone help me

#

With lovely

#

toml is supposed to do what is in the image but it doesn't work

daring fern
frosty rampart
#

yea you don't need to do that through a lovely patch anymore

#

latest smods adds an API for custom scoring formulas

unkempt rover
#

No fucking way

daring fern
unkempt rover
daring fern
rough frigate
#

trying to add a custom animated texture to be used as the back of a custom deck, but i get this error whenever i try to select the deck. i am very confused

daring fern
rough frigate
#

oh damn ok

signal slate
#

Didn't work, didn't even detect it

--- STEAMODDED HEADER
--- MOD_NAME: Funny ranks
--- MOD_ID: FR
--- MOD_AUTHOR: [the bunnuny]
--- MOD_DESCRIPTION: yes'.
--- PREFIX: xmpl


------------MOD CODE------------

--Atlas for extra ranks
SMODS.Atlas {
key = "rank_b_hc",
path = "rankhc.png",
px = 71,
py = 95
}

SMODS.Atlas {
key = "rank_b_ex",
path = "ranklc.png",
px = 71,
py = 95
}

SMODS.Rank {
hc_atlas = 'rank_b_hc',
lc_atlas = 'rank_b_ex',

hidden = false,          

key = 'b',                
card_key = 'b',           
pos = { x = 0 },          
nominal = 20,               

next = {},                 
prev = { 'Ace' },          

shorthand = 'Bace',          

in_pool = function(self, args)
    return true
end

}

charred widget
#

How do I make it so a joker makes consumables give mult? Like observatory but a joker

frosty rampart
#

checking the vanillaremade code for observatory sounds like a good idea

fallow urchin
#

here's how observatory does it

charred widget
#

how would i get more specific with the card i want to give mult for?

red flower
#

yes

#

context.other_consumeable is the consumable card

charred widget
#

so if i wanted to only make The Sun per se give mult, how would i go about specifying that?

red flower
#

context.other_consumeable.config.center_key == "c_sun"

last sentinel
#

For blueprint_compat jokers, how do i have the blueprint juice during retriggers instead of the joker itself?

modern kindle
charred widget
frosty rampart
#

you have an extra end in your calculate function

charred widget
#

ok thank you 🙂

charred widget
idle plaza
charred widget
idle plaza
#

You can probably just not check for that at all.

charred widget
#

wait i think i just had to change something

#

you're right, card.ability.extra.active DOESN'T exist

#

it's supposed to be looking for card.ability.extra.xmult instead

rotund sable
cursive gazelle
#

God forbid you use jokerforge

rotund sable
#

It isn't that bad

slim ferry
#

god forbid a joker forge contributor points out joker forge

#

smh

rotund sable
#

It would be a crime not to

spring gyro
#

I check all ends, and I dont understand

crystal perch
#

does anyone know why this sticker is breaking when it tries to render? i know it has something to do with it's apply/remove functions because when i comment those out it renders just fine, the issue is i don't know how to remedy that.

crystal perch
#

here's my code for the apply func:

apply = function(self, card, val)
        CHAK_UTIL.mod_card_values(card.ability,{
            multiply = 2,
            x_protect = true,
            unkeywords = {
                odds = true,
                Xmult_mod = true,
                mult_mod = true,
                chips_mod = true,
                hand_add = true,
                discard_sub = true,
                h_mod = true,
                size = true,
                chip_mod = true,
                h_size = true,
                increase = true,
                ranks = true,
                targets = true,
                destroyed = true
            }
        })
    end,
rotund sable
crystal perch
# crystal perch here's my code for the apply func: ```lua apply = function(self, card, val) ...

this is the mod card values func as well

---@param table_in table|Card
---@param config table
function CHAK_UTIL.mod_card_values(table_in, config)
  if not config then config = {} end
  local add = config.add or 0
  local multiply = config.multiply or 1
  local keywords = config.keywords or {}
  local unkeyword = config.unkeywords or {}
  local x_protect = config.x_protect or true -- If true and a key starts with x_ and the value is 1, it won't multiply
  local reference = config.reference or table_in
  local function modify_values(table_in, ref)
    for k,v in pairs(table_in) do -- For key, value in the table
      if type(v) == "number" then -- If it's a number
        if (keywords[k] or (CHAK_UTIL.REND.table_true_size(keywords) < 1)) and not unkeyword[k] then -- If it's in the keywords, OR there's no keywords and it isn't in the unkeywords
          if ref and ref[k] then -- If it exists in the reference
            if not (x_protect and (CHAK_UTIL.REND.starts_with(k,"x_") or CHAK_UTIL.REND.starts_with(k,"h_x_")) and ref[k] == 1) then
              table_in[k] = (ref[k] + add) * multiply -- Set it to (reference's value + add) * multiply
            end
          end
        end
      elseif type(v) == "table" then -- If it's a table
        modify_values(v, ref[k]) -- Recurse for values in the table
      end
    end
  end
  if table_in == nil then
    return
  end
  modify_values(table_in, reference)
end
#

with its other needed funcs

-- couple util funcs nabbed from https://github.com/RenSnek/Balatro-Rendoms :33 (nested into CHAK_UTIL to avoid compatibility issues)
CHAK_UTIL.REND = {}

--- Credit to RenSnek. Given a string `str` and a shorter string `start`, checks if the string's first `#start` characters are the same as `start`.
---@param str string
---@param start string
---@return boolean
CHAK_UTIL.REND.starts_with = function(str,start)
    return str:sub(1, #start) == start
end

--- Credit to RenSnek. Given a `table` and a `value`, returns true if `value` is found in `table`.
---@param table table
---@param value any
---@return boolean
CHAK_UTIL.REND.table_contains = function(table,value)
    for i = 1,#table do
        if (table[i] == value) then
            return true
        end
    end
    return false
end

--- Credit to RenSnek. Given a table, returns a more accurate estimate of its size than the `#` operator.
---@param table table
---@return number
CHAK_UTIL.REND.table_true_size = function(table)
    local n = 0
    for k,v in pairs(table) do
        n = n+1
    end
    return n
end
spring gyro
crystal perch
#

had to send it in a bunch of diff messages to avoid the character limit

rotund sable
#

but i think it should crash before even executing anything

spring gyro
rotund sable
#

??

daring fern
spring gyro
#

....
not numbers, messenges

daring fern
crystal perch
#

yeah i'm aware

#

the sticker is meant to double the scoring ability values of the joker it's attached to

daring fern
spring gyro
crystal perch
#

instead of 2

daring fern
#

apply is called for application and removal.

crystal perch
#

i just did this quick and dirty for now and i'll fix that later, the main thing i'm concerned with is the rendering

crystal perch
#

yes

#

awakened on the left (+8 instead of +4) and normal on the right

#

no visual difference at all, not even rendering the info

daring fern
crystal perch
#

i haven't, no

#

the effect does work though i know for certain

#

returns this when you open up the sticker collection

#

and this is when it's applied to just a normal Joker

frosty rampart
#

if you have a custom apply function for your sticker, you need to manually apply the sticker to the ability table. it only automatically does it if you don't override the apply function
after the whole mod_card_values function call, do card.ability[self.key] = val

#

that should fix the rendering

crystal perch
#

also, while i'm here, i've been having a problem where if i reference a different joker in a joker's info queue and then try to return my joker's card ability vars, i get this crash

#

i've been getting around this by using self.config instead of card.ability but now that i have awakened the player needs to be able to see the modified values
here's the loc_vars

loc_vars = function(self, info_queue, center)
        info_queue[#info_queue+1] = {key = 'chak_ethereal', set = 'Other'}
        info_queue[#info_queue + 1] = G.P_CENTERS.j_chak_joe_joker
        return { vars = { card.ability.extra.Xmult_gain, card.ability.extra.Xmult_gain * (G.jokers and #G.jokers.cards or 0) + 1 } }
    end,
daring fern
crystal perch
#

i'll change that then

molten musk
#

guys

#

is there a channel for mod testers

#

wanna test my mod

cursive gazelle
#

You can ask people to test your mod

molten musk
#

oh ok

#

thx

glass scaffold
#

How do I check if an Arcana pack has been opened?

maiden phoenix
#

(Iirc the context name properly)

#

Then you can check if its an Arcana by checking its [booster_variable].config.center.kind value

pseudo furnace
#

The code isn't working when the requirements are met...

daring fern
daring fern
#

It would be if SMODS.has_enhancement(v, 'm_stone')

pseudo furnace
pseudo furnace
pseudo furnace
# daring fern What is the goal?

So I've been counting stone cards when blind is selected. I want make sure the count is updated when other events like buying a stone card or using tower also updates the count

#

But that doesn't sound like the calculate function

daring fern
pseudo furnace
pseudo furnace
#

Dang this chat is so helpful

cursive gazelle
#

I remember asking once for help with modding Minecraft in the official curse forge discord server and someone told me “if you use fabric you’re a [racial slur]” they got banned tho

#

Lol

glass scaffold
#

what's the simplest way to add hands?

daring fern
glass scaffold
daring fern
glass scaffold
hidden notch
#

context.modify_ante is a lil' Jank;
Using this: if context.modify_ante and context.ante_end and context.cardarea == G.jokers then return { modify = 1 } endWorks fine, it will Up the Ante by an Additional 1 - So; Ante goes up by 2!
... Now, if I duplicate the Joker; It'll still just add 1.
No, the Ante doesn't go up by 3, it will still be 2. :(

wispy falcon
#

Is there a command in debugplus to set a poker hand level?

daring fern
daring fern
hidden notch
#

First of all: Thank you
But second of all: That should not be necessary!

#

it also doesn't work, if yet another joker modifies the Ante-Change

daring fern
hidden notch
#

I'm just gonna put in a Bug report, why get a cool new Context if multiple jokers using it won't work
I used ease_ante before but wanted to use the new context x3

stiff locust
#

chat i need to debug a joker pool and I don't know what to do

#

something is wrong with it and it crashes when I try to create a joker using the pool (specifically in a booster pack)

#

but I don't know how to figure out what's wrong with it

rotund sable
#

What's the crash

stiff locust
#

something is wrong with the pool or the cards defined in said pool, it crashes like this every time I try to create a joker using one of the pools

rotund sable
#

Is the pool key matching in both places

stiff locust
#

I don't know how to print out or check the pool to make sure it's being defined properly

#

but the pool key is matching

rotund sable
#

Are you sure

stiff locust
#

yes

#

that said i'm not exactly using pools conventionally

rotund sable
#

You could print out SMODS.ObjectTypes["pool_key"]

stiff locust
#

i've got code here that sorts every joker into lists based on which mod they come from (sorting by mod prefix) and then it should be putting those jokers into pools organised by mod

#

i'll see what comes up when I do that

frosty dock
stiff locust
#

it comes out with nil

#

which is not good

rotund sable
#

So the pool key you gave it is probably invalid

stiff locust
#

the pool key is valid

rotund sable
#

Or the pool wasn't initialized

stiff locust
#

I'm guessing the pool wasn't properly initialized

#

i put some print statements in to check where it breaks

#

ah

#

the second for loop just isn't running at all

#

I think I've solved it?

#

moved an end

#

nope it's still not running

#

hmmm

#

I think I figured it out for real this time

#

I was using ipairs instead of pairs

#

progress

#

got a different crash

#

it's because of

SMODS.ObjectTypes["cura_curated_pack_pool_" .. value.DisplayName]:inject_card(G.P_CENTERS[value2])

this line

#

DisplayName exists and value2 is the key of a joker

#

so I'm not really sure what's going wrong here

#

oh wait no I know what it is

rotund sable
stiff locust
#

it's because I changed the application method

#

but I didn't fully change it

#

new crash with information in it

#

i'm lost now

#

feels like i got closer but it's still not working

#

the pool isn't empty I'm defining it with splash as a default joker so it doesn't break anything

#

so I don't know why it's complaining about empty pool

red flower
#

i think the default is not actually inserted into the pool

stiff locust
#

well it is

#
    for _, value in pairs(Curator.joker_table) do
        if value.Jokers then
            SMODS.ObjectType({
                key = "cura_curated_pack_pool_" .. value.DisplayName,
                default = "j_splash", ---I like splash way more than jimbo
                cards = {
                    ["j_splash"] = true
                }
            })
            for index, value2 in pairs(value.Jokers) do
                print("c")
                SMODS.ObjectTypes["cura_curated_pack_pool_" .. value.DisplayName]:inject_card(G.P_CENTERS[value2])
            end
        end
    end

current code block

#

OH RIGHT

#

it has to be = true

#

my mistake

red flower
#

yeah

stiff locust
#

okay

#

sixth times the charm

red flower
#

i dont think that was the problem tho

stiff locust
#

yeah it did the same crash

red flower
#

a pool can be empty when you inject cards, that crash is usually because it cant find it

stiff locust
#

how would it not be able to find it

#

the concatenated keys should be the same for both instances here

#

🙃

red flower
#

i tried something similar and it just seems like it doesnt like creating and inserting into an objecttype at runtime

#

or at least not immediately

stiff locust
#

this code is being run when a run begins

#

in game:start_run hook

#

cause I thought it might miss some jokers if I did it during initialization unless my mod loads last

red flower
#

if you do it in a hook the load order doesnt matter

stiff locust
#

yeah thats the idea

#

and it doesn't miss any jokers that way but is that what's making it crash

red flower
#

no i mean in a hook on initialization, i think creating objecttypes at the start of the run is probably not good lol

stiff locust
#

oh

red flower
#

either way im doing it at initialization and it has the same crash

stiff locust
#

so how do I make it not crash

red flower
#

oh i found it i think

#

try doing SMODS.ObjectTypes["cura_curated_pack_pool_" .. value.DisplayName]:inject() before the last loop

stiff locust
#

mk

#

it seems to have worked

#

no crash starting a run

#

holy shit it works

#

this is amazing

#

thank you n the balatro game

#

I now have a pack that only contains jokers from a randomly selected mod

#

that is 2/3rds of the content

red flower
#

letsgo

stiff locust
#

now I need to make a text input

#

so I can make a pack where you can select a mod for it to pull from

#

ui code 😭

rotund sable
#

Good luck on that 🫡

#

-# It's not that hard

stiff locust
#

it shouldnt be too bad yeah

#

i also want it to recreate the text input if you put in an invalid mod ID

#

or one which is on the blacklist

#

but that's the easy part

stiff locust
#

alright

#

where can I find a UI popup text input

#

that isn't from cryptid's POINTER://

#

that's the only one I know

#

I want it to be like pointer but cryptid's code confuses and overwhelms me

hardy viper
#

i think you just do the

#

create_uibox_generic_definition() or whatever that function is called and call G.overlay_menu with that

#

or some Shit

stiff locust
#

I don't know what any of that means

#

I've never done UI code before

hardy viper
#

oh

stiff locust
#

i got my config UI from somewhere and copy pasted it into all my mods that use config

hardy viper
#

i know i used the pointer code for something at some point

#

probably not tmj

stiff locust
#

i'll still look at the pointer code just in case it's somehow readable

hardy viper
#

i think it was fine

stiff locust
#

it doesn't look tooooooooo bad

robust marsh
#

how do I display a deck when you do an achievement? Similarly to how the vanilla game does it by displaying the deck you unlocked on the side. IIRC it replaces the trophy icon. Not sure if it was just a static image or a full on deck tho so i could be making shit up

floral marsh
#

how do I change a specific blind's size other than using G.GAME.blind.chips = G.GAME.blind.chips / 2?

stiff locust
#

yeah no i can't figure out UIbox

rotund sable
#

What's the thing you don't understand

stiff locust
#

yes
-# all of it

rotund sable
#

What do you want to use it for

stiff locust
#

I want it to allow you to input a mod ID when you click on my booster pack

#

the booster pack will then create jokers from the mod whose ID you put in

rotund sable
#

Oh so you want a general UI thing

stiff locust
#

I have all of the other code working I just need a UI box where you can type in a value

#

I can hook card:click() for a trigger to make the UI box appear so it's

#

just the UI box code

rotund sable
#

I'm not sure if a text input or just a few buttons would work better

stiff locust
#

the ideal solution would be to open a list of every mod that has jokers

#

and let the player click on a mod

rotund sable
#

Oh damn

stiff locust
#

but I don't know how to do that in a concise and readable way

#

and UI code confuses me in general

rotund sable
#

I don't know how to do that too

robust marsh
stiff locust
#

math.floor +0.5 rounds it cause decimals are ugly

hushed field
#

The best thing you can do when figuring out UI is to figure out each step of the process separately. It's not complicated, but the way UI works is very obscured due to it being such a giant chain of functions

robust marsh
stiff locust
rotund sable
#

there are some mentions on smods docs

floral marsh
#

thanks

hushed field
#

Not really, there is definitely info out there, but it's not that great at helping with more complex UI

rotund sable
#

more complex no

hushed field
#

The issue with it, in my experience, is that most people that have made complicated UI things still don't feel comfortable enough with writing documentation, because there's so many asterixes to keep in mind.

#

Making UI pop up is a doable step, though

#

Making UI have you type in an entry is also doable

stiff locust
#

I don't need anything too complicated yeah

slim ferry
stiff locust
#

I can do normalising and verifying the input later but I just

#

don't know where to start on the UI box

hushed field
#

I really recommend trying to find the minimal functionality that you can test, and just try and get that working first. That's how I've started with more complex UI stuff. What's the specific stuff with UIBox you're running into?

stiff locust
#

cryptid's pointer didn't really help, when I tried to use code in its format it gave me cryptid crashes as if it was running cryptid code

hushed field
#

As UIbox is basically just a container that gets drawn on the screen that you can stuff with UI nodes

stiff locust
#

I haven't gotten very far at all

rotund sable
#

making a popup is as simple as

G.FUNCS.overlay_menu({
    definition = ...
})
stiff locust
#

attempted to repurpose pointer code and got startup crashes that were located inside cryptid's code.lua file

I don't even use cryptid in my mods

rotund sable
#

where the definition is the table crap

hushed field
#

Cryptid's generally a bad mod to base things off of. The newer code that's more conventional still really relies on older code that does stuff you don't need to do that's just there to make things more complicated, haha

stiff locust
#

I know that

#

but I know like

#

zero other mods that use UI box

hushed field
#

I do quite a bit

#

Have you been able to make a pop up menu without the text entry box?

stiff locust
#

not quite yet

hushed field
unkempt rover
# daring fern Yes.

I put this in main.lua and it didn't work

Oops! The game crashed:
[SMODS _ "src/game_object.lua"]:3720: attempt to index field 'GAME' (a nil value)

hushed field
stiff locust
#

okay I think I broke something

#

and I know what broke and why it broke

#

I think I accidentally copied the cryptid folder into the folder of another mod

unkempt rover
daring fern
unkempt rover
slim ferry
#

its a function. you just... run it?

#

theres not much to do different

unkempt rover
slim ferry
#

yeah.. you should call the function when you want it to happen generally

#

not just. somewhere random

unkempt rover
frosty rampart
#

you need to hook one of the functions that run at the start of the game

slim ferry
#

use SMODS.current_mod.reset_game_globals to set it at run start

#

oh or that

hearty mesa
#

can anyone provide a link to that one moddedvanilla repository with some faq as the wiki? can't find it

frosty rampart
#

or that

hearty mesa
stiff locust
#

it feels like it's trying to make one appear, and the screen shakes as though one should appear

#

but nothing shows up

frosty rampart
stiff locust
#

I assume that's because I haven't actually put a UI box into the definition yet

#
function Curator.create_uibox_selector(card)
    G.FUNCS.overlay_menu({
        definition = {}
    })
end

definition is supposed to have stuff in it

#

but it's not crashing so I think that's progress

hushed field
#

That is progress

#

I'd make the simplest UI at first, as in just display a white square

stiff locust
#

mkay

#

how do I do that

hushed field
#

Haha, yeah good question

red flower
#

you can copy the examples and put it in the definition

modern kindle
#

Hi N and Ice

red flower
#

hewwo

hushed field
#

I don't have time to rn to go into detail, so I'd check out the two files I linked above, and the smods documentation! If no one else manages to help you figure it out, and you're still having problems in a few hours, or tomorrow, feel free to ping me!

stiff locust
#

👍

stiff locust
#

I put the example node into the definition

#
function Curator.create_uibox_selector(card)
    G.FUNCS.overlay_menu({
        definition = {
            {
                n = G.UIT.C,
                config = { align = "cm", padding = 0.1 },
                nodes = {
                    { n = G.UIT.T, config = { text = "Hello, world!", colour = G.C.UI.TEXT_LIGHT, scale = 0.5 } }
                }
            }

        }
    })
end

the screen shakes again but it doesn't come up with anything

#

i assume it's either closing instantly or not opening at all but it's trying to do something

red flower
#

you need a root node i think

#

try this example

stiff locust
#

gotcha

#

it's still not showing up?

keen atlas
#

most of the time i use create_UIBox_generic_options to deal with popup-related stuff. it might not fit what you need, but it works. here's an example

G.FUNCS.overlay_menu({
    definition = create_UIBox_generic_options({
        contents = {
            { n = G.UIT.R, config = { minw = 1, minh = 1, colour = G.C.WHITE } } --- Creates a white box
        }
    })
})
stiff locust
#

okay it's

#

trying to open something still but nothing shows up on screen

stiff locust
keen atlas
stiff locust
#

new crash

#

i might've found the cause

#

there is a white box

#

OK

#

I don't want there to be a back button though

keen atlas
#

progress 🎉

slim ferry
#

will there be a center button though 🔥

rotund sable
keen atlas
stiff locust
#

gotcha

carmine osprey
#

im not sure what im doing wrong here, im trying to make a deck which has a 1 in 2 chance for each card to turn into a stone card at the start of the game, right now im doing this by destroying cards and then adding a new stone card in their place (I'm assuming you can just change the enhancement but i couldnt find anything about that in the documentation), the issue is that it just freezes on this screen now whenever i start the game with the deck

#

what am i doing wrong here

stiff locust
#

so that's what no_back does

slim ferry
stiff locust
#

no more back button

#

there is a UI box now

carmine osprey
stiff locust
#

so I need three nodes in a vertical column

#

and then the bottom node needs to be a row that contains two nodes

slim ferry
stiff locust
#

I can probably do that now
idk how to turn the nodes into buttons yet

slim ferry
#

also PLEASE

#

hit alt+shift+f

#

or right click -> format document

carmine osprey
modern kindle
#

Formatting is for cowards

slim ferry
#

formatting is for people who like to be able to read their own code imo

keen atlas
carmine osprey
slim ferry
#

no, card:set_ability(G.P_CENTERS["m_stone"])

frosty dock
#

card:set_ability('m_stone') should do, no?

slim ferry
#

idk

carmine osprey
#

worked thx

slim ferry
#

vanillaremade does G.P_CENTERS["m_stone"] so i just do that

frosty dock
#

either is supported iirc

#

so eh

stiff locust
#

well this isn't what I wanted

red flower
#

i will change it

keen atlas
red flower
slim ferry
#

it does for the tarots iirc

stiff locust
# keen atlas share your ui code
function Curator.create_uibox_selector(card)
    G.FUNCS.overlay_menu({
        definition = create_UIBox_generic_options({
            no_back = true,
            contents = {
                {
                    n = G.UIT.C,
                    config = { minw = 1, minh = 1, colour = G.C.BLUE, padding = 0.15 },
                    nodes = {
                        { n = G.UIT.R, config = { minw = 1, minh = 1, colour = G.C.WHITE, padding = 0.15 } },
                        { n = G.UIT.R, config = { minw = 1, minh = 1, colour = G.C.WHITE, padding = 0.15 } },
                        {
                        n = G.UIT.R,
                            config = { minw = 1, minh = 1, colour = G.C.BLUE, padding = 0.15 },
                            nodes = {
                                { n = G.UIT.R, config = { minw = 1, minh = 1, colour = G.C.WHITE, padding = 0.15 } },
                                { n = G.UIT.R, config = { minw = 1, minh = 1, colour = G.C.WHITE, padding = 0.15 } }
                            }
                        }
                    }
                }
            }
        })
    })
end
red flower
#

yeah

stiff locust
#

I want it to have three rows in a column

#

the bottom row should have 2 squares next to each other

#

and the top two should have 1 square only

#

everything just showed up in one column

keen atlas
#

you'll need to alternate between column, row, column

#
n = G.UIT.C,
config = { minw = 1, minh = 1, colour = G.C.BLUE, padding = 0.15 },
nodes = {
    --- ...
    {
    n = G.UIT.R,
        config = { minw = 1, minh = 1, colour = G.C.BLUE, padding = 0.15 },
        nodes = {
            --- change these to column
            { n = G.UIT.C, config = { minw = 1, minh = 1, colour = G.C.WHITE, padding = 0.15 } },
            { n = G.UIT.C, config = { minw = 1, minh = 1, colour = G.C.WHITE, padding = 0.15 } }
        }
    }
}
stiff locust
#

ahhh

#

well that created two squares next to each other which means 🤔

#

heeeyyyyy

keen atlas
#

nice

stiff locust
#

okay that's progress

#

now I'd like the blue box to be invisible

#

is that easy

keen atlas
#

yeah, remove the colour = G.C.BLUE

slim ferry
#

do vouchers in packs work as is or do they require extra code to work there?

stiff locust
#

alright

stiff locust
#

all of those have vouchers in them and they seem to work

#

betmma probably did something insane and unnecessary to it though

slim ferry
#

alright multipack literally has one instance of the word voucher in the entirety of its only code file so i assume its fine then

stiff locust
lost spruce
stiff locust
#

h

keen atlas
stiff locust
#

oh this isn't so bad

#

there is text on the screen

#

the documentation has an example for buttons they don't seem so bad

#

question is how do I detect when a button is pressed

red flower
#

<@&1133519078540185692>

keen atlas
stiff locust
#

ahh

#

so that function runs when you press the button named that

#

UI code really wasn't as bad as I thought lol

wintry solar
#

it just looks daunting but it's not too bad to make simple things with

stiff locust
#

the UI nodes accept HEX("value") color values right

#

idk why they wouldnt

keen atlas
#

yes

stiff locust
#

mk

#

the hard part is making it look like an actual balatro menu

#

new thing
i want those boxes to be centered

keen atlas
#

try adding an align = 'cm' in your dark node

stiff locust
#

that did it

#

alright now those two boxes need to be buttons

#

this should be easy

wintry solar
#

you should also add r = 0.1, emboss = true to them if they're buttons iirc

stiff locust
#

what do those values do

keen atlas
stiff locust
#

oh they're for styling

#

I see

keen atlas
#

yep

wintry solar
#

oh emboss is also a number

#

0.05 is standard

stiff locust
#

well

slim ferry
#

what does contrast do in ease_background_colour?

stiff locust
#

the buttons activate

#

but they are missing a few things

lost spruce
keen atlas
stiff locust
#

the buttons don't look like buttons (that can wait) and I want them to close the UI when pressed

#

also there's no text appearing on them but I did put text nodes there

keen atlas
#

to close the overlay, call G.FUNCS.exit_overlay_menu()

keen atlas
stiff locust
#
{
                            n = G.UIT.R,
                            config = { minw = 1, minh = 1, colour = HEX("1e2b2d"), padding = 0.15, align = 'cm' },
                            nodes = {
                                {
                                    n = G.UIT.C,
                                    config = { minw = 1, minh = 1, colour = HEX("3a5055"), padding = 0.15 },
                                    nodes = {
                                        {
                                            n = G.UIT.C,
                                            config = { button = "cura_confirm",  r = 0.1, emboss = 0.05 },
                                            nodes = {
                                                { n = G.UIT.T, config = { text = localize("k_cura_confirm"), color = HEX("FFFFFF") } }
                                            }
                                        }
                                    }
                                },
                                {
                                    n = G.UIT.C,
                                    config = { minw = 1, minh = 1, colour = HEX("3a5055"), padding = 0.15 },
                                    nodes = {
                                        {
                                            n = G.UIT.C,
                                            config = { button = "cura_confirm_previous",  r = 0.1, emboss = 0.05 },
                                            nodes = {
                                                { n = G.UIT.T, config = { text = localize("k_cura_last_confirm"), color = HEX("FFFFFF") } }
                                            }
                                        }
                                    }
                                }
                            }
                        }

these are the button nodes right now

keen atlas
#

text nodes need a scale attribute

stiff locust
#

oh right

#

the text is now appearing

#

and I want the text to be centered

#

it's too high up right now

keen atlas
#

add align = 'cm' again. in this case try adding it in the node with colour = HEX("3a5055")

stiff locust
#

i thought that might only do it on one axis

#

it's cool that it does both

keen atlas
#

cm means center middle, it does both

stiff locust
#

gotcha

frosty rampart
#

as per the smods ui guide:

stiff locust
#

this is getting somewhere

#

the buttons work and close the UI as they should, issue is you can press esc to close the menu without putting anything in

#

I'm not exactly against that but I'd want it to unhighlight everything if you do

#

because this is a UI box that will activate when you click on a pack, and said pack requires this input or it'll crash when obtained

#

I know how to unhighlight, but how do I figure out if they closed the UI box with esc?

#

if it unhighlights on exit, then you can't buy the pack (or pick it from a MultiPack or such) without putting anything in

#

which solves the crash

#

but I can't have it unhighlight on exit for everything, because then it'll do that on the buttons and you can never buy the pack

#

does esc just call G.FUNCS.exit_overlay_menu()

keen atlas
#

yeah

stiff locust
#

oh okay

#

I can just hook that then

#

what's the card area for shop boosters

keen atlas
#

G.shop_booster

rare torrent
#

why does this keep saying "attempt to compare number with table" on the line with "if discriminant >= 0 then" ```calculate = function(self, card, context)
if context.joker_main then
local a = G.GAME.current_round.hands_left or 0
local b = G.GAME.current_round.discards_left or 0
local c = G.GAME.dollars or 0

    local sol1, sol2 = 1, 1

    if a ~= 0 then
        local discriminant = b*b - 4*a*c
        print(string.format("[Quadratic Joker] a=%d, b=%d, c=%d, discriminant=%d", a, b, c, discriminant))

        if discriminant >= 0 then``` and it's because of G.GAME.dollars, when doing eval G.GAME.dollars in the console it prints the number just fine but when trying to use it to calculate it breaks everything, and if i do tonumber(G.GAME.dollars) it returns 0 for some reason
red flower
#

do you have talisman

rare torrent
keen atlas
#

thats why

rare torrent
#

damm but why?

keen atlas
#

talisman replaces most numbers with table

stiff locust
#

common talisman L

slim ferry
#

all 6s

stiff locust
#

can you not unhighlight shop or booster like this

keen atlas
#

uhh that looks right for me

stiff locust
#

it crashed on the G.shop:unhighlight_all()

rare torrent
keen atlas
stiff locust
#

oh

#

yeah no I need the card areas

#

but you don't have to do G.hand.cards when you do it for G.hand:unhighlight_all()

keen atlas
stiff locust
#

ah

#

okay it works now

#

wonderful

#

the buttons need one more functionality thing

#

okay well

#

the text misaligned itself I can align it I know how to do that

#

but now clicking the buttons works anywhere in the box instead of just on the text

keen atlas
#

is everything working?

stiff locust
#

not quite

#

there is 1 functionality thing I have left to do

#

which is to turn the white box in the center into a text input

#

(i also need to center the text on the buttons and the title)

#

(putting align = "cm" in the text nodes didn't work, but I needed to resize the buttons to fill the boxes to make them easier to click, and that broke the alignment)

#

i'm guessing I have to put an additional empty node

#

which is centered inside the button

#

and then put the text inside that?

keen atlas
stiff locust
#

this link is confusing me

#

oh wait no I get it

#

where do I run that function

keen atlas
#

replace the white input box node with the create_text_input one

stiff locust
#

create_text_input node?

#

isn't it a function

keen atlas
#

yes, its a function, you call it

stiff locust
#

where in the node do I call it

keen atlas
#
{ ..., nodes = { create_text_input(...) } }
stiff locust
#

gotcha

primal robin
#

Text input is weird thing

carmine osprey
#

how would you randomize the enhancement given by this
also how would you set the edition/seals using this too?

primal robin
#

Particulary buggy for some reason

stiff locust
carmine osprey
#

thx

stiff locust
#

ref_value is the place where the value goes after it has been entered I can get that much

red flower
#

because of the way lua works the functions need to get a value from a table by doing ref_table[ref_value]

keen atlas
stiff locust
#

ah

#

okay

stiff locust
#

the rest I can get the idea of

keen atlas
#

its the background color to set when typing

stiff locust
#

mk

keen atlas
#

you might not need it, its not required

stiff locust
#

i'll put one in and see if I like the way it looks

#

new crash

#

I put both buttons inside an extra node to try to center their text but also added the text input

keen atlas
#

i got that crash too when trying.
so you'll need to provide initial string value for your ref_table, an empty string will work

stiff locust
#

okay

keen atlas
stiff locust
#

well the text didn't center on the two buttons but the input works now

#

and I want the enter mod ID text to also be centered but it's not doing that either

#

functionally speaking this is all working now

#

and this is amazing

wintry solar
#

Set the align of the button

stiff locust
#

I did

#

it has align = "cm"

#

wait no it doesn't

#

you're so right

#

that aligned the text

keen atlas
stiff locust
#

now I gotta make the buttons looks like balatro buttons

wintry solar
stiff locust
#

oh also the Enter Mod ID text doesn't appear until you click into the text input box?

keen atlas
# stiff locust how do I go about that

i would take out these button structure and put it in a function, since mostly it is a repeated structure. the only difference is the button and the button text. you can make it as a function parameter

#

its up to you

stiff locust
#

I should really do that in case I want to use buttons in the future again (I do)

#

do I just copy that code block into a function and swap out the button key and text for function inputs?

wintry solar
#

I hate expanded UI code so much lol

stiff locust
#

is it that easy

#

i wanted to condense it, but vscode keeps expanding it every time I click format document

#

so I just kinda let it be

wintry solar
#

smh using auto formatting instead of just formatting correctly yourself

keen atlas
stiff locust
#

auto formatting saves me so much time

keen atlas
stiff locust
#

I see

keen atlas
#

this is just advice from someone who doesn't like nesting while also maintained big ui code 😅

stiff locust
#

it's really nice to have them in functions

#

this mod probably won't use any other buttons but I will use my satanic user interface manifesting abilities for other shenanigans later

#

yeah that made the code I have to look at way smaller

maiden phoenix
#

What are you cooking Marie?

stiff locust
#

a mod that has packs which contain jokers from specific mods

maiden phoenix
#

Ooh neat

stiff locust
#

it has some packs which choose random mods and I'm making a UI where you can input a chosen mod for a more expensive pack

maiden phoenix
#

How do you know which mod the booster has?

stiff locust
#

gotta do a bit more polish and then actually make pack art

stiff locust
maiden phoenix
#

Neat

stiff locust
#

it's selected during set_ability if it's random

#

otherwise it is selected in the UI box when you click on the selector pack

#

the hardest part about this mod is going to be the pack art

maiden phoenix
#

Making every pack SDM_0's Stuff one 💪 🔥

stiff locust
#

tbch

#

I still need to normalise the entered value and check it against the blacklist

#

but that's not so bad

#

I also need to exclude legendaries

#

-# putting that in a config

#

right now I gotta figure out why the top text node won't show up until you click into the text entry field

keen atlas
#

the enter mod id one?

stiff locust
#

yeah

keen atlas
#

oh thats weird

stiff locust
#

i just made the buttons look a million times better

#

the space for the text is still there

#

but the text doesn't appear until I click the text box

maiden phoenix
#

Mystery mod

keen atlas
stiff locust
#

from what

#

the enter mod ID text node?

keen atlas
#

nevermind, i thought you meant the spacing was too large

stiff locust
#

the spacing is fine

#

it's just that the Enter Mod ID text does not appear until you click the text entry field

keen atlas
#

i have no clue currently

stiff locust
#

🤔

keen atlas
#

try adding G.OVERLAY_MENU:recalculate() after G.FUNCS.overlay_menu(...)

stiff locust
keen atlas
#

no, at the bottom

G.FUNCS.overlay_menu({
  -- stuff
})
G.OVERLAY_MENU:recalculate()
stiff locust
#

or at the end after the nodes are done

#

right ok

#

is this normal

#

undefined field

keen atlas
#

trust

stiff locust
#

mk

#

that worked

#

I think that's everything then

#

I might change the button colors or give them an outline I'll mess with the styling

#

functiionality wise it's all good

#

I appreciate all the help on the UI

#

it really wasn't as bad as I thought it would be though

keen atlas
#

👍

#

it's not bad, really

stiff locust
#

it looked bad in code

keen atlas
#

yeah

carmine chasm
#

this just makes ankh not delete any joker's instead of any other joker type can someone tell me why for k, v in pairs(deletable_jokers) do if v ~= chosen_joker and v.config.center.id ~= chosen_joker.config.center.id then v:start_dissolve(nil, _first_dissolve) _first_dissolve = true end end

red flower
#

it's v.config.center.key

carmine chasm
#

thanks

carmine chasm
red flower
#

what's the code

carmine chasm
#

the entire ankh code or this snippet?

red flower
#

this snippet with what you changed

carmine chasm
#

it's ``` for k, v in pairs(deletable_jokers) do
if v ~= chosen_joker and v.config.center.key ~= chosen_joker.config.center.id then
v:start_dissolve(nil, _first_dissolve)
_first_dissolve = true
end
end

robust marsh
red flower
#

the other id should be key too

carmine chasm
#

ok

robust marsh
#

yuup

carmine chasm
#

why if I may ask?

robust marsh
#

id doesnt exist

slim ferry
#

because thats just what the variable is called

carmine chasm
#

oh ok

#

thanks it works now

faint leaf
#

to make a deck how do i remove a certain rank (aces)

stiff locust
#

with the british spelling specifically

glass scaffold
slim ferry
#

context doesnt exist in redeem because its the voucher equivalent of use

#

use calculate instead

errant karma
#

anyone know how to attach localisation to a malverk pack

glass scaffold
slim ferry
#

yes

hardy viper
#

is it not context.other_card

#

i would be annoyed if it was context.card because that's inconsistent

slim ferry
#

other_card is usually for scoring related effects

#

but yeah i agree on it being inconsistent though i assume its also thunk code

wild berry
#

how can i flip cards like when theyre enhanced by certain tarots

faint yacht
#

:flip()

wild berry
#

kty

glass scaffold
wild berry
#

i dunno whats causing it tbh, is it this joker?

#

its the most recent ive written

#

it happens after i enter the shop

maiden phoenix
stiff locust
#

this is the coolest thing i've done all week

maiden phoenix
#

Video doesn't load for me 😔

keen atlas
#

amazing

stiff locust
#

aww

flat cypress
#

Is there a way to dynamically change a card’s rarity with cross-mod content? Like, normally it’s a legendary but if Cryptid is installed, it’s an Exotic?

stiff locust
#

i will put it on streamable

#

that might work

stiff locust
maiden phoenix
#

Ty

#

Hell yea this is cool

robust marsh
#

hmm can i make a joker break like a glass card

maiden phoenix
#

Can't forget splash from SDM_0's Stuff ⛈️

stiff locust
#

i had to include a default joker okay

maiden phoenix
stiff locust
#

it was easiest to just make it splash for every pool

robust marsh
stiff locust
#

shatter iirc

robust marsh
#

ty

stiff locust
#

alright chat

#

I need to get the rarity of a joker from its key

#

I know I start with G.P_CENTERS["key"] but where in there is the rarity

robust marsh
errant karma
#

anyone know a malverk mod where i can check if i got these right

maiden phoenix
#

Wait I dont think config.center is needed whenr referencing from G.P_CENTERS? Idr

unkempt thicket
maiden phoenix
#

That's what I thought oops

robust marsh
#

oops all 6s

cursive gazelle
#

Can i remove system folders ? Like mods ?

maiden phoenix
#

You can remove mods from your mod folder if that's your question

mystic river
stiff locust
#

minty check out my cool pack

cursive gazelle
#

My question is can you make a joker that deletes folders if possible

keen atlas
#

yeah, but why tho

cursive gazelle
cursive gazelle
#

I thought you can’t tho

errant karma
keen atlas
#

you can

cursive gazelle
mystic river
robust marsh
#

another locust done, only 20 more to go

mystic river
#

oh that is neat

cursive gazelle
robust marsh
#

sadge

cursive gazelle
#

Make death alternative good please

robust marsh
cursive gazelle
#

Can i see

robust marsh
#

yes

#

JUSTICE LOCUST DONE

#

hell yes

cursive gazelle
#

Also i will accept condolences
I just lost my 50 50

stiff locust
#

gacha games

#

pee yew

robust marsh
#

the sprite is unfortunately a placeholder but that's the general effect

cursive gazelle
#

Lol

wild berry
#

crashed after using high priestiess

stiff locust
#

yeah and it's trash what do you want from me

cursive gazelle
cursive gazelle
robust marsh
stiff locust
wild berry
stiff locust
#

that'll do it

robust marsh
cursive gazelle
#

i think i can draw something

wild berry
#

does psuedorandom accept the current run's seed?

errant karma
robust marsh
robust marsh
stiff locust
wild berry
#

how should i make my psuedorandom seeds work

#

because i want the jokers' effects to remain consistent along one seed

#

but still be able to spit out a "random" value on new seeds

frosty dock
#

that's... usually how things work

stiff locust
#

pseudorandom is made to respect seeds yeah

wild berry
#

no like

stiff locust
#

you don't need to do anything fancy with the seed

#

the seed entered into pseudorandom is for the pseudorandom function to use

wild berry
#

ive entered just one seed and it always gave one value

#

everytime

stiff locust
#

it shouldn't be doing that

idle plaza
wild berry
#

whats the thing i did wrong

frosty dock
#

you should use a string as seed

wild berry
#

oh

frosty dock
#

it gets converted to a number but also accepts numbers directly

stiff locust
#

how would I make a card:click() hook activate only when you select something and not when you deselect it
i already have it activating when you click on a specific thing

frosty dock
#

but the conversion to a number is where the seed gets factored in

wild berry
#

ahhh ok

#

thanks

stiff locust
#

what's the table for highlighted cards

frosty dock
#

<CardArea>.highlighted

stiff locust
#

mkay

frosty dock
#

i don't recall if there's an easier way

stiff locust
#

i only need it for 2 areas anyway

#

this will work

frosty dock
#

card.highlighted is a thing

frosty rampart
#

yea i was about to mention that

frosty dock
#

i thought it was, i'm just slow and had to check

unkempt thicket
#

Is there a context for individually triggering an effect per Joker? Like context.individual but for Jokers.

stiff locust
#

wait huh

#

card.highlighted is true if the card is highlighted?

stiff locust
unkempt thicket
#

Like say i want a Joker to have each other Joker give chips but only when they would normally trigger.

stiff locust
#

yeah context.other_joker then

slim ferry
#

thats

#

not that

#

post_trigger is for when another joker triggers

#

but you gotta enable that first in optional features

errant karma
#

if anyone has good knowledge of malverk

hardy viper
verbal tide
#

hi im not great with coding at all but working on a project, how do i modify a deck to be able to start with jokers? (for example starting with square joker and splash on red deck)

    b_red=              {name = "Red Deck",         stake = 1, unlocked = true,order = 1, pos =   {x=0,y=0}, set = "Back", config = {discards = 1, discovered = true},
cursive gazelle
#

And insert SMODS.Add_card into the code

slim ferry
frosty dock
#

decks can have config.jokers set as an array of joker keys

wispy falcon
#

How would I make a consumable that does +50% on a selected joker's chips?

frosty rampart
#

i feel like we've explained something similar to this to you before
joker value manipulation is not an easy task, especially if you want to edit a specific config variable. you can make assumptions about where the joker's +Chips is stored, but someone could come along and have a joker where they store the chips in card.ability.extra.obnoxious and you can't do shit about that

wispy falcon
#

But couldn't I patch/hook something to get what return chips? Like what is used in the Joker for chips =

rotund sable
#

Smods.calculate_effect?

wispy falcon
royal comet
#

I want to throw myself into an industrial incinerator
You wanna know what took the longest out of this description?
THE COLOUR
IT TOOK 1 HOUR TO PICK IT CORRECTLY
BECAUSE IT WAS A mix_colours()

#

(for the recursive description boxes)

rotund sable
#

But couldn't I patch/hook something

cursive gazelle
wispy falcon
slim ferry
#

what?

cursive gazelle
#

Why did i say Minecraft