#💻・modding-dev

1 messages · Page 427 of 1

hasty mist
#

okay it doesnt crash now but it also doesnt work at all either

#

(print functions dont work either)

wintry solar
#

if context.before then if context.after

hasty mist
#

ah so thats why i had the end

wintry solar
#

honestly, correct indentation would be a god send for you

hasty mist
#

i am really bad at indentation since im still relatively new at lua 😭

daring fern
plush vault
#
Oops! The game crashed:
[SMODS destino_entropico "destino_entropico.lua"]:229: attempt to index global 'card' (a nil value)```

The call causing the crash: 

```lua
loc_txt = {
        name = 'Me petting my nuclear bomb',
        text = {
            "{X:mult,C:white}X.3{}",
            "{C:green}#1# іn #2#{} chance to {C:red,E:2}explode{}",
            "{s:0.7}{C:inactive}Me petting my nuclear bomb{}" -- < This one here D:
        }
    },

Variable Declarations:

 config = {
        extra = {
            Xmult = 3,
            odds = 3
        }
    },
    
    loc_vars = function(self,info_queue,center)
        return{
        G.GAME.probabilities.normal, -- #1
        card.ability.extra.odds -- #2 - This is line 229 from the Error
        }
    end,
pulsar furnace
#

is there a documentation or something?

hasty mist
#

lua extension has literally never actually helped me

daring fern
hasty mist
#

sumneko

#

that one, right?

daring fern
hasty mist
#

this is so emberassing 😭

#

im having so much trouble on what should be a completely simple joker

#

the code literally worked just fine before i tried to simplify it and now it refuses to work no matter what i do

wintry solar
# pulsar furnace is there a documentation or something?
# Money coupons
[[patches]]
[patches.pattern]
target = 'blind.lua'
match_indent = true
position = 'before'
pattern = '''
if G.GAME.modifiers.no_blind_reward and G.GAME.modifiers.no_blind_reward[self:get_type()] then self.dollars = 0 end 
'''
payload = '''
if G.GAME.ortalab.blind_rewards then self.dollars = self.dollars + G.GAME.ortalab.blind_rewards end
'''

# comment
[[patches]]
[patches.pattern]
target = 'functions/UI_definitions.lua'
match_indent = true
position = 'before'
pattern = '''
G.GAME.orbital_choices = G.GAME.orbital_choices or {}
'''
payload = '''
local dollars = blind_choice.config.dollars
if G.GAME.ortalab.blind_rewards then dollars = dollars + G.GAME.ortalab.blind_rewards end
'''
[[patches]]
[patches.pattern]
target = 'functions/UI_definitions.lua'
match_indent = true
position = 'at'
pattern = '''
{n=G.UIT.T, config={text = string.rep(localize("$"), blind_choice.config.dollars)..'+', scale = 0.35, colour = disabled and G.C.UI.TEXT_INACTIVE or G.C.MONEY, shadow = not disabled}}
'''
payload = '''
{n=G.UIT.T, config={text = dollars < 10 and string.rep(localize("$"), dollars)..'+' or localize("$")..dollars..'+', scale = 0.35, colour = disabled and G.C.UI.TEXT_INACTIVE or G.C.MONEY, shadow = not disabled}}
'''

these are the patches I use for a similar style of effect

hasty mist
#

this was the old code that i was using for this same joker (which worked just fine)

pulsar furnace
wintry solar
#

in a .toml file

pulsar furnace
#

oh ok

hasty mist
#

now as im trying to simplify it using a new function i made for scoremod (example) i just cant figure it out

hard flume
final jewel
#

So I tried using context.destroy_card but it doesn't work too

daring fern
#

context.destroy_card is not a function.

dawn ravine
#

hi i was interested in getting into modding does anyone have any good resources they liked using for learning. I found some but I want to see if anyone else has suggestions?

final jewel
primal robin
#

Why? Because I can ehehe

vale berry
hasty mist
#

okay i tried completely rewriting the code again and i am still getting the same error

plush vault
hasty mist
#

am i just stupid im so confused

daring fern
sonic cedar
#

where is the lua extension when you need it good lord thats a lot of end statements

hasty mist
#

the lua extension doesnt help me catsob

#

i might actually just be stupid

daring fern
sonic cedar
plush vault
#

For the if above of course 🍌

sonic cedar
wintry solar
#

the extra end is at the end btw

#

not the top one

hasty mist
wintry solar
#

it's just badly formatted

hasty mist
#

i do THINK i finally found the issue

plush vault
hasty mist
#

at least i hope so 😭

sonic cedar
hasty mist
#

okay i think i finally got it

#

i sincerely apologize to everyone for my severe incompetency 😭

sonic cedar
#

you need to apologize for that formatting

wild pine
#

Anyone know how to have a joker check if a blind is about to be beaten? It seems like even when the context is context.after the score still doesn't update in time despite having been calculated already on screen

hasty mist
wild pine
#

Like for a joker that does x if a hand doesn't beat a blind, but does y if it does beat a blind

plush vault
#

nil my beloved (please end my suffering)

hasty mist
#

horse race test spotted

wild pine
plush vault
#

Text call

loc_txt = {
        name = 'Me petting my nuclear bomb',
        text = {
            "{X:mult,C:white}X3{}",
            "{C:green}#1# іn #2#{} chance to {C:red,E:2}explode{}",
            "{s:0.7}{C:inactive}Me petting my nuclear bomb{}"
        }
    }

The other two things

config = {
        extra = {
            Xmult = 3,
            odds = 3
        }
    },
    
    loc_vars = function(self,info_queue,center)
        return{
        G.GAME.probabilities.normal, -- #1
        local_odds = {center.ability.extra.odds} -- #2
        }
    end,

If anyone can skim what's wrong do let me know ;-;

sonic cedar
#

Well what happens

spice wadi
#

its gotta be like vars = {var1, var2, etc}

#
loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.xmult, card.ability.extra.cost, card.ability.extra.triggers, card.ability.extra.reset_triggers, card.ability.extra.reset_triggers - card.ability.extra.triggers } }
    end,```

example
plush vault
#

When I did that it started giving me the "229: attempt to index global 'card' (a nil value)" Error ;n;

spice wadi
#

thats because you put center instead of card

plush vault
spice wadi
plush vault
#

vars = { card.ability.extra.xmult } -- I assume?

spice wadi
#

well youll need the other ones

#

like your cards odds and the probabilities var too

plush vault
#

Why did the cat eat the letter i

karmic sand
#

hungry

daring fern
karmic sand
#

I found out the crash my game was having was because I was trying to load the previously broken save rather than starting a new one (I am very smart :3)

daring fern
#

і instead of i

plush vault
plush vault
hasty mist
plush vault
#

Green joker but forced to high card

hasty mist
#

thats awesome

zinc violet
#

hello, a question, how could I replicate the randomness behavior of misprint but with chips?

spice wadi
#

look at the VanillaRemade repo to see how misprint works

zinc violet
#

Ok thanks

umbral zodiac
#

whats the g.c color for the default text color (in card descriptions)

maiden phoenix
umbral zodiac
paper zealot
hasty mist
clear ocean
umbral zodiac
hasty mist
#

before i knew of {} i would just do {c:black}

#

and it would work

zealous glen
paper zealot
hasty mist
#

oh my god LMAO

umbral zodiac
#

JOKER LORE DONE HAHA

#

except it doesnt turn back

#

but thats like a 90 second fix at most

hasty mist
#

entropic?

umbral zodiac
#

unfortunately not an entropy reference

#

just a really convinient crossover between the name of the mod and the writing i did

hasty mist
#

ah lmao

granite nymph
umbral zodiac
#

somethingcom what are you confused about

#

the thinker

granite nymph
#

im sorry for posting here really often but i am once again asking for help

granite nymph
#

this card is supposed to remove the played hand if it contains a seven

#

but instead it just removes every single card on screen

wintry solar
#

remove the bottom return

plush vault
daring fern
plush vault
#

Wait huh

#

I was using end_of_round for the context, as it is supposed to die only when changing round

Should I put it as an and?

clear ocean
#

Looking at the documentation, config are for local variables?

#
SMODS.Joker {
  key = 'RussianRoulette',
  loc_txt = {
    ['en-us'] = {
      name = 'Russian Roulette',
      -- x2 mult (maybe increase?)
      -- 1 in 6 chance of self destruct
      -- lowers the denominator each hand played (1 in 5... 1 in 4)
      -- resets the denominator to six when blind is selected
      text = { 'Example', 'text', 'on', 'five', 'lines'},
    }
  }
  atlas = 'joker',
  pos = {x = 0, y = 0},
  rarity = 1,
  eternal_compat = false,
}
plush vault
clear ocean
#

Interesting joker idea. Is the balance like the average of chip and multiplayer?

daring fern
clear ocean
#

Every card as in each Joker card?

daring fern
plush vault
#

Whats the input and output of pseudorandom()? pareidolia

hollow snow
clear ocean
hollow snow
#

you can omit min and max

daring fern
plush vault
hollow snow
#

yeah

plush vault
#

Thank you, I love you guys 😭 💖

cursive gazelle
clear ocean
#
SMODS.Joker {
  key = 'RussianRoulette',
  config = { extra = { odds = 6 } },
  calculate = function(self, card, context)
    
  end,
  loc_txt = {
    ['en-us'] = {
      name = 'Russian Roulette',
      -- x2 mult (maybe increase?)
      -- 1 in 6 chance of self destruct
      -- lowers the denominator each hand played (1 in 5... 1 in 4)
      -- resets the denominator to six when blind is selected
      text = { 'Example', 'text', 'on', 'five', 'lines'},
    }
  }
  atlas = 'joker',
  pos = {x = 0, y = 0},
  rarity = 1,
  eternal_compat = false
}
#

something like this?

daring fern
sonic cedar
clear ocean
#

yes and no. i have messed around with modding on other games and languages

final jewel
#

I might be anoying but I've tried for like 5 hours and I'm not able to destroy the card

daring fern
final jewel
daring fern
final jewel
#

the entire code ?

daring fern
final jewel
#

Mb Discrord didn't let me copy the entire code

clear ocean
#

you can use pastebin or github gists 😅

paper zealot
#

I think you should also be able to upload the .lua file

clear ocean
#

👍

#

like that

hushed field
#

Would anyone happen to know what determines how buttons are attached relative to a card? It moves it around depending on the cardarea for me, but I'm not sure how I'd account for that, yet

spice wadi
#

edit: solved my issue, i was an idiot, removed the code to hide how much of an idiot i am

im starting to learn UI, why doesnt the text show up ingame at all? also does anyone know the best place to learn UI from aside from the wiki (eg tutorials, guides, examples)
if anyone responds ping me please 🙏

hushed field
paper zealot
# final jewel

I'm not super knowledgeable about SMODS.Joker, but I think it adds your mod's prefix to the key automatically, so it should be key = 'blueChicken' instead of giga_blueChicken for all the key definitions

spice wadi
granite nymph
#

can you fix this or is it always like that

shell harness
#

you need to give it a name

paper zealot
modern kindle
zinc violet
#

uuuuuuuh

#

How can I fix this?

granite nymph
spice wadi
zinc violet
#

okkkk

#

is literally a gros michel but it gives you chips instead mult

spice wadi
daring fern
spice wadi
#

im assuming youre referring to under loc_txt?

daring fern
final jewel
spice wadi
#

whats a habit

#

i realise i worded that wrong 😭 i know what a habit is, whats your habit

granite nymph
zinc violet
wild escarp
#

How would I check if a played hand has unscoring cards?

spice wadi
granite nymph
#

the other mod is yahimod and that ones broken as well

#

and im not gonna look for the booster code in cryptid

zinc violet
#

okkk its working

#

thx

daring fern
wild escarp
#

That might work, I'll try it out.

spice wadi
wintry solar
granite nymph
wintry solar
#

I'm not sure how it works with loc txt but you should use a loc file regardless

granite nymph
#

im gonna be honest im never translating my mod

clear ocean
#

what would be a simpler word for denominator for the 1 in 6?

#

maybe odds?

wintry solar
#

looks like you can add group_name = "string" in loc txt

#

oops, fixed typo

final jewel
glad osprey
#

how would smods.load_file handle a png

clear ocean
#

hm. i think the text is getting too much should i keep like the resetting and lowering the odds hidden and the player discovers that for themselves?

granite nymph
hybrid shadow
spice wadi
turbid maple
#

No that's kind of an important information to withhold as a secret mechanic

glad osprey
spice wadi
#

It's on GitHub

hybrid shadow
granite nymph
#

it is not easy to find

clear ocean
turbid maple
#

Gains X0.5 Mult for each hand played
1 in 6 chance to self destruct instead
Odd increases with each hand played
and resets when Blind is selected

best I can do for a concise tooltip

clear ocean
#

thank you

granite nymph
#

first result is wiki, then three videos, then wiki, then hanging chad on the actual wiki, then an article about balatro, riff raff on the official wiki, then another artical

spice wadi
#

The majority of mod wiki pages have the GitHub link if it exists

granite nymph
#

nevermind

hybrid shadow
#

i think im finally done taking ownership of consumables

#

now its just jokers left

sonic cedar
#

local vif = Talisman and to_big and to_big(G.GAME.dollars):lte(0) or G.GAME.dollars <= to_big(0)
i have a variable here created for the purpose of creating a check for if you try to buy anything while you have less than or 0 dollars
however, it appears this is accidentally talisman dependent
how can i make it from dependent to compatible?

#

usage of variable pictured

clear ocean
#

@turbid maple what do you think

turbid maple
#

don't like "odds increase" coming before said odds

zinc violet
#

ou damn

clear ocean
zinc violet
#

but the sound is in the folder

clear ocean
#

maybe make sure the file format is .ogg?

zinc violet
#

is it because of the code?

zinc violet
#

is in ogg

hybrid shadow
clear ocean
spice wadi
hybrid shadow
zinc violet
#

because before I had presented something similar with another sound but I didn't have to register it.

clear ocean
zinc violet
#

ooooou

hybrid shadow
zinc violet
#

forget it, I think I saw the problem

subtle merlin
#

I fell asleep for a while but now that I'm awake bump

zinc violet
#

ok, now the other problem

#

in the code I modified everything that gave multi for chips (because it is literally a gros michel but it gives chips), and it still gives multi

#

so I wouldn't know what to move anymore

final monolith
#

Wraith (I think) would become discount soul

hybrid shadow
final monolith
#

Yes

daring fern
#

Would it be possible to get the most prominent colour on a joker?

final monolith
#

Wdym?

#

If you mean as in shader then probably not

daring fern
#

Like go over every pixel somehow and increment counts for every hex value.

hybrid shadow
#

sounds tedious

final monolith
#

Also in most cases the color would probably be ugly

sonic cedar
wheat jewel
#

I'm referencing the code for diet cola but how could i make a joker produce the skip tag of a selected blind?

final monolith
daring fern
final monolith
#

If you mean getting the colors with the most pixels with the exact color then it's like

hybrid shadow
final monolith
#

90% of the jokers is white right?

daring fern
#

But for the other jokers that are not mostly white.

final monolith
#

Either way it's probably not possible without directly getting the sprite in the code

hybrid shadow
#

random question but is there a way to use a custom color for localization text (and if so how would i do)

wheat jewel
sonic cedar
wind steppe
#

return a custom color in loc_vars

daring fern
sonic cedar
paper zealot
wheat jewel
sonic cedar
#

gimme a lil

wheat jewel
#

ok

chrome widget
paper zealot
hard flume
#

Hi

paper zealot
zinc violet
#

is there a way to "randomize" the text, so to speak?
for example, at the end of the round, the joker throws a text like gros michel, but I want it to say different and so on.

#

what I mean is that I have these and I would like them to rotate for each round won
I don't know if I'm getting into it.

spice wadi
brittle tide
#

is there a way to make a joker give you specific tarot cards?

brittle tide
#

could you tell me how?

daring fern
brittle tide
#

thank you

subtle merlin
#

TIL: holding "m" will relaunch the game (I think this is caused by debug plus)

hybrid shadow
#

bad argument to min here

clear ocean
#

just found out you can do this maybe this could help

#

thinking about it, there is a chance you can get go above six hands so i'm not sure if it would be a good idea

hallow slate
#

I really need something like this for funny text

clear ocean
#
            j_mod_multi_joker = {
                name = 'Name',
                text = {
                    {
                       'First line of box 1',
                       'Second line of box 1',
                    },
                    {
                       'First line of box 2',
                       'Second line of box 2',
                    }
        }
hallow slate
#

That and another badge I can use for categories

#

Can I make it toggleable via configs too?

hybrid shadow
#

ive been using multi box stuff for all my jokers that destroy themselves like gros michel

clear ocean
#

i don't know if that is possible feel free to find out

hybrid shadow
#

but maybe... there can be... three boxes...

clear ocean
hybrid shadow
#

holy shit

#

the third box

hallow slate
#

Oh yeah btw if anyone knows how to add stuff to the ui send me because I have this feature I need a ui thing for

clear ocean
#

not sure which word is the best. odds, probability

hallow slate
#

Temporary hands and discards.

hybrid shadow
obtuse silo
#

need help with this error

paper zealot
#

If you want more specific help, ask more specific questions

hallow slate
hybrid shadow
obtuse silo
#

yeah

hallow slate
#

Thx for sending

hybrid shadow
clear ocean
#

what do you think

#

the card art is a placeholder if it wasn't obvious

obtuse silo
hybrid shadow
clear ocean
#
SMODS.Joker {
  key = 'RussianRoulette',
  config = { extra = { Xmult = 0.5, Cmult = 1.00, odds = 6 } },
  loc_vars = function(self, info_queue, card)
        return { 
      vars = { card.ability.extra.Xmult, card.ability.extra.Cmult, (G.GAME.probabilities.normal or 1), card.ability.extra.odds } 
    }
    end,
  loc_txt = {
    ['en-us'] = {
      name = 'Russian Roulette',
      text = {
        {
          '{X:mult,C:white} X#1# {} Mult for every hand played',
          '{C:inactive}(Currently {X:mult,C:white} X#2#{C:inactive} Mult)',
        },
        {
          '{C:green}#3# in #4#{} chance this card self-',
          'destructs for every hand played'
        },
        {
          'Odds increase with each hand play',
          'Odds reset after {C:attention}Blind{} is selected'
        }
      },
      unlock = {
        'Have a Joker card self-destruct',
        'during a run to unlock this card.'
      },
    }
  },
  atlas = 'joker',
  pos = {x = 0, y = 0},
  rarity = 1,
  eternal_compat = false
}
clear ocean
#

i think it's time to actually make the code and find out how to make an unlock condition. looking at the wiki, is there something you have to program in for the blueprint and its cousins (brainstorm) to work or would it like run the calculate function again

hybrid shadow
obtuse silo
#

so how would i go about injecting the consumable into the pool after it's been initialised?
without the pools line going to the tiles page just causes the game to crash since it's trying to load a page with nothing on it

pulsar furnace
#

how do i know if my lovely injector code works

clear ocean
#

i believe joker main is the right choice

hybrid shadow
obtuse silo
paper zealot
obtuse silo
#

no wait
maybe i need to use the cards = {} like with any old ObjectType

hybrid shadow
clear ocean
#
  calculate = function(self, card, context)
    if context.setting_blind then
      return {
        -- reset effect?
        odds = 6
      }
    end,
    if context.joker_main then
            return {
          -- roll
          
          -- if true self destruct
          -- if false add to mult
          return {
            xmult = card.ability.extra.xmult
          }
            }
        end
  end,

hmm is there a random function

sonic cedar
obtuse silo
clear ocean
#

looked it up, pseudorandom

#

what are the perminators?

sonic cedar
obtuse silo
clear ocean
#

looking at the examples, it's something like thisif pseudorandom('gros_michel2') < G.GAME.probabilities.normal / card.ability.extra.odds then

#

what does the string do?

hybrid shadow
clear ocean
#

how do you make your own seed unless the pseudorandom can work with 1 to 6

sonic cedar
#

you just make one ngl

clear ocean
#

pseudorandom('russian') like this?

sonic cedar
#

whatever you make the string will be that seed

hybrid shadow
hybrid shadow
hybrid shadow
clear ocean
#
  calculate = function(self, card, context)
    if context.setting_blind then
      odds = 6
      return {
        message = 'Reroll!'
      }
    end,
    if context.joker_main then
      if pseudorandom('russian') < G.GAME.probabilities.normal / card.ability.extra.odds then
        -- destroy
        message = 'Fire!'
      else
        card.ability.extra.cmult = card.ability.extra.cmult + card.ability.extra.xmult
        return {
          cmult = card.ability.extra.cmult
          message = 'Safe!'
        }
      end
        end
obtuse silo
clear ocean
#

something like this?

#

oh yeah

#

forgot to add the card.ability.extra.odds += 1 and probably should add an overflow statement just to be safe

hybrid shadow
obtuse silo
#

ah
i won't bother you any further
thanks for helping, even if we didn't resolve it

clear ocean
#

you have to add all of this?

#

okay i think let's give this a try

hybrid shadow
clear ocean
#

i am looking at vanillaremade that's how i figure out how to properly do the mult gain

hybrid shadow
clear ocean
#

i'm looking at both the example and vanilla

subtle merlin
#

Quick question: how could I make a consumable take 2 slots instead of one?

hybrid shadow
clear ocean
#

oh yeah that makes sense

pulsar furnace
#

so i have a file .toml, i what to know if it needs some code in the main file to actually work or something

clear ocean
#

getting an error and trying to toubleshoot and honestly not sure what is causing it

obtuse silo
clear ocean
#

i removed the new code i put in just in case

hybrid shadow
clear ocean
#

the return for else

#

i'm looking at the code and checking to make sure which code block goes to what and i'm still not sure what causing this

hybrid shadow
#

your 'fire' message

clear ocean
#

isn't it supposed to be in one area? i was going to readd the self destruct animation after or before the fire message

hybrid shadow
brittle tide
#

Is there a way to get the suit of a card thats played? I tried this but it was just an error and I don't know the correct term.

clear ocean
#

don't tell me that's why the error was happening 💔

clear ocean
#

nope

#

same issue

karmic sand
#

If I wanted to make a consumable that had the effect of taking up 2 slots instead of 1 slot how would I go about doing that 2627_pepe_hmm

hybrid shadow
clear ocean
#

same error same line and everything

hybrid shadow
# clear ocean

what is line 34 here, include the line numbers on the left of your vsc

brittle tide
# hybrid shadow whats the goal here

I'm making a Joker that if you play a royal flush it will convert all cards remaining in hand to the same suit played then give you a death and hanged man. I've got the death and hanged man for playing a royal flush working and I'm trying to figure out how to set the cards remaining in hand.

clear ocean
#

apologies

hybrid shadow
clear ocean
#

oh

#

OH

hybrid shadow
clear ocean
#

looks like all is left is to add the self destruct and test

brittle tide
#

oh wait it might just be that

clear ocean
#

moment of truth

brittle tide
#

I was just taking from how I checked for an ace and a king with get

clear ocean
#

ok it works, but visually there are some issues

#

the 1 in 6 doesn't update as it looks like and the animation seems too quick

final monolith
hybrid shadow
#

i should take some screenshots of my fav jokers (the ones that work anyway

clear ocean
#

it should be 1 in 5 now but its not

sturdy compass
clear ocean
#

is there a reason why it does that?

#

maybe the 2x mult is enough to tell that it's safe?

hybrid shadow
clear ocean
#

sure

#

#4 is card.ability.extra.odds

hybrid shadow
# clear ocean

i mean youre not changing the odds because the odds start out as 6 and youre adding odds when odds are less than 6

clear ocean
#

so decrease the odds?

subtle merlin
clear ocean
#

and invert the if statement

clear ocean
#

is that a fair trade off is this is likely going to be a common/uncommon

violet gulch
#

Does this description make sense? Had it worded differently and wifey thought it was confusing, so looking for if its clear now.

last field
#

can anyone tell me what the sprite size is for a deck? I keep trying to find the size for it but when I open the game it doesnt show (I apologize if this isn't the right channel)

clear ocean
#

like this? @hybrid shadow

paper zealot
#

It's a pretty neat Joker idea actually

violet gulch
clear ocean
#

i thought i messed up the code since i spawn in one and i immeditally fired but here it is

#

i think i did it right

#

yeah i think it done

solid mesa
#

good night
im new to this and tried to do a scalating joker when the round ends
i use an if with context.end_of_round to do the sum function, but for some reason it triggers the sum like 800 times in a row.
jokers look for jokers that work similarly to see the code and fix this problem.
then i use context.game_end = false idk why or how this fix the problem

#

im trying to understand how it works, can anyone help me?

#

I know it could be something simple and annoying, I'm just starting out with this xd

clear ocean
sonic cedar
hybrid shadow
subtle merlin
#

Is there a way to check if a card in play was scored or not?

hybrid shadow
sturdy compass
unborn bay
#

no mxms_ prefix ,,,,

subtle merlin
sturdy compass
#

Yeah…

hybrid shadow
hybrid shadow
clear ocean
#

yeah i need to balance this because even if you have a hundred of them only a dozen of them remain

radiant oak
#

Hi I'm trying to make a joker that would retrigger the whole scoring steps from beginning to end for 5 times. Right now it does repeat 5 times but it never triggers held in hand effects. can anyone tell me why?

clear ocean
#

maybe do the final round or something or a whole number mult gain?

obtuse silo
sonic cedar
#

why is this just not triggering
like i even went up(? down?) to $-20 and it didnt trigger

obtuse silo
clear ocean
#

okay i'll keep it as it is but change it to a whole gain so there is an incentive to use it for a blind or two

subtle merlin
clear ocean
#

Animation wise is there any documentation on how to do that let me see if like a voucher opener is better

clear ocean
sonic cedar
clear ocean
#

only three left out of twenty 😭

#

second round and all are gone i would say that balancing is needed

#

maybe 1 in 12? final round? or you KEEP the card but something else happens like it resets the mult or the shot is 0.5 on your mult

wheat jewel
sturdy compass
#

Kinda, but again, I had to make a patch for skip_tag to even exist

wheat jewel
sonic cedar
sturdy compass
wheat jewel
#

Gotcha!

sturdy compass
#

basically

#

Do make it unique to your mod tho (something I am doing right now)

wheat jewel
#

Thank you so much!!!

obtuse silo
obtuse silo
wheat jewel
#

Like change the method name and/or aspects of the patch?

sturdy compass
# wheat jewel Unique??

Add something like your mod prefix in your variable. Here's my now revised version with my mod's prefix

wheat jewel
#

Got home now so imma put this to work on my jonkler

hybrid shadow
wheat jewel
#

thanks for the help!’

subtle merlin
violet gulch
hybrid shadow
#

the actual regular cardarea for scoring cards is G.play but for statements dont read that so you have to use context.scored_hand

subtle merlin
thorn furnace
#

How would I go about making a deck where you start with an eternal joker

sonic cedar
#

or no

hybrid shadow
obtuse silo
#

mmm
i see

sonic cedar
#

can you not use global variables in conditionals

wind steppe
#
local para_extra_slots = function(self)
    return self.ability.para_negativesticker or self.config.center_key == "j_para_cooledwater"
end
local para_card_removal_old = Card.remove_from_deck
local para_card_addition_old = Card.add_to_deck
Card.remove_from_deck = function(self, card, from_debuff)
     if para_extra_slots(self) and G.jokers ~= nil and self.area == G.jokers then
         G.jokers.config.card_limit = G.jokers.config.card_limit - 1
    end
    return para_card_removal_old(self, card, from_debuff)
end
Card.add_to_deck = function(self, card, from_debuff)
     if para_extra_slots(self) and G.jokers ~= nil and self.area == G.jokers then
         G.jokers.config.card_limit = G.jokers.config.card_limit + 1
    end
    return para_card_addition_old(self, card, from_debuff)
end

why do my hooks do nothing?

obtuse silo
wheat jewel
sturdy compass
#

This is in a Lua file, not a toml file

subtle merlin
#

Solved my issue, all i had to do was check if the card existed

wheat jewel
sturdy compass
#

You can either make a file called lovely.toml or make a folder called lovely and name the toml whatever you like inside of that folder

wheat jewel
sturdy compass
#

yes

wheat jewel
sturdy compass
#

I am coming to the realization you have never done patches before

wheat jewel
#

Yeah i'm sorry ;;

sturdy compass
#

You need to add this top the top of the file

wheat jewel
sturdy compass
#

We've all been here before

#

Patching in particular is a weird concept to get a hold of

wheat jewel
#

Gonna try to look at how patching lovely works to understand it next time i might need it

#

There’s definitely some documentation out there

sturdy compass
#

Think of it as a way to add to or edit vanilla code

sonic cedar
#

i am losing my mind

sturdy compass
#

Shop? What shop?

sonic cedar
#

it ate the whole damn storefront
just call the function???

daring fern
sturdy compass
#

What does Transform even do 😭

sonic cedar
sturdy compass
#

Ah

#

This guy

sonic cedar
#

yes

#

this guy

#

am i missing a context??? like

#

why

sturdy compass
#

When would G.GAME.dollars be <= than card.ability.extra.dollars

sonic cedar
#

dollars = 0

sturdy compass
#

Does the buying_card context take place after easing dollars?

sonic cedar
#

i have no idea 🌈

sturdy compass
#

LOL

sonic cedar
#

EREMEL I AM BEGGING YOU TO FINISH UPDATING THE WIKI PLEASE

#

please eremel i need this my joker kinda contextless

sturdy compass
sonic cedar
#

you gotta fw me

unborn bay
sonic cedar
#

im literally about to
-# oh my god i forgot how to make a context

subtle merlin
#

How can i make a consumable reduce the consumable slot size by 1?

daring fern
sturdy compass
#

You could potentially loophole it and do if to_big(G.GAME.dollars) - to_big(context.card.cost) <= to_big(card.ability.extra.dollars) then

sonic cedar
#

breeze why are you typing an essay

sturdy compass
sonic cedar
#

modding dev cannot be that serious

sonic cedar
sturdy compass
#

lmao

turbid maple
#

Does anyone have a good way to check the end of ante

daring fern
turbid maple
#

If you say check if you beat a boss blind I will throw Cryptid Ruby Stake ™️ in your face

sonic cedar
#

ow
right in the ruby stakes

turbid maple
sonic cedar
#

containing what

karmic sand
#

still tryna wrap my head around consumables

sturdy compass
paper zealot
# violet gulch To this end ^, is there a way to pass a variable to the joker text and have it ...

Not in that way. The "simplest" way might be to use a different {V:} for each entry:
https://github.com/Breezebuilder/Steamodded-Wiki/wiki/Text-Styling#variablecustom-text-colour-modifier-v
So define a table to contain the colours:

local rank_colours = {
  G.C.FILTER, -- A
  G.C.FILTER, -- 2
  G.C.FILTER, -- 3
  G.C.FILTER, -- 4
  G.C.FILTER, -- 5
  G.C.FILTER, -- 6
  G.C.FILTER, -- 7
  G.C.FILTER, -- 8
  G.C.FILTER  -- 9
}
``` Then wherever you're tracking the previously-played ranks, also do something to the effect of
```lua
rank_colours[5] = G.C.GREEN
``` when scoring a 5, for example.
Then use
```lua
"{V:7}7{} {V:8}8{} {V:9}9{}",
"{V:4}4{} {V:5}5{} {V:6}6{}",
"{V:2}2{} {V:3}3{}",
"{V:1}A{}"
``` for the styling part of the localization string, and finally set
```lua
vars.colours = rank_colours
``` in the `loc_vars` function.
It's a pretty dumb solution, but it would work without requiring any major patches or changes
turbid maple
sturdy compass
#

This might be close enough: NOODANCEBUTFAST

turbid maple
#

how's this not a thing in smods yet i'm sending a pr

clear ocean
# clear ocean
poll_question_text

balancing

victor_answer_votes

3

total_votes

3

victor_answer_id

1

victor_answer_text

keep it as is (common)

sturdy compass
#

That would be quite nice tbh

sonic cedar
#

gee i wonder

paper zealot
unborn bay
#

if youre talking multi phase boss blinds then you can do that with just a few hooks

violet gulch
unborn bay
#

for multiple blinds in an ante well yeah that requires a lovely patch

sturdy compass
unborn bay
#

oh that

sturdy compass
#

I tried

sonic cedar
#

custom context it is

turbid maple
#

so all this time campfire was getting fucked over by ruby stake?

#

😔

sturdy compass
#

Since I just marked all my global vars with the mxms prefix I should do that with my contexts too huh

sonic cedar
#

oh god should I do that

#

why did it take this long

sturdy compass
#

The horrors

sonic cedar
#

I have

#

So many

sturdy compass
#

What have we become

sonic cedar
turbid maple
#

you don't put your global things in a table?

sturdy compass
#

I think I have like
Two

#

Maybe three

sonic cedar
#

Im so glad I have Find and Replace

pulsar furnace
normal crest
#

joker display

sonic cedar
#

joker display

pulsar furnace
#

thanks

normal crest
#

yw

sonic cedar
#

Np

#

internet can we have a word

sonic cedar
modern kindle
#

at random i will start eating your files

sonic cedar
#

I think I’d actually cry

modern kindle
#

just do what i do and push everything to git whenever i do some form of significant change

#

then you can let everyone eat your files

#

what you thinkin for something

mild olive
#

is there a way to make my card destroy a random card from my deck when a round starts

sonic cedar
#

oh my god Chud

mild olive
#

erm

sonic cedar
#

probably

mild olive
#

great at least i know thats possible to do

modern kindle
#

why you calling for something twice

#

gosh

#

leave hte guy alone

violet gulch
#

Now to make the joker actually function 🤣

#

Thank you for the help Breeze, very much appreciated!

sonic cedar
sturdy compass
#

lmao

pulsar furnace
#

it doesn't work (I don't know why)

karmic sand
#

I'm working on logic for a consumable that when you have it takes up 2 slots so like lowers slot count by 1 but I can't quite work out how to detect when the card is in your consumables to execute the slot decrease

sonic cedar
pulsar furnace
hybrid shadow
pulsar furnace
sonic cedar
sonic cedar
#

Like so it’s just context.before

wheat jewel
#

Ok so i applied a patch to allow for creating a blind's skip tag but now it causes a crash now and i don't know how to fix it

pulsar furnace
subtle merlin
daring fern
wheat jewel
paper zealot
wheat jewel
#

like see if the skip_tag variable in my patch is not null?

faint yacht
#

nil, rather.

wheat jewel
#

don't know if this will work but i'll see

#

oh wait

#

this ain't java my bad

mild olive
wheat jewel
#

whoops

faint yacht
mild olive
#

whoops

wheat jewel
paper zealot
wild escarp
#

Is there a way to make a card cost $0? Setting cost to 0 leaves it as $1.

wheat jewel
wild escarp
violet gulch
#

Got it all working! Thanks again for the help tonight.

paper zealot
daring fern
violet gulch
wheat jewel
violet gulch
#

One thing I'd love to add now, is the shake like Loyalty card when its active. Gotta figure out how that part works.

paper zealot
pulsar furnace
#

how do i trigger an effect like in plasma deck when balancing chips?

wheat jewel
#

Dunno if it's something with my patch or not

violet gulch
wheat jewel
#

if anyone can help with my skip tag issue it'd help alot cuz i've been stuck on it for 2 hours now

turbid maple
wild escarp
#

How do I check the id of a joker in the shop?

sonic cedar
sturdy compass
#

Almost as good as if you remembered to return ret trollteeth

sonic cedar
#

gdi

sturdy compass
#

lol

sonic cedar
#

now we're good?

faint yacht
#

G.GAME.dollars is a number, though? Or a table, in case of Talisman...

sonic cedar
#

i cant send the patchy gif but i can feel it

#

we DO IT ALL again then

#

wait i dont

#

know what to put there instead

#

shoot

sturdy compass
#

lmao

paper zealot
#

Don't let your dreams be dreams - you can redefine numbers as functions if you want to. What's the worst that could happen?

sonic cedar
sturdy compass
#

truly

sturdy compass
# sonic cedar

This might be a descent into madness (average coding session)

sonic cedar
sonic cedar
sturdy compass
#

typo

sonic cedar
#

typo

sturdy compass
#

lol

#

now your rebuttal doesn't make sense tr

sonic cedar
#

it’s not descent if I never rose

sturdy compass
sonic cedar
#

WHAT IF

#

i put the transformation

#

in an event

#

and then the event

#

will call the other three events

#

is that even how events work

#

why is my overrides file red

#

oh right

#

surely if i do this
eat
and come back
everything will work

#

(do not get me started on context.after just not existing i guess (different can, different joker))

sturdy compass
sonic cedar
#

can you give me a mock-up my brain isn’t braining

normal crest
#

what is the goal

sonic cedar
normal crest
sonic cedar
#

buying_card takes place before ease dollars is the thing

#

as I found out from Astra

normal crest
#

hmmm

#

what about if G.GAME.dollars - context.card.cost <= card.ability.extra.dollars

sonic cedar
#

funny story

#

(It didnt work)

normal crest
#

What was the issue

sonic cedar
#

same as now

#

I can buy up to -20

#

But no matter how many things

#

Or what

#

The function won’t get called

normal crest
sturdy compass
#

So that way it delays the comparison til after the dollars get eased (I think)

sonic cedar
#

uh huh

sonic cedar
sage crater
#

what does to_big() do?

sonic cedar
#

But the conditional is different

sturdy compass
sonic cedar
sturdy compass
#

LMFAO

sage crater
#

fire responses

sonic cedar
#

LMAO

sturdy compass
#

brainwave dot gif

sonic cedar
#

mindwave even

sturdy compass
#

holy shid

sonic cedar
#

Heh

normal crest
#

you're defining a global variable func

#

not calling the function at all

sturdy compass
#

Holy shit 😭

normal crest
sonic cedar
#

almost sent a gif

#

I failed anyway

sturdy compass
normal crest
sonic cedar
#

me after pulling my hair out for an hour and a half seeing the solution is “global func dumbass”

sturdy compass
#

😭

#

Average coding session

normal crest
#

that's just life

sonic cedar
#

“You might just need to patch a custom context” GAAAAAAAAAH

sturdy compass
#

No thoughts behind those eyes

paper zealot
normal crest
#

I mean, just ignore them

modern kindle
paper zealot
plush vault
#

If I wanted to add to this:

calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play and then

that the card is a 7, would context.other_card.rank == 7 work for the logic check?

modern kindle
#

'just' is mentioned almost 30k times so hebetter block alot of mfs

shell harness
#

actually...

#

i think thats more than 30k

sturdy compass
normal crest
plush vault
#

Thank you :'>

modern kindle
sturdy compass
normal crest
#

I mean, I was already under the impression that they just blocked me

sturdy compass
#

lmfao

modern kindle
#

dont worry breeze has used the word just several times anyway...

sturdy compass
#

breeze blocks himself

modern kindle
#

thats what im sayin

sturdy compass
unborn bay
#

this means breeze has to block- goddammit

sturdy compass
#

be faster haya smh

modern kindle
#

always be slower

sonic cedar
normal crest
#

i vote line break at then

#

too wide

sonic cedar
#

this is my crashout

#

fuck the line break

normal crest
#

D:

sonic cedar
#

read it like an english paper

paper zealot
#

On second thoughts, this might not be the best policy

sturdy compass
#

LMFAOOOOOO

sonic cedar
#

what did i DO

modern kindle
paper zealot
normal crest
#

o7

modern kindle
#

godspeed

hybrid shadow
#

damn

sturdy compass
crisp coral
#

i mean you don't have to block everyone just because the block function exists

sonic cedar
sturdy compass
sonic cedar
#

my side suddenly hurts for no particular reason
what could i possibly be giggling at

sturdy compass
subtle merlin
#

May i present to you all: the hardest to code joker I've ever made

sturdy compass
#

Incredible

sonic cedar
plush vault
#

I'm doing the thing, I'm nesting else if statements , you guys proud of me? 💖

sonic cedar
#

no

sturdy compass
hybrid shadow
#

what if all of our jokers were if statements

plush vault
#

: ^(

sonic cedar
#

yayyy

normal crest
#

and make a PR to your mod

hybrid shadow
#

if SMODS then smods.joker =

sonic cedar
#

youre never gonna believe what im doing ri- NOOOOOOOOOOOO NOT A PR

sturdy compass
#

You can simply just
not pull the request

sonic cedar
normal crest
sonic cedar
normal crest
hybrid shadow
manic rune
#

waza

normal crest
#

hi bepis

hybrid shadow
normal crest
#

just put SMODS = nil in your mod

#

and priority = -99999999999

hybrid shadow
sonic cedar
subtle merlin
sonic cedar
hybrid shadow
tough temple
#

GHHGRRRR.. HIGH JOKER

sonic cedar
normal crest
#

so i'm still happy

sonic cedar
hybrid shadow
sonic cedar
#

now we are both happy

normal crest
#

yippie

hybrid shadow
#

if G.GAME then G.GAME = nil end

normal crest
#

crash on startup

hybrid shadow
#

the MOASE

tough temple
normal crest
#

yes that is valid code

#

bye bye g.game

hybrid shadow
#

the game just uninstalls itself

hybrid shadow
sonic cedar
#

if Game.start_run then SMODS.restart_game()

#

false hope

modern kindle
#

dude i didnt even consider an april fools update

subtle merlin
modern kindle
#

im gonna april fools lock everyones collection again

sonic cedar
#

always consider an april fools update

normal crest
#

while true do SMODS.restart_game() end

sonic cedar
#

that's so much worse

hybrid shadow
#

dude im laughing so fucking much rn at this fucking code

jagged kernel
#

does anyone know how to get the player's current money? I've tried using dollars but it just crashes

normal crest
#

G.GAME.dollars

jagged kernel
modern kindle
sonic cedar
#

where's the edition

modern kindle
#

thats the secret

hybrid shadow
modern kindle
sonic cedar
#

joker inside me

modern kindle
#

😛

gray quartz
#

what does urs do

hybrid shadow
plush vault
#

Will it run or will it crash, place your bets ladies, gentleman, gambler ladies and gambling addicts big_blind

sonic cedar
sturdy compass
modern kindle
plush vault
modern kindle
#

they are also doubled int he fridge normally, so in fridge cavendish is 6x mult, but once its rotted it -12x mult

gray quartz
sonic cedar
sturdy compass
#

hyperfixation chud joker reference

modern kindle
#

yea mine doubles and makes them never get used up

hybrid shadow
plush vault
gray quartz
#

urs is good tho

modern kindle
#

:D

sonic cedar
gray quartz
#

i got 2 editions in my mod im working on, one is charred and the other is quantum/superposition

modern kindle
hallow slate
sonic cedar
#

you rn

gray quartz
#

charred you cant get from the store, whenver you destroy a card it has a chance to survive being destroyed and become "charred"

modern kindle
hybrid shadow
modern kindle
#

dude i dont even care for his content much cause its just not my style but hes all over my feed

plush vault
#

I LOVE ROFFLE I LOVE ROFFLE I WANT A JOKER THAT OPENS A TAB TO ROFFLE'S CHANNEL WHEN I CLICK IT AAAAAAAAAAAAAAAA

modern kindle
#

i dont even watch balatro content

gray quartz
#

and quantum is diff for jokers and cards, jokers it creates a duplicate when you rearrange your jokers and on cards it either creates a copy to play or in your hand

gray quartz
#

and the online glsl editor

sonic cedar
#

guh

#

pocketing this

gray quartz
#

glsl editor is live shader editing tool and bookofshaders is literally everything you can do w shaders

#

super goated

modern kindle
#

yea its just learning a whole new thing is alot of effort

gray quartz
#

true

#

it took me like 2 weeks and the shaders on the cards are still buns 💔

wheat jewel
#

Trying to make a joker destroy face cards at random but it keeps destorying other cards and even destroys cards held in hand

hybrid shadow
#

the if statement needs a cardarea to work on only a specific area

wheat jewel
hybrid shadow
normal crest
wheat jewel
#

^^

normal crest
#

you don't need the for loop

hybrid shadow
wheat jewel
sonic cedar
#

when are they releasing free loop

hybrid shadow
tough temple
#

hey guys im using vscode

#

is there any extension to help with modding balatro

clear yoke
#

#

well

hybrid shadow
clear yoke
#

maybe

#

yeah

tough temple
#

saddening

#

i just started and i already know love2d and lua

modern kindle
#

i mean the lua extension is prob good to have

tough temple
#

just confused on how to get dropdowns

sonic cedar
wheat jewel
tough temple
normal crest
sonic cedar
#

smods has lsp definitions

tough temple
#

im tryna follow a tutorial to understand how its structured to begin with

normal crest
#

other_card doesn't exist here

tough temple
#

how would i get that

#

to work

sturdy compass
normal crest
#

not for destroying cards

wheat jewel
plush vault
#
[SMODS _ "src/loader.lua"]:571: [SMODS destino_entropico "destino_entropico.lua"]:353: unexpected symbol near '}'

Why it crash in line 353 ;-;

*Code attached for review... and Line 353 is quite literally the last line 🥲

weak gate
#

what are the measurements in UI code? e.g. minw = 1, that's equivelent to the width of 1... what?

normal crest
plush vault
#

if im nesting else if statements, do I need one at the end or one for each?

sturdy compass
#

waait you have literally no thens at the end of your conditionals

#

and it's elseif in lua, not else if

plush vault
#

Oh... I see

sonic cedar
# tough temple to work

Put this in a .luarc.json file

{
    "workspace.library": [
      "C:\\Users\\[PUT YOUR USER NAME HERE]\\AppData\\Roaming\\Balatro\\Mods\\Steamodded\\lsp_def\\folder",
    ],
    "diagnostics.disable": [
        "undefined-global",
        "lowercase-global",
        "need-check-nil",
        "duplicate-set-field",
        "inject-field",
        "undefined-field"
    ],
    "runtime.version": "LuaJIT",
    "type.weakUnionCheck": true,
    "type.weakNilCheck": true
}
subtle merlin
#

How would i get the amount of chips that will be scored this hand?

tough temple
#

where exactly is this luarc.json file? 🙏

sonic cedar
#

you make it

tough temple
#

inside my mod?

sonic cedar
#

ye

tough temple
#

aight

#

i assume i should replace steamodded with smods-main

sturdy compass
#

Make sure smods-main isn't nested

tough temple
#

it aint dont worry

#

i already solved that problem

#

after 30 minutes of being very stupid

sturdy compass
#

also renaming the folder simply 'smods' is pretty standard

tough temple
#

yeah aight

#

ok so i put a "luarc.json" file inside my mod

#

and pasted that code in with some adjustments

#

my user+smods-main

#

now what?

sonic cedar
#

".luarc" not "luarc"

tough temple
#

oh thought that was a typo

#

ok NOW what

sonic cedar
#

that should be it just refresh

tough temple
#

aight

#

i assume this means it works

sonic cedar
#

capital c

tough temple
#

ok 😢

sonic cedar
#

oml this made me look at mine no WONDER mine arent working im still linked to the og instead of my instance

sonic cedar
gray quartz
#

sigma

tough temple
#

thanks for the help

#

legend

manic rune
sonic cedar
#

hi!

sturdy compass
#

hello bepis