#💻・modding-dev

1 messages · Page 92 of 1

elfin nova
#

Thanks I look into this 🙂

faint yacht
#

also whoops

teal estuary
#

...whats that base event queue

#

🤨

#

like, i think you got a couple events

faint yacht
#

Most "normal" runs don't really exceed 100, let alone 1000 iirc.

#

Unless you account for repetitions, of course.

nocturne garnet
nocturne garnet
#

yippee

gritty valley
#

How can I have a deck not show up in the deck selector like the challenge deck?

nocturne garnet
#

ali is legit my #1 fan

#

i love this guy

#

hes awesome

gritty valley
#

Where does the game reset hands and discards? And how can I intercept that process?

crisp coral
#

two places, state_events.lua (line 296 in source) and button_callbacks.lua (line 2914)

#

you can use a lovely patch to change it

nocturne garnet
#

i will do anything to not make a lovely patch

#

they look WEIRD

crisp coral
#

good practice

wintry solar
#

Hating lovely patches is an odd choice

#

They are incredibly useful

elder vapor
#

lovely patches are amazing but can be confusing/annoying

#

much easier to handle when you can look at the lovely dump

weary jungle
#

im dipping my toes in lovely patches (it hasnt been going well)

#

(self.role.wh_bond == 'Strong' and (self.velocity.x * 8)) or (self.velocity.x * 2) is this how this works?

autumn coral
#

i wonder what else i wanna do

#

thinking about other isaac items iz fun

zealous glen
#

Have you done Champion Belt?

autumn coral
#

oooo

autumn coral
#

is that how you think it'd work

zealous glen
#

That’s kind of what I did

autumn coral
#

i'd need to balance it with some kind of reward

zealous glen
#

Here

autumn coral
#

we should work on an isaac pack together

#

lowk

#

i'm having hella fun working on isaac themed balatro jokers

#

oh riiiight

#

i wanted to add greed and greedier into shops

#

like. just. straight-up shops have a chance to be a custom boss blind and have no items

zealous glen
#

I just made Champion Belt and an unrelated Red Hand

#

I just used the name but not the effect

autumn coral
#

left hand or red hand

#

okokokok but no fr @zealous glen if ur down, i can start a new modding thread and we can brainstorm (pun intended) and come up with some cards and make a pack

#

i want to add like. a LOT of isaac mechanics and themed bosses and jokers

#

maybe even music

#

i was thinking about replacing the boss theme with the bum-bo shop theme

zealous glen
#

I know what I said XD

autumn coral
#

lowk we should work together i am BAD at texturing and shit

#

but i am GOOD at code

zealous glen
autumn coral
#

i am very. isaac brained

nocturne garnet
#

he good?

#

i think he has a problem

fluid lagoon
#

right now am using notpad ++ for coding, if there something that would be better for this?

zealous glen
#

I’ve used Sublime Text and VSC

fluid lagoon
#

what are those

autumn coral
#

vs code

#

is great

#

i love vs code

#

highly recommend

#

it also has automatic git

fluid lagoon
#

just think that using a different software to code it can help with some of my problems

#

looking at my code in VS Code, it is saying the start of my calculate function is a problem

wintry solar
#

Can you share the code?

fluid lagoon
#

how should I share the code, just don't want to make a post that is a large block of text

wintry solar
#

A screenshot is normally okay

#

Or you can also just post the code in a code block

tepid crow
#

you can just copy-paste the relevant parts of the code in a codeblock

fluid lagoon
nocturne garnet
tepid crow
nocturne garnet
#

common mistake

nocturne garnet
fluid lagoon
#

after the end or the return

#

where will it go?

nocturne garnet
tepid crow
fluid lagoon
#

thank you, going to see if that fixed it

nocturne garnet
#

also

#

im p sure you can do this with it anyways

#

by just changing the file to a lua file

crystal willow
# nocturne garnet

Thank you! I'm assuming I can't just copy this into a .lua file and have it work immediately?

wintry solar
#

Doing it that way is immensely annoying on mobile

nocturne garnet
tepid crow
fluid lagoon
#

yay now have a new problem XD it is giving the chips on all cards and not just the enhanced ones

wintry solar
#

I love having to download a file and open it in my editor to then scroll through and find stuff 🙃

tepid crow
#

just discord mobile things

#

#

also you can't search through uploaded files while you can search through codeblocks iirc

wintry solar
#

You also don’t get line numbers like you would in a well taken screenshot

#

Each has its benefits and downsides

nocturne garnet
#

by the way

#

card in that context would be the joker, not the other card

#

you're basically saying if the joker's name isnt Default Base, then

fluid lagoon
#

that is good to know

tepid sky
tepid crow
wintry solar
#

Depends what sort of crash it is

tepid crow
#

I guess. Something something "minimal reproducible example"

#

maybe I should just start linking that stackoverflow page 🤔

fluid lagoon
#

ok now with the changed context for what it does, I now have the problem of the chips amount in the description showing as nil

orchid thunder
nocturne garnet
#

so like no sprites are ther

#

e

gritty valley
#

There any good UI examples? Basic buttons and altering background colors and stuff.

nocturne garnet
#

why is my game crashing nowwwww

#

all i did was add an atlas

nocturne garnet
#

nevermind i found out

wintry solar
nocturne garnet
#

i didnt know the atlas needed frames n allat

wintry solar
#

Blind atlases do, yeah

nocturne garnet
#

it hath been fixed

gritty valley
#

Idea: A utility that lets you just directly change the source lua code, and then auto generate a lovely.toml file based on the difs.

gritty valley
#

Actually anyone else find lovely easier to use? it might just be my experience with computer science but like I find this way nicer than fiddling with lua's objects.

languid mirage
#

both have pros and cons

#

lovely can be a bit fragile when you're not the only one editing the code (also when source code changes with updates)

#

but it does allow very elegant solutions for problems that would need complete override otherwise

#

and uh do you really need a tool to generate lovely files when you can use something like git for diff

#

I guess it'd be useful for those less familiar with lovely patches

gritty valley
cerulean rose
languid mirage
#

it does say above the if statement that this seems to be intentional

#

unless I'm misunderstanding it

weak brook
#

hello again modders

#

got a problem

#

so to start, the locked_loc_vars function works the same as the loc_vars function does right? im pretty sure it does

#

but i've been trying to implement some variables into my unlock messages and I keep getting this error when hovering over it

#
    return { vars = { "Test" } }
end```
code is dead simple, dunno what the issue is here. I looked at the line of code the error is referecing and i couldnt figure out why that variable is nil, its not a variable that should be in the `locked_loc_vars` function afaik
```unlock = {
    "Use an {C:spectral}#1#{} card"
},```
crystal willow
tepid crow
tepid crow
magic dawn
#

Trying to use the immolate seed finder program and I'm trying to use a vector when making a seed filter using c++, and I had #include <vector> at the beginning of my code like I saw online but when I do that I get this error
Fatal CL Error -45 when trying to execute clCreateKernel - Creating OpenCL kernel
Anyone know what this means and if I can fix it?

languid mirage
magic dawn
#

I can technically use arrays but like, I want to return that array and from what I'm reading I need to do something with pointers and I don't wanna learn pointers yet

weak brook
languid mirage
weak brook
#

i want to make it so that the unlock messages censors out the names of undiscovered cards

languid mirage
#

C++ rewrite is on a different branch

magic dawn
#

Ah, I see. So there's no way I can use vectors then?

languid mirage
#

in OpenCL version - not that I'm aware of, you can only use static arrays

zealous glen
#

See if Bunco censors undiscovered cards

languid mirage
#

I checked bunco it doesnt use locked_loc_vars

#

I think most people just hardcode values in description

weak brook
languid mirage
weak brook
#

if theres an example of a hardcoded way to achieve this i'd like to take a look at that

languid mirage
languid mirage
weak brook
#

oh

languid mirage
#

so you just replace #1# with Test

weak brook
#

yeah I was worried i'd have to settle for that

#

darn

languid mirage
#

you can create an issue that it's broken

#

maybe someone will take a look

zealous glen
#

Maybe someone in the Steamodded thread would know

weak brook
#

Yeah I'll do that

#

wish they got the other issue I submitted too

#

submitted that a while ago

#

need that other one to be addressed before I can finish up Cardsauce

languid mirage
#

yeah people have been pretty busy, I'll have some time closer to new year, might look at some if I feel like it balatrojoker

weak brook
#

the previous issue I submitted is a small change but a major issue for the Cardsauce mod

#

its like a one line fix

magic dawn
#

Do pointers get destroyed when a function is done running in c++?

weak brook
#

but if its not merged in steammodded by Cardsauce's release i'd have to bundle a different steammodded download like cryptid or a patch to apply to steammodded in the mod

#

cause its a loader thing

#

cant lovely patch it afaik

#

if you have the time i'd very much appreciate taking a look at that

languid mirage
tepid crow
nocturne garnet
#

YYYYESSSSSSSS

gritty valley
#

Has anyone made a util to auto generate 2x sprites?

weak brook
#

I have a Python executable that does that that I made for my own personal use

#

I can throw it to you if you want

weak brook
#

yeah like that

#

my tool does it all in one click which is convenient for me

gritty valley
zealous glen
#

I got around it in Faces of Sin by just using the option to write the key explicitly

#

(Which is a texture mod)

weak brook
# gritty valley Pls

I haven't really polished this at all in a lot of ways so be careful with it. This should only work on windows, and it should automatically detect the location of your appdata folder to find your mods folder.
It will automatically scale up every mod in your mods folder with assets, and will delete 2x files that dont have a matching 1x file.
It will also ignore every file that ends with a dash (ex: balatro-.png) because I use that to flag which of my files are old or alternate versions

gritty valley
#

Thanks!

weak brook
#

also, if you scale up a big replaced spritesheet of all the vanilla jokers, its causes Hologram to break a bit and create this weird candle shaped hole in it. I dunno why that happens but i do know that the 1x and 2x versions for the Jokers spritesheet are not identical, hologram has some differing transparency

zealous glen
#

But it shouldn’t be hard with whatever imagine editing program

#

Especially Aseprite

weak brook
#

works for me

#

speaking of things working and not working I just updated Steammodded and now all my achievements I added dont unlock at all wtf

#

bet its this

#

or something else that got changed maybe

edgy reef
#

Yeouch yea

#

Something broke the injection to add achievements

weak brook
#

yep

#

i just removed that and they unlock now

edgy reef
#

Probably better to just override the whole function instead of injection anyways.

weak brook
#

override what function?

edgy reef
#

unlock_achievement

weak brook
#

i've been basing my achievement unlocking on how cryptid handles it

#

i wonder if that override method might be better

#

eh maybe not my main complaint about achievements is the lack of text formatting on them i doubt that will change with a new method

edgy reef
#

It follows how achievement "works" internally (just a string value)

#

Then just wraps

weak brook
#

yeah

edgy reef
#

Doing a table would be so much better

weak brook
#

dont think i have the time to overhaul achievements from now til release though so i'll just have to force that patch off with another patch

mellow sable
#

I updated this line to prevent the memory leak but then it ends the function before actually running the code to unlock the achievement(?)

#

or maybe the achievement unlock function doesn’t like being called only once

tepid crow
#

preventing the memory leak by not running the code? 😏

edgy reef
mystic river
#

all right, so
how do we actually go about making a function that can change a hand's base values on game start?

#

we'll work on the conditional part later, right now we just want to make it happen at all

mellow sable
#

should be an easy fix then

weak brook
#

(idk if thats an actual turn of phrase)

mystic river
#

"deck has a lot of suits (exact definition of this TBD) or a relevant config option is checked"

#

i've been dithering on the exact condition that should lower the scores
cause like if we do a cryptid compatibility thing and have Deck Of The Cat: All cards are the 3 suit, that'd be 100% custom suits but wouldn't make it easy to play a spectrum. so a simple count of custom-suit cards won't do it

rough furnace
#

May be worth an investigation

weak brook
#

i swear i changed the values before but the methods im trying now arent working so im not sure

#

though when I changed the values before I ended up deciding against implementing something that did that in the mod, it felt not good

#

I originally had a joker idea to double the upgrade values of high card but I ended up changing it to just doubling the levels you recieve when leveling up high card, and that worked out way better cause it meant that the level number always stayed consistent with vanilla

mystic river
#

ik cryptid has an exotic that makes levels give 2x instead of +whatever, so i'm reasonably sure it's doable, and i might be able to figure it out by digging through that code
i'm also reasonably sure i know how to make hands check on game load to determine their value conditionally. but for obvious reasons that wouldn't work to have it care about the deck

rough furnace
#

this is balatro everything is possible

#

the real question is how much work will it take and how compatible with other mods

mystic river
#

true

hybrid iris
#

this is really weird

#

this one patch seems to break purple seals??

#

like very specifically only purple seals and i dont know why

rough furnace
#

does it match multiple lines?\

zealous glen
#

Does it need to be “at”?

hybrid iris
#

,,,good, question for that second part actually

hybrid iris
#

seems like it does have to be "at" since its just replacing the context.card == G.consumeables entirely

#

OH

#

okay i see the problem now

#

the code that fixed purple seals as injected as a steamodded lovely patch that looked for the code i was also replacing

weak brook
#

this is real bad damn

#

please fix soon good sir or madam MathIsFun_ 🙏

fluid lagoon
#

how do I make the joker react to its effet being used?

elder vapor
#

card:juice_up

fluid lagoon
#

where would I put that?

elder vapor
#

in the calculate function

#

under your effect

#

like this

fluid lagoon
#

so before the return?

elder vapor
#

yes

tepid crow
#

well after a return nothing can exist so

fluid lagoon
#

what is that play sound in that example there?

elder vapor
#

function that plays a sound

autumn coral
#

lmao???

tepid crow
wintry swallow
fluid lagoon
elder vapor
#

what does your code look like

fluid lagoon
elder vapor
#

use round brackets () not curly brackets {}

#

card:juice_up{0.5,0.5} -> card:juice_up(0.5,0.5)

fluid lagoon
#

awe, got to hate when the problem is something small like that Xd

elder vapor
wintry swallow
#

fair. i packed it full lol. had no issue till ante 7 when i got a card to exploit

fluid lagoon
#

it isn't doing what I would want, I was wanting it to react as it triggers a chip gain from the enhanced cards, or should I change the card = context.other_card to card:juice_up(0.5,0.5)

elder vapor
#

shouldn't it be card = card

#

one sec

#

if you want the card scoring to react, then changing it to context.other_card:juice_up(0.5, 0.5) should do it

fluid lagoon
#

I think I have done a dumb and just been doing this wrong

elder vapor
#

its easy to make mistakes dw about it

fluid lagoon
#

ok, so each time the +50 chips would hit from an enhanced joker being played, how do I make it then react when that happens

#

think I am going to break from working on this and play some of the crypted mod

zenith drum
#

Can anyone help point me to the right direction? I'm trying to add a specific booster pack into the shop after a boss blind, but I don't know where to insert the logic of adding the booster pack itself... update_shop doesn't seem to be the right place for it

shell tangle
#

Hello, I'm attempting to test out more UI functions, but I'm not fully understanding it just yet. Trying a button that calls UITests_misc_options and brings up an overlay menu, but I'm getting a crash saying that colour is nil in function UIElement:draw_self, and I'm not sure where I'm going wrong with it. Would appreciate if someone pointed out where the issue is.


G.FUNCS.UITests_misc_options = function(args)
  G.FUNCS.overlay_menu({
    definition = { create_UIBox_UITests_misc_settings() }
  })
end

function create_UIBox_UITests_misc_settings()
  local tab = create_UIBox_generic_options({
    back_func = 'exit_overlay_menu',
    contents = {
      {
        n = G.UIT.R,
        config = { colour = G.C.CLEAR, align = 'cm', minw = 12 },
        nodes = {
          { n = G.UIT.T, config = { text = "Test", colour = G.C.UI.RED, scale = 0.4 } }
        }
      }
    },

  })
  return tab
end```
tepid crow
shell tangle
tepid crow
shell tangle
zenith drum
#

Thanks @tepid crow @shell tangle I'll check them out

tepid crow
elder vapor
#

is there a way to add a card to the card options in a booster pack?

tepid crow
shell tangle
# tepid crow it is the proper way to nest the UI tree (if I'm to believe my own mod and steam...

Maybe, I'm using Eremel's Malverk as a reference, which here's the snippet I'm using as a reference, I'll probably go back and double check his lovely patches to see if I missed anything.

G.FUNCS.texture_config = function(e)
    G.FUNCS.overlay_menu({
        definition = create_UIBox_texture_config(e.config.ref_table.texture_pack)
    })
end

function create_UIBox_texture_config(texture)
    local label = {text = 'Page 1'}
    
    local t = create_UIBox_generic_options({ back_func = 'textures_button', contents = {
        {n=G.UIT.R, config = {colour = G.C.CLEAR, align = 'cm', minw = 12}, nodes = {
            {n=G.UIT.C, config={align = "cm", padding = 0.15, r = 0.1, minw = 12}, nodes={
                {n=G.UIT.R, config={align = "cm", colour = G.C.CLEAR, r = 0.1, padding = 0.2}, nodes={
                    {n=G.UIT.T, config = {text = 'Configuring', scale = 0.8, colour = G.C.WHITE, shadow = true}},
                    {n=G.UIT.T, config = {text = localize({type = 'name_text', set = 'texture_packs', key = texture}), scale = 0.8, colour = G.C.WHITE, shadow = true}}
                }},
                -- Main Texture Select Display
                {n=G.UIT.R, config = {colour = G.C.BLACK, r = 0.1, minh = 7.5, minw = 12, align = 'tm', padding = 0.5}, nodes = {
                    {n=G.UIT.R, config = {align = 'tl'}, nodes ={
                        Malverk.texture_config_toggles(texture)
                    }},
                    -- Page cycler
                    {n=G.UIT.R, config = {align = 'cm'}, nodes ={
                        EremelUtility.page_cycler({
                            object_table = Malverk.config.texture_configs[texture],
                            page_size = 18,
                            key = 'texture'
                        })
                    }},
                }},
            }},
        }}
    }})
    return t
end
tepid crow
#

Eremel's stuff is great as UI reference, I did the same thing

shell tangle
tepid crow
#

but like in his code, it's definition = create_UIBox_etc(...), not definition = { create_UIBox_etc(...) }

tepid crow
shell tangle
#

That is true, I think I mixed it with the {} from the overlay menu, but, still run into the click crash, though.

tepid crow
#

it's {}s all the way down

#

do you have the full click error by any chance?

shell tangle
edgy reef
#

colour is nil errors are generally tied to depth errors

tepid crow
#

the depth error is (presumably) fixed now

shell tangle
tepid crow
shell tangle
#

Wait, figured it out, I moved the function up to group it with other code, but, forgot to delete the previous instance, so all the changes I've been making were getting overwritten.

tepid crow
#

🤦‍♂️

#

good old "why aren't my changes doing anything"

shell tangle
#

It was the definition = {} thing.

tepid crow
#

:)

elder vapor
#

SMODS.Booster isn't documented, but in the create_card func it passes in the booster card alongside the index

orchid thunder
#

can i add an image to a gui

elder vapor
#

index nil with "c_gems_infusion"

wooden nexus
elder vapor
#

anyways been trying to get the nil to show up as 2 but haven't gotten it to work

restive magnet
#

is the reason why all of these checks fail and go straight to the else because i'm doing nested ifs wrong or is it because of how SMODS.Sound works

#

the code works to replace music layers when its formatted like this but this is not nicely scalable for more conditions

crisp coral
#

you want to put the checks for the return instead

tepid crow
restive magnet
#

damn

#

is there a way to exclude groups of checks without just making each one only true of all others are false individually

crisp coral
#

the other one is "if, when this mod is loaded, these globals exist (they don't), then it will initialize that sound"

#

for the overlapping checks, you can return a larger number so its priority becomes higher and it'll be the one that plays

restive magnet
#

oh i see

#

that will help a lot

#

when returning a number greater than 1 does "and" just equate to multiplication

crisp coral
#

no

crisp coral
#

(condition and 1) means
if condition == true: return 1

restive magnet
#

ok, so i can do the conditionals with a "and x" where x is the priority

#

more niche layers get higher priority

crisp coral
#

mhm

restive magnet
#

cool awesome

weak brook
#

oh hey speaking of that with the SMODs music replacement

#

I noticed that if I reset my profile while SMODS is playing a modded music track the track starts playing again on top of the previous one

#

and it doesnt stop doing that and i have to restart the game

#

has anyone else come across that or found a way to fix that

crisp coral
#

yeah it does that

#

i haven't checked what causes it tho

restive magnet
#

smods.sounds has some problems

#

i had to get around the syncing issue by manually shifting one of my tracks by like 1500 samples

#

mostly works

shell tangle
tepid crow
#

basically that ^

cold peak
#

Any examples of using art larger than the regular card sizes? Or is it not really possible

shell tangle
#

It can depend, but for the most part, it depends on what you set your atlas x and y to.

cold peak
#

the px/py of the atlas definition should define the width and height of the 1x version of the asset right?

zenith drum
#

How come my booster pack shows ERROR when opening it?

shell tangle
#

The atlas x and y sets how big each individual object in an atlas is, and for some objects, loading that will try to squeeze it into the same space, I know vouchers definitely do, and for others, it gets pasted on top at full size with no refitting, which I believe stickers do.

zenith drum
# zenith drum How come my booster pack shows ERROR when opening it?

Here's my code:

{
        key = 'einherjars',
        group_key = 'k_einherjars',
        loc_txt = {
            name = "Spiritual Concentration Pack",
            text = {
                "Choose {C:attention}#1#{} of up to",
                "{C:attention}#2# Einjerhar{} cards"
            }
        },
        weight = 0,
        cost = 8,
        name = "Spiritual Concentration Pack",
        pos = {x = 0,y = 0},
        config = {extra = 2,choose = 1},
        create_card = function(self, card)
            return create_card('Joker', G.pack_cards, nil, 'valkyrie_einherjar', nil, nil, nil, nil)
        end,
        in_pool = function(self)
            return true
        end,
        loc_vars = function(self, info_queue, card)
            return { vars = {card.config.center.config.choose, card.ability.extra} }
        end,
        draw_hand = false
    }```
cold peak
#

Gotcha so it'll depend on the type, any idea on how jokers handle it?

shell tangle
#

I don't remember it off the top of my head, I say just set the px to a wild amount and see what happens when you load it in.

cold peak
#

alr thanks!

#

Idk why I didn't just try it out lol, ig I just assumed it would break

shell tangle
# elder vapor i'm not well knowledged on the inner working of steamodded so i wouldn't try wri...

I will say, even if you don't know the ins and outs of Steamodded, writing a document on it, just covering things that didn't make perfect sense at first, issues that you ran into, and solutions you found to said issues, even if that's as simple as figuring out how to make text not show error, will help out both people looking to learn, and the people writing documentation - it helps them know what parts need further elaboration, and what not might be clear on first glance.

shell tangle
zenith drum
shell tangle
#

Wait, you might not need the process loc text, but you do need to define it at least.

zenith drum
#

that would also mean that it's better I move all the loc_text values from other cards to my localization file too, right?

shell tangle
#

You can if you want, but it's not necessary.

#

It's just a specific oddity with Boosters and possibly a few other objects, I think stickers as well for example, that require external loc_txt.

zenith drum
#

Got it. Thank you!

shell tangle
# zenith drum Got it. Thank you!

I think it needs two, one is definitely G.localization.descriptions.Other.b_modprefix_boosterkey = {name = {blah}, text = {blah}}, and you can probably just have that as a line in your code, and the other is G.localization.misc.dictionary.k_booster_group, which, I think gets defined when you do a consumabletype, but, you might need to set it manually, I don't remember.

orchid thunder
#

what does the sleeve center part of this do
local sleeve_sprite = create_sleeve_sprite(0, 0, _scale*1.5, _scale*(95/71)*1.5, sleeve_center)

shell tangle
#

It's a variable, look for local sleeve_center = whatever.

orchid thunder
#

CardSleeves.Sleeve:get_obj(G.GAME.selected_sleeve or "sleeve_casl_none")

tepid crow
#

though that's not really the interesting part

#

the interesting part is create_sleeve_sprite

orchid thunder
#

i just want mine to be a set image that wont change

#

so this take the sleve and finds its atlas and pos G.ASSET_ATLAS[sleeve_center.atlas], sleeve_center.pos)

#

so i could make the function take a position isnted and have a set atlas

shell tangle
#

Yeah, should be G.ASSET_ATLAS['prefix_atlas'], pos = {x=0,y=0},

orchid thunder
#

prefix atlas is just the key the atlas is?

shell tangle
#

Yeah, plus your mod prefix if you don't set the atlas prefix config to false.

#

Actually, you may not need your prefix anymore, but can't say for sure.

tepid crow
#

p sure you do

shell tangle
#

I know you used to, but I feel like I might've saw someone use it in a case where they didn't recently.

orchid thunder
#

so if my prefix was mc then it would be mc_(atlas key)

shell tangle
#

Yeah, should be.

orchid thunder
#

ok

tepid crow
#

you don't need the extra function around it, unless you plan on doing this multiple times?

elder vapor
tepid crow
#

you can't make a pr so... ¯_(ツ)_/¯

zenith drum
# shell tangle I think it needs two, one is definitely `G.localization.descriptions.Other.b_mod...

I got it to work via localization now, so things are good. Thanks for this! I do have a couple of other questions though:

  1. Is there a way to set color names in text? (like I saw in Reverie that they're using {C:cine} for their own color)
  2. Where does localize() pull from exactly when used? Does it look up immediately from the dictionary? I've tried using it for labels of my own consumeable cards, but no dice
tepid crow
#

localize is an incredibly complex function that I've looked at a couple of times now and still don't fully understand lmao

shell tangle
tepid crow
orchid thunder
#

multiple diffrent

#

some bigger some smaller

shell tangle
tepid crow
zenith drum
zenith drum
tepid crow
#

yeaahhh

orchid thunder
shell tangle
#

Put the mc_resource_sprites in quotation/apostrophe marks.

orchid thunder
#

oh shit ok

nocturne garnet
orchid thunder
#

nvm wait

#

im just an idiot i frogto to save

#

what does the color do

#

but anyways YAy thanks guys

tepid crow
nocturne garnet
# nocturne garnet

yo chat is there a way to change a blinds' text when you're not fighting it?

#

like in the blind select screen

gritty valley
#

Holy shit the galdur codebase got me fucked up.

#

Type of bs I be pulling

nocturne garnet
#

but how would i change the text here

orchid thunder
#

you dond need it

#

dont*

elder vapor
shell tangle
#

@tepid crow Apologies, but I'm apparently pretty rusty, could you help me again and pinpoint where I'm missing? I'm going for

Row
>Col x2
>>Row x3
>>>Col Toggle
>>>Col Name

but, I'm apparently getting just the row output, and I haven't been able to narrow down why.

function create_UITests_misc_options()
  local TexturesIn, TexturesOut = HEX('FE5F55'), HEX('f83b2f')
  local settings = {
    'a',
    'b',
    'c',
    'd',
    'e',
    'f'
  }
  local lists = {col1 = {}, col2 = {}}
  for i = 1,  #settings do
    if i <= math.ceil((#settings/2)) then
      table.insert(lists.col1, settings[i])
    else
      table.insert(lists.col2, settings[i])
    end
  end
  local output = {n=G.UIT.R, config = {}, nodes = {}}
  for i = 1, #lists do
    local col = {n=G.UIT.C, config = {padding = 0.1, align = 'tm'}, nodes = {}}
    for j = 1, #lists[i] do
      local option = lists[i][j]
      local row = {n=G.UIT.R, config = {padding = 0.1}, nodes = {
        {
          n = G.UIT.C,
          config = { r = 0, align = 'cl', minw = 0.8, minh = 0 },
          nodes = {
            create_toggle { label = '', active_colour = TexturesOut, scale = 1, w = 0, shadow = true, ref_table = config, ref_value = option } }
        },
        {
          n = G.UIT.C,
          config = { padding = 0.2, r = 0, align = 'cl', minw = 2, minh = 0 },
          nodes = {
            { n = G.UIT.T, config = { shadow = true, text = option, align = 'cm', scale = 0.5, colour = G.C.UI.TEXT_LIGHT } } }
        }
      }}
      table.insert(col.nodes, row)
    end
    table.insert(output.nodes, col)
  end
  return output
edgy reef
#

Wrote this a few weeks ago, hasn't been added yet iirc

tepid crow
elder vapor
nocturne garnet
shell tangle
# shell tangle <@174102684586999808> Apologies, but I'm apparently pretty rusty, could you help...

I've narrowed one of the issues down to how I tried the lists,

local settings = {
    'a',
    'b',
    'c',
    'd',
    'e',
    'f'
  }
  local lists = {{},{}}
  for i = 1, #settings do
    if i <= math.ceil((#settings/2)) then
      table.insert(lists[1], settings[i])
      sendDebugMessage('1 '..tostring(lists[1][i]))
    else
      table.insert(lists[2], settings[i])
      sendDebugMessage('2 '..tostring(lists[2][i]))
    end
  end

For some reason, lists has to be {{},{]}, and the first part crashes if it doesn't, and the second part crashes no matter what. I'll probably manually separate them for now and come back to it later.

tepid crow
shell tangle
#

It was 100% in my list, and I was getting confused about why it was vertical because I needed to set either a minw or maxh on the output row.

shell tangle
tepid crow
shell tangle
#

Used to python indexing, I think.

tepid crow
#

I feel that

#

I do miss my negative indices

zenith drum
#

Anybody know why my consumables look like this when undiscovered? Its name also strangely shows up on the upper left side of the screen too, past the boxes

shell tangle
shell tangle
orchid thunder
#

ok now i have an even more Rediculus GUI question

#

ridiculous

#

is it posible to change the shape of a GUI

crisp coral
nocturne garnet
gritty valley
stiff locust
#

ive got a really strange crash here

#

seems to be something to do with joker retriggers according to the code? but this crash only comes up when i play a hand with a specific joker from my mod

edgy reef
#

Not accounting for context.repetitions

stiff locust
#

but i put and not context.repetition

#

is the

#

is it a different context because it's reptitions plural

#

why is this a problem with this joker specifically and not any others i've made

gritty valley
#

Is there a better way to do this?

orchid thunder
#

i had a vision that was like this

#

for a gui

#

no clue where to start

tepid crow
tepid crow
gritty valley
#

Yeah but it still feels a bit hacky checking both tables, it's weird that there isn't like a unified refrence table

edgy reef
#

G.P_CENTERS is the unified table

#

Any centers injected are added there

gritty valley
#

Goddamit

#

I swear I tested that before and it didn't work

#

Welp

zenith drum
gritty valley
#

Is there a way to get the back key ID out of a card? I know you can get the actual back data with Card.config.center, but like is there way to get the key name?

tepid sky
#

anyone know what part is used for the unlocking or the discovered animation

zenith drum
#

what's a good way to check if a consumable is a specific type?

shell tangle
#

I hate writing UI, but I do enjoy seeing the results of said UI.

crisp coral
#

that looks pretty clean

tepid sky
#

(i have yet to make the ui) 😔

shell tangle
rough furnace
zenith drum
weak brook
#

i gotta know if theres like a generator for the ui or something

polar marten
#

im super new, got a simple question. How to get the current mult variable and current chips variable that has been scored so far?

#

or anyone knows a mod that uses this so I can just check code to understand it?

maiden phoenix
#

Iirc its a global "mult" and "chips" variable

#

Dunno if those are the exact names

polar marten
#

I see mods using local "chips" that would then override it no?

maiden phoenix
#

My mod checks them for the "La Révolution" joker

polar marten
#

coolio ima check that then

#

can u link it?

maiden phoenix
#

If its local its prob for inside calculation

polar marten
#

thx a bunch, learning the most by looking at code directly

#

I assume its G.GAME.chips then

maiden phoenix
#

Thats the total iirc

#

Isnt it like mult * chips > G.GAME.chips or something?

polar marten
#

maybe its just hand_chips? im super new so I really dont know yet

maiden phoenix
#

Yea hand_chips is the current chips and mult is the current mult

polar marten
#

aighty thx

maiden phoenix
#

G.GAME.chips is the current score you got

polar marten
#

ah okay makes more sense now

wintry solar
polar marten
maiden phoenix
#

loc_vars is to replace the #1#, #2# etc.. in description to said value

#

Do you mean config?

polar marten
#

nah just general

#

like this should work

#

all examples I find they use loc_vars in the return function

maiden phoenix
#

Not every context returns the same thing

#

thunk moment

polar marten
#

yeh, I get that

#

was just wondering if there is some kind of deeper meaning, like interactions with other jokers or something

maiden phoenix
#

You didn't specify a message in the return value so nothing shows up

polar marten
#

actually I found a pokermon that uses it

polar marten
maiden phoenix
polar marten
#

cool, that clears it up for me thx!

#

thanks for all the help, much appreciated

faint yacht
#

Is there a "stage" or other global I can check for to prevent add_to_deck and remove_from_deck triggering SFX?

#

if G.STAGE == G.STAGES.RUN and not G.screenwipe seems to have done it, more leaning towards the G.screenwipe.

polar marten
#

wait can I not lower the chips or mult? Thonk

#

chips_mod does not seem to accept negative numbers

#

ok nvm on mult I can

#

mispelled it

#

its "chip_mod"

#

coolio works great

#

THX SDM 🙏

#

that was pretty painless compared to Yomi Hustle modding ngl

young dew
#

how could i add text here?

#

under the +6 chips

tepid sky
#

first take ownership of the card

young dew
#

and then?

tepid sky
#

change the text :D

#

thats how i'd do it

teal estuary
#

i think they more mean "how would you change the text"

mystic river
#

can you even take ownership of a regular playing card?

hardy viper
sterile cedar
#

I'm looking trough the Steammodded/SMODS wiki , and I cant fidn anything on SMODS.DeckSkin

#

what does it refer to ?

#

I'm using Balacord's code as a reference

crisp coral
#

DeckSkin is used with the DeckSkinLite mod

#

i think?

#

oh nevermind i forgot it was implemented into base a while ago

crisp coral
stiff locust
#

how do I make this crash not happen

sterile cedar
crisp coral
#

it creates the deck skin object, which appears in the Customize Deck screen

sterile cedar
#

oh dang thats neet

sterile cedar
weary jungle
#

i am messing with functions and im scared

tepid sky
#

wdym?

weary jungle
tepid sky
#

litterally wtf did you do ?! ._.

weary jungle
#

do NOT change Movable:move_xy

tepid sky
#

lmao

weary jungle
#

ok i did it

#

we have achieved bounce

#

do NOT look at skill issue

#

also i forgot to turn off talisman

tepid sky
#

lmfao

#

new challenge: everything is 10 times bouncier

weary jungle
#

also, big problem. its all fps based

gritty valley
sterile cedar
heavy oracle
#

i wanted to ask if anybody got in a nutshell all the things i must know to mod balatro

zealous glen
#

Being able to read vanilla and mod code to learn how they do things and being able to google

polar marten
#
calculate = function(self, card, context)
  if context.individual and context.cardarea == G.play then
    card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chips_gain
      return {
        message = '+'..tostring(card.ability.extra.chips_gain), 
        colour = G.C.BLUE,
        card = self
      }
  end
end

Any idea why this is not popping up on every scored card?
the visual? like its working functionality wise

#

but under the joker I dont get the "+5" in blue

wintry solar
#

Should be card = card

polar marten
#

same thing

wintry solar
#

Can you show what the full code is?

polar marten
#

ah nvm I got it now, those weird messages that are inbetween are weird for a first timer

#

but thx for the help anyways

#

SMODS.Joker{
-- Virtous Contract
    key = 'VirtousContract',
    loc_txt = {
        name = 'Virtous Contract',
        text = {
          'This Joker gains {C:blue}+#2#{} Chips per scored card.',
          'Resets when blind is defeated.',
          '{C:inactive}(Currently{} {C:blue}+#1#{} {C:inactive}Chips){}'
        }
    },
    rarity = 2,
    cost = 5,
    blueprint_compat = true,
    eternal_compat = true,
    unlocked = true,
    discovered = true,
    atlas = 'Jokers',
    pos = {x = 1, y = 0},
    config = {extra = {chips = 0, chips_gain = 5}},
    loc_vars = function(self,info_queue,card)
        return {vars = {card.ability.extra.chips, card.ability.extra.chips_gain}}
    end,
    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play then
            card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chips_gain
                forced_message('+'..tostring(card.ability.extra.chips_gain), card, G.C.BLUE, nil)
        end
        if context.joker_main then
            return {
                message = '+'..tostring(card.ability.extra.chips), 
                colour = G.C.BLUE,
                chip_mod = card.ability.extra.chips
            }
        end
    end
}```
#

is the whole thing now, and the function forced message lifted of Bunco

wintry solar
#

You don’t need that function

polar marten
#

local function event(config)
    local e = Event(config)
    G.E_MANAGER:add_event(e)
    return e
end

local function forced_message(message, card, color, delay)
    if delay == true then
        delay = 0.7 * 1.25
    elseif delay == nil then
        delay = 0
    end

    event({trigger = 'before', delay = delay, func = function()

        card_eval_status_text(
            card,
            'extra',
            nil, nil, nil,
            {message = message, colour = color, instant = true}
        )
        return true
    end})
end```
#

well return does nothing when it comes to sending a message when other cards get scored

#

gotta use that weird, G.E_Manager add event thingy

wintry solar
#

Lemme check real quick, that sounds wrong

polar marten
#

its working now though

wintry solar
#

To get it on the joker you just need to use card_eval_status_text, you need buncos weird spaghetti function

#

But if it works, it works

polar marten
#

"u need buncos weird spaghetti function"

#

did u mean to write "u dont" ?

wintry solar
#

You don’t need*

polar marten
#

haha I see

wintry solar
#

Bunco does some really weird things

polar marten
#

card_eval_status_text(card,'extra',nil, nil, nil,{'+'..tostring(card.ability.extra.chips_gain, cG.C.BLUE}))

#

so this should work?

wintry solar
#

The table at the end needs keys, like message = blablabla

#

Let me find an example, hold on

polar marten
#

okm thx

wintry solar
polar marten
#

see thanks but I tried that already a couple times

#

errors out and wants me to use a [ "near the ="

#

which makes no sense

wintry solar
#

Then you’ve got a syntax error somewhere

polar marten
#
        if context.individual and context.cardarea == G.play then
            card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chips_gain
            card_eval_status_text(card,'extra',nil, nil, nil,{message = '+'..tostring(card.ability.extra.chips_gain], colour = cG.C.BLUE}))

        end
        if context.joker_main then
            return {
                message = '+'..tostring(card.ability.extra.chips), 
                colour = G.C.BLUE,
                chip_mod = card.ability.extra.chips
            }
        end
    end```
#

oh wait

#

I see it now

#

day 1 lua for me

#

this stuff weird

#

had 3 typos somehow, I should eat lol

#

thanks again though!

#

yes works like a charm

#

!!!!

wintry solar
#

No worries!

elder vapor
#

i hate how += expressions don't work in lua 😭 luau spoiled me

zealous glen
wintry solar
#

It’s off center

zealous glen
#

To me it looks like the Joker is thinner than it should be

#

But I'm not sure why

#

Bunco has a slightly different code than what I used in 0.9.8, but neither seem to get it right

nocturne garnet
#

how the fuck did you do that

#

writing UI looks soooo confusing to me

zealous glen
shell tangle
#

Biggest thing that helps me with UI is figuring out the tree at the start, like this one is

Row
>Column
>>Tall Row
>>>Vertical Text
>Column
>>Row x3
>>>Column with Toggle per row
>>>Column with Name per row
>Column
>>Row x3
>>>Column with Toggle per row
>>>Column with Name per row
zealous glen
#

Does anyone have an example of a wide Joker in Steamodded 1.0?

shell tangle
zealous glen
#

I referenced Bunco but it also doesn't work

gritty valley
zealous glen
#

Paperback might address part of the issue by adding a load function

shell tangle
#

I used what stamp did to mess with vouchers and it worked perfectly fine for me, and it's still perfectly functional for stamp in Paperback.

gritty valley
#

I feel like all you would have to change is the card width and height no? Cards center by default so just changing the width and height parameters would do it maybe.

shell tangle
#

There's some issues if you reload it during a run without more things in place.

gritty valley
#

Ah, yeah that makes sense. I’ll have to look at the vanilla code for half joker some time.

zealous glen
#

As I said

#

I'm already doing the same thing as all examples I looked at

#

Including Paperback

#

But they're all smaller than normal

#

Instead of larger

shell tangle
#

When I messed with vouchers, I made them larger with no problem, but, maybe not the same for jokers. What's the code you're using?

gritty valley
#

I would assume it’s something to do with the ratios being off but that’s complete speculation. I know cryptid has quite a few abnormal joker shapes so maybe look there?

zealous glen
shell tangle
#

Here's the format I used, but, yeah, not really sure what's going wrong there, I assume it's something specific to jokers only.

set_ability = function(self, card, initial, delay_sprites)
      local w_scale, h_scale = (86/71)*0.96, (116/95)*0.96
      local W = card.T.w*w_scale
      local H = card.T.h*h_scale
      card.T.h = H
      card.T.w = W
    end,
zealous glen
#

Yeah, I'm doing the same thing

#

How did you define the atlas

shell tangle
#
SMODS.Atlas{
  key = 'Tests',
  path = "VouchersTest.png",
  px = 86,
  py = 116
}```
#

Biggest thing is that I have no idea why your code would cause it to shrink over time.

wintry solar
#

do you need the set_sprites too?

zealous glen
#

Originally I did it all in set_ability but this is how Bunco did it

#

And Paperback

dapper crown
#

Do i need to learn lua to make mods

zealous glen
#

Yes, but you can learn by modding

dapper crown
#

What mod u make

dapper crown
#

Thats so greatttt

#

@zealous glen Memes

zealous glen
#

The sprite definitely seems thinner than the soul sprite

#

Even if I don't touch the sprite it shows up like this

#

So maybe there's an issue with the atlas?

dapper crown
#

Im boosting ur server

#

send me link

wintry solar
#

what's your atlas definition?

zealous glen
nocturne garnet
#

man is ui hard

zealous glen
#

I've done some boss UI

dapper crown
#

Victin can i boost ur server

zealous glen
zealous glen
dapper crown
#

Ok

nocturne garnet
#

its like

#

summoned blinds

#

harder blinds basically

#

so i want them to show up in the collection

#

this is basically the same code as in create_UIBox_blind_popup but using my localization instead

zealous glen
nocturne garnet
#

idk maybe

#

i dont know ANYTHING about UI code

#

other than it has to do stuff with nodes n shit

zealous glen
#

As someone23832 suggested, try to imagine which nodes should exist

#

It's usually not too hard

#

Each line is a row, for example

#

If the text changes color, you need more than one text node

nocturne garnet
#

yeah i think i got that part but its a little confusing at times

languid mirage
#

I think biggest thing for UI is to keep in mind that within a node you can only have child nodes of the same type, otherwise alignment is broken

nocturne garnet
#

but its overlapping with the old blind popup

zealous glen
#

Maybe it's overlapping because you're adding a second root node

#

I'd imagine it only expects a single root

#

Depending on what you want to do, you can add everything inside your root to the original root

#

Actually, that example I showed has two Blind descriptions inside the same root

zealous glen
wintry solar
#

not that I can think of, I've not really touched resizing sprites

shell tangle
#

You could construct all the nodes and throw them into a global table to access them as well, might not be the best way, but it's probably an easy way to get it working.

hardy viper
#

what was thunk thinking writing this

#

all the other save functions seem to use a local

#

but theres just a pointless global declaration here fore

west wing
#

heyyyyy how do i check if a joker is a specific joker?

#

bad phrasing. ok

#

so i am trying to detect if a joker to the left of another joker is a specific key, and i'm not sure where to get the key from

nocturne garnet
west wing
#

alrii, thank you, let's see if it works!

#

ohhhhhhhhhh i needed to have the prefix

#

darn

nocturne garnet
#

yea

west wing
#

well ok thank you very very much!!!! significantly appreciated!!!!!!

young dew
#

is there a way to make a modded rank act as another rank?

#

i figured it out but it doesn't work for straights

mellow sable
#

right now, only exclusively

#

so you can make a 7 act like a King, but you can't make it act like a 7 and a King at the same time

young dew
#

so for now i can't make a modded rank act as its own thing but have all the interactions of the rank 2?

zealous glen
maiden phoenix
#

Is this for the TBOI mod or for your mod?

zealous glen
#

Mine

#

I already had Champion's Belt, and B allowed me to use the artwork

nocturne garnet
#

i dont even know how i managed to do this

#

i just did it

wintry solar
#

it's very wide, but good job!

nocturne garnet
#

too long

edgy reef
#

You should be able to switch the alignment of the UIBox iirc

zealous glen
#

Also, interesting

#

I think variations of Blinds like there are Champions in Binding of Isaac could be fun

wintry solar
#

I'd also maybe throw a darken on the whole node so that the row at the top doesn't blend in as much

gritty valley
#

What's a good cheat mod for adding enhancements to cards and stuff like that?

mellow sable
#

DebugPlus

gritty valley
gritty valley
tepid crow
#

it should last time I checked

gritty valley
#

Oh wait nvm I figured it out

weary jungle
hardy viper
#

thats

#

odd

weary jungle
#

its nice

gritty valley
#

Feels like I'm on something

weary jungle
#

how do i make a variable in lovely patches that i can modify with lua

gritty valley
#

Wdym

weary jungle
#

if self.role.xy_bond == 'Strong' then TGTMVelMult = (2200 * dt) end the 2200 i want to have as a variable i can change

#

with config UI

gritty valley
#

Just make it a global variable that your mod sets

#

You can tie it to the G object if you really want to. So like replace the 2200 with G.whateverName and in your mod code make it G.whateverName = value

#

Tho I haven't worked with the config api yet so idk how you load values from it

weary jungle
#

but this is initialized like at the start i think

#

this is the main movable function

#

wait...

hardy viper
#

definitely not if its going by dt

weary jungle
#

local TGTMVelMult = 0.99 i already initializes the variable....

#

how do i make a variable global

#

thats googlew my bad

gritty valley
#

Just don't put local. lol

#

But I would tie it to the G object to be safe

#

G.TGTMVelMult = 0.99

weary jungle
#

what would happen if no G?

#

it would probably crash when i startup because G doesnt exist in main menu i belive

gritty valley
hardy viper
#

i never understood the idea of that tbh

#

the only thing I pay attention to is that i use G.GAME for things id prefer to be saved along with the run

gritty valley
weary jungle
#

i cant just multiply by dt...... we are doomed

hardy viper
#

well yeah thats why you sign your globals and whatnot, just moving the majority of globals elsewhere doesnt do a whole lot (especially when everything uses the same location anyways, like G is just as common as the normal global table)

hardy viper
#

and the speed is just meant to be a constant

weary jungle
#

but im like messing with it

hardy viper
#

is dt nil or something? whats the issue

gritty valley
weary jungle
#

the scal;ing doesnt scale

hardy viper
weary jungle
#

as dt decreases, velMult decreases at a rate different than dt * velMult

hardy viper
#

and i dont get what youre saying in that second bit globals are already in a table no matter what

gritty valley
#

Look in general in programming it's just bad practice to have floating globals. It causes unpredictability. Tying them to an actual object is usually better practice, as it also allows that object to monitor the Globals as well.

#

Like the whole reason the G object is needed is so that logic that's passed through it can be properly dealt with

#

Though I mean it's more of a style thing in lua. But like since the codebase is already built like how it is, no need to go doing something different now.

weary jungle
#

draawing to help

weary jungle
#

i messed up my drawinf

#

forst image is dt small

#

ok maybe dt is just being a wierdo

gritty valley
#

Damn that shit is too complicated to think about. Hate working with dt in my own games I'm not tryna fuck with other games use of dt

weary jungle
#

in main menu dt * 2200 = 14, but in gameplay dt * 2200 = like 30

#

but i think im having same frames?

#

nope neverming

#

im getting 165 menu 60 gameplay

hardy viper
#

was thinking it might be because its adjusting for gamespeed

#

ah

#

makes sense

gritty valley
weary jungle
#

15 is good for 165 and i think 8 is good for 60

hardy viper
weary jungle
#

so my values are all wrong

weak depot
#

hey, it's saying "attempt to perform arithmetic on hand_chips (a nil value)" when a hand is played. i know what's wrong but have no idea how to fix it, any help? apologies if this is a 'bad' question, i'm a newbie-

SMODS.Blind {
    name = 'The Love',
    key = 'bs_lov',
    atlas = 'lovbossatl',
    dollars = 5,
    boss = { min = 1, max = 10 },
    loc_txt = {
        name = 'The Love',
        text = { 'All hands start',
                'at 20 Chips',}
    },
    discovered = true,
    boss_colour = HEX('E05E69'),
    modify_hand = function (self, cards, poker_hands, text, mult, hand_chips)
        hand_chips = 20
        return {mult, hand_chips, true}
    end
}
gritty valley
#

Gl tho

weary jungle
#

wait

hardy viper
#

being in a run is more demanding than being on the main menu

#

thus lower fps

weary jungle
#

is my whole thing wrong

#

as dt goes down... vel;Mult should go down????

weak depot
#

let's see

#

nada

weary jungle
#

oh my whole thing is invers

weary jungle
weak depot
weary jungle
#

i need a grapth

weak depot
#

yeah nothing happened, same error

hardy viper
weak depot
#

that was what i tried initially

hardy viper
#

any chance youre using talisman rn

weak depot
#

maybe?

hardy viper
#

add talisman compat regardless but still

gritty valley
#

Is the return supposed to be an array or a table

weak depot
#

i'll look and try to do it but

weary jungle
hardy viper
#

ah

#

youre right

weary jungle
#

:(

hardy viper
#

it should not be a table

weak depot
#

oopsie

weary jungle
#

its not dt * velMult

hardy viper
#

also array egg

#

i could never speak of such a thing

#

foreign concepts ..

weak depot
#

it tells me to return three things, though?

hardy viper
#

im glad lua is like that i hate data structures

hardy viper
#

return thing1, thing2, thing3

weary jungle
#

iom gonna hopw its linear and we will be fine

weak depot
#

huh

#

i may be dumb

hardy viper
#

as opposed to return {thing1, thing2, thing3}

weak depot
#

lemme try

#

OKAY IM DUMB thank u

hardy viper
#
local a = function()
 return {1, nil, 3}
end
print(a()) -- {1, 3}

local b = function()
 return 1, nil, 3
end
local a, b, c = b()
print(a) -- 1
print(b) -- nil
print(c) -- 3
weak depot
#

alrighty, yeah that was my bad thank you

hardy viper
#

thus hand_chips is nil because it looks for the second argument returned
im sure you understand but gotta be thorough

weak depot
#

it's been a long week 😅

#

thank you again :>

hardy viper
#

np

#

might have accidentally made the exact same mistake as you

#

when i wrote that example

#

lmao

weary jungle
#

ok its almost working as intended

#

oh im going negative

#

ok i think its working maybe im not sure

weak depot
#

thanks again for the help!!!

opaque tendon
#

Anyone knows how to make this more separate? is the pack area of the shop. also, if i point my mouse close to the packets they get highlighted waaay far out of their "texture"

gritty valley
#

How do I run code after SMODS has put my stuff into the P_CENTERS table?

hardy viper
gritty valley
#

Thx

hardy viper
#

for individual objects

#

should work with all gameobjects

#

alternatively hook SMODS.GameObject:inject_class if you want to do something immediately before or immediately after all centers are injected

hybrid iris
#

this is a weird incompatibility error

#

the relevant patches/code on my end,,

#

i dont, get how its not sending a table-

#

is should, theoretically work, right???

#

the weirdest thing is that it doesnt look like it would break cryptid at all

hybrid iris
#

from one of my playtesters

#

what the heck-

hot drift
#

rate my coding (I don't know what I'm doing)

gritty valley
#

What's the refrence for the CardArea that holds the played hand?

sterile cedar
#

Are there any mods to have the card in hand appear bigger ?

elder vapor
#

context.full_hand

tepid crow
sterile cedar
elder vapor
sterile cedar
#

oh my bad ! since I saw "hand" I tought it was for me x)

elder vapor
#

its ok lol

weary jungle
#

why is trhis happen

sterile cedar
tepid crow
#

Jen's almanac doesn't exist on github

#

(don't ask me why)

#

it's available in the cryptid discord

sterile cedar
#

oh indeed, its another jen

#

my bad

sterile cedar
tepid crow
#

it is the same jen, he just doesn't have it on github*

sterile cedar
#

oh okay, sorry for the confuson

gritty valley
tepid crow
#

none of that is your fault 😅

gritty valley
#

Where's the logic for the drawing cards into hand?

gritty valley
#

Nvm

elder vapor
#

does anyone here have documentation for blinds?

elder vapor
#

oh i'm so stupid LMAO

#

i didn't look at SMODS wiki before asking here 😭

#

thanks lol

tepid crow
#

😔

elder vapor
#

how fun

split thicket
#

Gotta love that screen

tepid sky
#

and yet, when i debug, it works flawlessly

rough furnace
nocturne garnet
wintry solar
#

Ewww put them at the end

nocturne garnet
#

awww

wintry solar
#

They seem interesting though

#

burning and cracked don’t seem very different to me

teal jackal
#

Trying to wrap my head around how the UI text elements work. If I want to write a piece of custom UI with a single highlighted word (like for example: a single {C:red}Red{} word amongst text) how do i get that formatting to be styled? I've got single-color strings rendering via G.UIT.T but it just prints out the formatting information.

crisp coral
#

if you aren't pulling from description localization, then use three G.UIT.T nodes back to back

teal jackal
#

Hmmm if i pass it through localization, can that handle arbitrarily formatted strings?

crisp coral
#

only via descriptions like Joker or Blind

teal jackal
#

ahhh gotcha

crisp coral
#

i think challenge descriptions and quips are also supported

#

but misc isn't

nocturne garnet
weak depot
#

do y'all know what i'm doing wrong here? it's throwing an error at the second if/then comparison that i'm trying to compare a table with a number, but i legitimately cannot find another way to get the chips for the hand

SMODS.Blind {
    name = 'The Feast',
    key = 'bs_fea',
    atlas = 'feabossatl',
    dollars = 5,
    boss = { min = 1, max = 10 },
    loc_txt = {
        name = 'The Feast',
        text = { '-2 Chips per',
                'Dollar you have',}
    },
    discovered = true,
    boss_colour = HEX('56845B'),
    modify_hand = function (self, cards, poker_hands, text, mult, hand_chips)
        if G.GAME.dollars > 0 then
            if hand_chips - G.GAME.dollars * 2 < 1 then
                return mult, 1, true
            else
                return mult, hand_chips - G.GAME.dollars * 2, true
            end
        end
    end
}
#

(the "if hand_chips - G.GAME.dollars * 2 < 1 then")

crisp coral
#

classic talisman moment

nocturne garnet
crisp coral
#

wrap G.GAME.dollars*2 and 1 in to_big

weak depot
#

apologies, it's been a late night

crisp coral
#

to_big(G.GAME.dollars * 2) and to_big(1) (yes)

#

its okay

weak depot
#

thank you!!!

crisp coral
#

and to prevent it from crashing without Talisman installed, add this to the start of your code:

to_big = to_big or function(x)
  return x
end

(iirc)

weak depot
#

works like a charm, thank you :>

nocturne garnet
proven lava
#

what would i use to check how many cards the player has in their full deck?

crisp coral
#

#G.playing_cards

proven lava
#

thank you!

stiff locust
limpid flint
#

Is it possible to disable certain blinds?

nocturne garnet
#

chat this might be my evilest invention yet

#

ok yeah this is too evil

#

im changing it to like 1 in 8

stiff locust
#

someone has to know about this 😭

crisp coral
#

that is probably one of the most vague crash errors

stiff locust
#

i've been told i'm "not accounting for joker retriggers" but I don't know how to account for them?

#

the joker causing this doesn't do anything that extravagant and simplifying or altering its code has not helped

zealous glen
#

Maybe eval.joker.repetition is a table

stiff locust
#

i don't know what that is

#

well I can infer what it might be

#

but

#

what does that have to do with the joker

#

maybe it's the pool flags?? that's the only idea I have but I need those flags

zealous glen
#

The error says the for limit isn’t a number

#

If it’s a table it’s not a number

stiff locust
#

but why is that only happening when playing a hand with banana tree

zealous glen
#

Probably because it runs that line of code

stiff locust
#

what line of code is it running

#

that is causing the crash

zealous glen
#

I imagine the one you showed

stiff locust
#

that's line 1445 in the game's lua files

#

this joker is in my mod's lua file and no line is marked

#

I don't understand why this joker is causing this

zealous glen
#

But the line uses a variable that comes from somewhere else

stiff locust
#

that's what is confusing me

zealous glen
#

Hence the source of the issue is whatever changes that variable, if that variable is incorrect

stiff locust
#

but I don't know what that variable is

#

why is it changing

zealous glen
#

It seems to be eval.jokers.repetitions

stiff locust
#

that variable

#

is not in banana tree

zealous glen
#

What does Banana Tree do

stiff locust
#

it gives +20 mult

#

after 6 unscored cards are played, it kills itself, removes gros michel from the joker pool and adds cavendish to the joker pool

#

that's it, that's all it does

zealous glen
#

Maybe there’s another Joker that’s the actual source of the issue

stiff locust
#

how would i figure out what joker it is

zealous glen
#

Which ones did you have in-game

zealous glen
stiff locust
#

this isn't during a hand where it'd be destroyed

#

the pool shouldn't be changing until it gets destroyed

#

the crash happens after the first hand is played, even if 0 unscored cards are played

stiff locust
#

i played the same hand (a single ace high card), seed, deck and stake on both

#

used the gros michel sleeve and splash deck for ease of testing

zealous glen
#

Maybe it’s Splash then?

stiff locust
#

it can't be

#

splash has one line of logic

zealous glen
#

It could be the deck of the deck was modified too