#💻・modding-dev

1 messages · Page 411 of 1

vale glen
#

:flip() on the card, prolly? And placing all that in an event would be good

daring fern
#

You need to use events also if you want an animation it won't count in scoring.

viral ember
#

oh

#

sorry, event?

vale glen
#

Axy wrote something for this before, lemme find

daring fern
vale glen
hasty mist
#

how do i check the ante number

viral ember
vale glen
#

Now or how

#

Ah

viral ember
#

how

daring fern
vale glen
#

Uh, will explain more on PC, will need some time to get there

#

Likeeee 15 min

viral ember
#

alr thanks

#

I really appreciate your help

rapid stag
#

so i want to make a spectral card that's like soul in that it's rare and can also appear in arcana packs, but i want it to be a tad more common than soul cards. cirThink where do i start with that?

daring fern
#

Also you would patch here I think:

rapid stag
sleek cliff
#

ok so I just started a new run and it worked

hasty mist
#

what happened here?

#

should i just use card instead of blind?

#

that seems wrong

rapid stag
# daring fern Also you would patch here I think:

i don't think i need to.

if i'm reading this right, i should just be able to specify the parameters soul_set = 'Tarot' alongside my hidden = true and soul_rate

so if i'm understanding properly, my consumable would look like

SMODS.Consumable({
  key = 'myKey',
  set = 'Spectral',
  atlas = 'myAtlas',
  pos = { x = blah, y = blah },
  soul_pos = { x = blah, y = blah },
  cost = 4,
  hidden = true,
  soul_set = 'Tarot',
  soul_rate = myRateHere
})```
#

obviously excluding my can_use and use functions

sleek cliff
#

Ok, so how do I remove the revived jokers from the table of destroyed jokers

daring fern
sleek cliff
#

where would I put that

daring fern
# sleek cliff where would I put that
local random_joker, index = pseudorandom_element(G.GAME.destroyed_jokers, pseudoseed("seed"))
local card = SMODS.add_card({key = random_joker.key})
for k, v in pairs(random_joker.ability) do
    card.ability[k] = v
end
table.remove(G.GAME.destroyed_jokers, index)
sleek cliff
#

thamnk

vale glen
# viral ember alr thanks
calculate = function(self, card, context)
  local valid_context = context.cardarea == G.play and context.repetition and not context.repetition_only
  if valid_context then
    BerryLegendaries.FlipApply(context.other_card, function(i,v)
      SMODS.change_base(v, 'Hearts')
    end, true)
  end
end
#

That's if you're using that code directly

#

If not, thennnn

#

continues typing

viral ember
#

lol

#

That's cool and I want to use it but how do I add BerryLegendaries?

vale glen
#
calculate = function(self, card, context)
  local valid_context = context.cardarea == G.play and context.repetition and not context.repetition_only
  if valid_context then
    G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.03, func = function(i,v)
      context.other_card:flip()
      return true
    end})

    G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.03, func = function(i,v)
      SMODS.change_base(context.other_card, 'Hearts')
      context.other_card:flip()
      return true
    end})
  end
end
viral ember
#

oh wow

#

that

#

is a lot

vale glen
#

Just try copy-pasting that in place of your calculate function

viral ember
vale glen
#

Alright, now we can check if other_card exists in the context you want

#

Or if we access it some other way

viral ember
#

?

vale glen
#

Looking at this atm

GitHub

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

viral ember
#

ah

vale glen
#

Specifically this one

#

What were you trying to do with this again?

viral ember
#

well I'm trying to make it so all played cards are given a random suit

#

then they're played

#

the true gambling of joker cards

vale glen
#

Oh

#

That's like, almost exactly what Axy does with one of their Jokers, except it's a random enhancement then

viral ember
#

oh lol

#

great minds think alike ig

#

my amazing joker art

#

(yes this is the final one, no I'm not changing it, yes I'm a professional pixel artist)

vale glen
#

The one for the relevant Joker

viral ember
#

stick 🔥

exotic imp
#

where could I find the base game backgrounds and other pieces for jokers?

viral ember
exotic imp
#

7zip

viral ember
#

open Balatro.exe with it

#

should be under resources

#

btw the animated background is a shader

exotic imp
#

which one?

viral ember
#

ectract to Balatro/

#

will make life easier

tall jewel
#

id extract it to a subfolder!!!

#

not the base path!

viral ember
#

is that not what it does

#

oop

#

I misread that yea

vale glen
# viral ember well I'm trying to make it so all played cards are given a random suit
calculate = function(self, card, context)
  local valid_context = context.before
  if valid_context then
    G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.03, func = function(i,v)
      for i,v in ipairs(context.scoring_hand) do
        v:flip()
      end
      return true
    end})

    G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.03, func = function(i,v)
      for i,v in ipairs(context.scoring_hand) do
        SMODS.change_base(v, pseudorandom_element({'Clubs', 'Diamonds', 'Hearts', 'Spades'}, pseudoseed('Astral_meow')))
        v:juice_up()
      end
      return true
    end})

    G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.03, func = function(i,v)
      for i,v in ipairs(context.scoring_hand) do
        v:flip()
      end
      return true
    end})
  end
end
#

Ah wait, gotta add a random suit

viral ember
#

oh dear lord

#

I understand what all of this does but jesus christ is that a wall

vale glen
#

Fortunately, you just need to press the copy button and paste it in the right spot WD_Kyawooo

viral ember
#

lol

#

thanks for the help

#

this will really help me later on

tall jewel
#

if you wanna talk about a wall..

vale glen
#

And this is like 30 lines of code, not much

viral ember
tall jewel
#

this is the code for the fishing minigame im working on

viral ember
#

oh dear lord

vale glen
tall jewel
viral ember
#

Astral_meow is crazy lmao

tall jewel
wooden nexus
#

Okay, so I'm looking at the smods ownership of Grim, Familiar, and incantation. Is there a way to check for a specific modded suit from the outcome and then reroll before the card is made (I'm trying to bypass an ARGS issue I'm having.

vale glen
#

Spend money to get bait, to get chance of card

tall jewel
#

the idea is tarot = bait, a joker allows you to fish, fish = econ

viral ember
#

I'll figure it out

#

trust

tall jewel
#

but also you'll lose money if you fail to catch a fish

#

(it'll be an actual minigame)

vale glen
#

Mmh, maybe the SMODS.change_base function wasn't written right, Axy didn't quite look at the docs

placid silo
upbeat bronze
#

how would i have a joker read the suit of a played card

hybrid shadow
sturdy compass
#

bump

vale glen
sturdy compass
#

(I'm gonna be bumping this for awhile lol)

hybrid shadow
#

wdym by this

vale glen
#

While we're at it, would also like to know how to make a Text object hoverable and clickable

sturdy compass
tall jewel
vale glen
#

?

#

What do you mean?

viral ember
#

am I the stupid one?

#

no

vale glen
#

Uh, is SMODS in your workspace for the IDE you're using

viral ember
#

you added an extra ) before .key

vale glen
#

oh, oops

viral ember
#

lol

hybrid shadow
sturdy compass
#

a classic blunder

vale glen
#

xD

sullen falcon
#

Can someone help me with brainstorm mod

viral ember
#

It works

vale glen
#

Does it like, make the suits change too

#

It should work with modded suits this way, if you don't want that we can change that too

sturdy compass
viral ember
#

i can't send the funny one piece it's so peak gif

#

I hate discord

sullen falcon
hybrid shadow
lavish lake
viral ember
vale glen
#

yay yay

hybrid shadow
viral ember
#

I never would've figured out the event crap

vale glen
#

Will have chimken nuggies later to celebrate

sullen falcon
#

Actually nvm I got it figured out

upbeat bronze
#

alright so what do i do from here

tall jewel
#

nuumgies

#

yippie

hasty mist
#

fuckkk i have to actually learn how to use pseudorandom

vale glen
# upbeat bronze

Line 27 should have #context.scoring_hand == card.ability.extra.size, since you need exactly two cards. Then set context.scoring_hand[1]'s suit to context.scoring_hand[0]'s suit, using SMODS.change_base().

lucid owl
#

when bp is used on this card, it works fine, however the status effect message appears twice over the original card, rather than once on bp and once and on the card. what's happening here?

normal crest
#

as by the time your event runs that value will have changed

lucid owl
normal crest
#

yep

#

before the first add_event

hasty mist
#

alright, I'm trying to randomize between a large list of actions to perform at context.end_of_round, how would i do that?

vale glen
normal crest
#

that will have the same effect sadly

#

blueprint_card is nil by the time the event runs

lucid owl
normal crest
#

np

viral ember
hasty mist
vale glen
#

Other... jokers?

normal crest
vale glen
#

Ohhh

viral ember
#

I have no idea how to change that so it's a feature not a mistake

normal crest
#

context.before is too late to change stuff like that

#

otherwise you can do context.after to provide more accurate feedback lol

vale glen
viral ember
#

like these

#

they use the old suits instead of the random ones

vale glen
vale glen
normal crest
#

if you do use that context you will probably have to move the changing of suits outside of the event still

#

but i could be wrong

hasty mist
#

could i just do something along the lines of "if pseudorandom = 1 then action 1" etc

viral ember
#

honestly I might make it turn all cards played into 1 random suit after they're played

orchid ginkgo
#

am, hi

upbeat bronze
#

uhhhhhhm

orchid ginkgo
#

im interested in learn how to do a mod

hybrid shadow
#

bump

orchid ginkgo
#

:)

upbeat bronze
#

man im havin trouble with something simple again

normal crest
orchid ginkgo
#

it's simple, i only want to change names of the jokers

upbeat bronze
#

the vanilla remade database is not helping cause everything related to changing suits is contained within a massive bracket of stuff i feel i dont need

vale glen
hybrid shadow
sullen falcon
#

how do i turn on debug menu in brainstorm mod

orchid ginkgo
#

any tip

#

?

normal crest
hybrid shadow
normal crest
#

it's the id of the rank

hybrid shadow
#

so like v:get_id() == 6 would return true if there was a 6 in hand?

normal crest
#

that's hwo to check for 6 yeah, where you're checking depends on what you pass to ipairs, here I put context.full_hand which refers to the played hand, including unscoring cards

hybrid shadow
normal crest
#

awesome

vale glen
# hasty mist how would i do that?

Use a local variable to store your pseudorandom calls as shown in lines 508 through 509, then use an if statement as shown in lines 514 and lower.

normal crest
#

yk using pseudoseed(os.time()) kinda defeats the point of pseudorandom numbers

#

at that point might as well use math.random

vale glen
#

The person requesting it wanted true random, but also wanted stuff like Rigged to work on it. So going through a commonly used function in Balatro would let others hook that function, while still preserving randomness while using DebugPlus or similar.

#

Elsewhere in the code Axy uses a string for the seed, since that needed to look random, but be deterministic per seed.

#

Oddities like this are usually because it better matches the card creator's vision, rather than whatever Axy was trying to do for cleanliness.

hasty mist
#

im trying to use seeded random without rigging working

upbeat bronze
#

man im art guy not code guy, who wants to code for me cause i aint gonna get frustrated over this

vale glen
#

No one if anyone would ever hook pseudorandom, but yeah

normal crest
#

fair enough, although I believe rigged modifies only the probabilities, as modifying the pseudorandom functions will most likely lead to side effects

upbeat bronze
#

i'll keep pumpin out art if someone can code it

vale glen
#

:o

#

Ah, so it only affects G.GAME.probabilities? Huh, never looked into it actually.

upbeat bronze
#

why pog

normal crest
#

don't take my word for it

#

but i believe that's the case

vale glen
#

Mmh, although Axy has enough on their plate to code and worry about, rather than look into Rigged atm

#

Although that's a good idea to look into later

#

Thank you!

hasty mist
upbeat bronze
viral ember
#

how would one "disable" a card like in the plant?

upbeat bronze
#

cant pay cuz im broke but it'd be a guaranteed popular mod a-la balatro goes kino

sturdy compass
upbeat bronze
#

thanks

sturdy compass
#

I would probably offer to help if I didn't have a lot on my plate rn

upbeat bronze
#

fair

vale glen
#

Axy is absolutely procrastinating on doing their schoolwork

sturdy compass
vale glen
#

weh hl_oliveweh

hasty mist
#

So i know what i want to do from a technical standpoint

#

I just don't understand how exactly to do it

hybrid shadow
vale glen
normal crest
hasty mist
upbeat bronze
hybrid shadow
normal crest
#

exactly

hasty mist
#

in the most simple sense, i want to simply randomize a value in my config at the end of each round from a set range (for example 1 to 10)

normal crest
#

and you want that value to be independent of the run's seed?

hasty mist
#

no i want it to tie into the run's seed, but not able to be riggable

normal crest
#

wouldn't that just be pseudorandom("something", 1, 10) then

vale glen
hybrid shadow
hasty mist
normal crest
normal crest
hasty mist
#

wdym

hybrid shadow
normal crest
#

and increment a different one for each rank

manic rune
hybrid shadow
normal crest
# hasty mist wdym

well you got your randomized value, you gotta do what you were planning to do with it, "randomize a value in my config" is what you said and i'm not sure what that means exactly

normal crest
manic rune
#

local has_rank_one = false, has_rank_two = false

#

wait

#

wrong roder a

hasty mist
manic rune
#

local has_rank_one, has_rank_two = false, false

hybrid shadow
normal crest
hasty mist
#

awesome ty!!

manic rune
#

if v:get_id() == 6 then
has_rank_one = true
end
if v:get_id() == 9 then
has_rank_two = true
end

#

smt like that

normal crest
#

hi bepis :3

manic rune
#

hi brock from pokemon

normal crest
#

close enough

#

i'll take it

keen totem
#

how do i get the player's settings?

manic rune
#

i think theres G.SETTINGS or smt

keen totem
#

like whether or not they have pixel art smoothing on or not to be specific

normal crest
#

and 1 when it's off

keen totem
normal crest
#

I just logged G.SETTINGS in the debugplus console

viral ember
#

World's best seal

normal crest
#

and scrolled thru until i found smt to do with graphics

hybrid shadow
#

do you need to end a for statement in a loop?

viral ember
#

weird overlay issue

hybrid shadow
viral ember
hasty mist
#

hm, what'd i do wrong here?

hybrid shadow
#

show it

hasty mist
#

wait

#

i think i see the issue

#

random is supposed to be set to a number

#

which happens in the same context as ease_discards

normal crest
#

ease_discard

#

not plural

hasty mist
#

alright now it seems to not be doing anything

#

actually

#

i think ik why

keen totem
hasty mist
#

uhm what

keen totem
vale glen
#

3

normal crest
hasty mist
#

it also seems to be temporary

#

but the hands/discards easing is intended to be permanent

normal crest
#

you'd have to modify G.GAME.round_resets.discards i believe

hybrid shadow
#

also this question may sound incredibly stupid but would there happen to be some variable that tracks when jokers with certain effects trigger? like jokers that trigger with chips, mult, xmult (xchips partly required but if not possible i might instead be able to just hook the trigger of other jokers (even if i dont entirely know how to do that))

normal crest
#

to apply a permanent change

hasty mist
#

hm

#

is that the same for hands?

viral ember
#

hey this modding thing is pretty easy when you have a lot of documentation

#

(I've been modding minecraft for 2 years)

normal crest
#

that will print that table

hasty mist
#

oh that seems useful

keen totem
#

i am having a fucking field day with these stupid ass jokers based on your games settings

hasty mist
#

hm, now it seems to be doing nothing

#

heres the code

vale glen
#

You can use help in the console for a list of commands, too

viral ember
#

I have a custom seal that I'm trying to apply to all played cards but it just crashes?

#

I can do it with 'Purple' and such but my custom one won't work

manic rune
hasty mist
vale glen
# viral ember

Wondering if it needs a mod prefix or similar, not sure how set_seal works

#

Like, it might want s_modprefix_useless_seal or something

normal crest
#

try starting a new round and it should set to that

hasty mist
#

ohh i see

#

what ??

vale glen
#

Prolly Talisman for that error

manic rune
#

table vs number

normal crest
hasty mist
#

it seems to be in balatro itself though, not my mod

viral ember
#

nope :/

vale glen
#

Talisman stores numbers as {mantissa, exponent}, while numbers are, well, a number.

hasty mist
#

ah i see

normal crest
#

idk, it's not balatro itself

#

it's talisman

hasty mist
#

so i shouldn't to_big the discards

vale glen
#

Yeh, lovely patches exist and can make it look like that

normal crest
viral ember
#

what

normal crest
#

modprefix_useless_seal

hybrid shadow
manic rune
#

i dont think G.GAME.round_resets.discards was initially a table

viral ember
#

what should modprefix be?

#

I don't see that in this

normal crest
#

whatever is in your mod's metadata as prefix

manic rune
#

so you turning it into a table mightve caused some checks in the base code to go wrong

viral ember
#

oh-

manic rune
viral ember
#

It worked!

manic rune
#

anyone got the hook tutorial in hand

hybrid shadow
#

the overall lua hooking tutorial is not entirely helpful when it comes to balatro modding

manic rune
#

it... kind of is for me

hybrid shadow
#

i might just be an idiot then

manic rune
#

im on phone rn so give me a moment

hasty mist
manic rune
#

what does the code look like now

hasty mist
normal crest
#

you're still calling to_big on the other value tho

manic rune
#

ye

normal crest
#

number + bignum = bignum

hasty mist
#

hm

#

i think i see

#

talisman is hard 😭

normal crest
#

yeah it's not pleasant to work with

#

I don't like talisman

hybrid shadow
#

im looking at the tutorial rn

hasty mist
#

i hope luajit2 becomes meta eventually so this wont be an issue

manic rune
# manic rune im on phone rn so give me a moment
local ceref = SMODS.calculate_effect(add the args here)

function SMODS.calculate_effect(add the args here)
   local ret = ceref(self, add the args here)
   if ret.xmult or ret.x_mult or ret.Xmult then
      --xmult?
   end 
   return ret
end
hasty mist
#

okay, it STILL gives the exact same crash, i dont understand

manic rune
#

this is assuming that SMODS.calculate_effect is used when calculate returns smt

normal crest
#

you will have to manually set it back using the console or start a new run

hasty mist
#

i do a new run every time i test

normal crest
#

Oh

manic rune
#

hm

hybrid shadow
normal crest
manic rune
#

can you check what the line the crash log is pointing to rq

manic rune
#

go to your vsc, do a search on function SMODS.calculate_effect and check for the args

#

im not a wizard so i cant remember them off the top of my head :3

normal crest
#

i gotchu

hasty mist
manic rune
#

u sure ur checking from lovely dumps?

manic rune
hasty mist
#

ah i am not

normal crest
#

you're setting it to a bignum there

hasty mist
#

in lovely dumps

normal crest
#

yep it's gotta be that first comparison with 0, it's likely the game sets discards_left to round_resets.discards when round ends

#

so discards_left would end up being a bignum too

hasty mist
#

how do i fix this

normal crest
manic rune
#

yeah, what srockw pointed out, card.ability.extra.mod is a table

hasty mist
#

so i should remove to_big from line 96 too?

#

that seems like itd trip talisman

manic rune
#

yes

#

it shouldnt

#

it will only cause comparisons with that and a bignum to crash, but as long as you keep that in mind it shouldnt matter

vale glen
#

Axy's never used to_big in functions before, despite having Talisman installed. Things just work. Wondering if Axy is somehow doing something wrong, despite the code working anyways.

hasty mist
#

i can not wait until luajit2 is more popular 😭

manic rune
#

it wont crash if no bignums are compared with a normal number

normal crest
#

it only really matters when you modify game values directly

#

if you don't do that then you're safe

manic rune
#

aka if its variable stuff in your jokers and such only, then ur good

umbral zodiac
#

anyone know what causes this issue when i try to open deck view? it happens regardless of if i have cryptid, entropy or vall-karri enabled

normal crest
#

and not all numbers are turned into bignums

#

who would want more than 1e308 discards i guess

vale glen
#

Ahh. Axy tries to use provided functions whenever possible, in case anyone wants to hook them, so modifying game values directly doesn't happen.

manic rune
#

true

hasty mist
#

alright, seems to work now, thanks yall

hybrid shadow
normal crest
umbral zodiac
hybrid shadow
#

THATS WHAT ARG MEANS???

normal crest
# hybrid shadow like so?

as for when you call that ref you want to pass the same arguments of the function, aka local ret = ceref(effect, scored_card, from_edition, pre_jokers)

#

no self needed here

sonic cedar
#

does anyone know where glass card code is stored?

#

not for recreation purposes this time, im trying to patch

manic rune
umbral zodiac
#

are you coding in the notes app of your phone or is it just the same screen size and font

manic rune
#

a lot of mods uhh take ownership of glass cards, so your patch will turn out to do nothing in certain cases:3

umbral zodiac
#

yes

hybrid shadow
# umbral zodiac yes

im using google docs on my phone because the actual files are on my steam deck and the built in keyboard on steam deck is... not good lol

umbral zodiac
#

😭

manic rune
#

wait

hasty mist
#

i tried coding in notepad when i first started 😭

hybrid shadow
manic rune
#

theres no need for self??

umbral zodiac
#

ok fr does anyone know what causes attempt to index field "T" (a nil value) when attempting to view the deck
its not caused by any of the major mods i have enabled and my brain is boiling right now im so damn tired

manic rune
#

what the hell, i used self

#

lemme double check on pc rq

vale glen
#

Depends if you're writing class:function or class.function in the hook

#

One of them wants a self as a first parameter, the other doesn't

#

Same functionality, just different syntax

manic rune
#

oh, yeah i see

#

i only use :, thats probably why

vale glen
#

Mmh, it's better to use : for organizational purposes

hybrid shadow
vale glen
#

T would have to be a transform, but dunno which card lost its transform table or how

umbral zodiac
#

so a card in my deck has no transform for Literally No Reason! im so tormented!

vale glen
#

And like, staring at the crash log doesn't help much, and you'd have to look at the lovely dump and trace the code there to debug

crisp coral
#

a card with no transform means it's a ghost card????? idk

steel surge
#

hello, i just started modding and im using vs code to make the mod. when i type SMODS, its underlined as red. how do i make it so that it knows steamodded syntax?

vale glen
#

Add the Steamodded folder to your IDE's workspace

normal crest
vale glen
#

Then it should recognize those values

crisp coral
#

add Steamodded into the workspace

normal crest
#

cus self would be taking the value of effect here

manic rune
#

a

normal crest
#

as long as you call SMODS.calculate_effect and not SMODS:calculate_effect

#

using the 2nd one would break a lot of things

manic rune
#

i usually hook like this, so yeah :p

umbral zodiac
manic rune
#

it would? 😭

normal crest
#

yeah cus it'd be the same as doing SMODS.calculate_effect(SMODS, effect, etc...)

#

which doesn't make sense

vale glen
umbral zodiac
#

i have absolutely no idea considering the fact that this error is only in common_events line 2561, and disabling all of the major content mods including my own does not fix it

#

im just gonna disable mods until i find out who's problem it actually is

manic rune
#

hii

vale glen
#

Can't really help you trace the code without like, a screenshare or similar. Directing you to the lovely dump would take too long over text. qpFlatQueen

manic rune
#

im so cooked

normal crest
#

which i doubt you've done considering you haven't had any issues

sonic cedar
manic rune
#

the other issue i had with hooking was that i called all the references hookTo

crisp coral
#

what the FUCK

manic rune
#

which surprisingly didnt collapse inward yet

sonic cedar
#

vine boom

manic rune
sonic cedar
manic rune
#

:3

sonic cedar
#

let me template this out rq

manic rune
umbral zodiac
sonic cedar
snow vale
#

how can i give a newly created card any values?

viral ember
#

is there a way to force a game loss?

steel surge
#

is there a place where i can see all valid C: color modifiers?

vale glen
sonic cedar
#

isn’t there a g.sta—

#

well whaddya know

vale glen
#

Axy's code also has this

viral ember
#

oh sick

#

thanks lol

gray void
#

Rickroll

viral ember
#

I MUST

gray void
#

i mean
Its stated in the code-

hybrid shadow
vale glen
sonic cedar
# manic rune

does the glass card itself trigger a destruction context that I can check for

vale glen
#

This is the full list of stuff the Joker does, although it's based off an incrementing trigger count rather than being entirely random.

manic rune
sonic cedar
#

everything’s coming up me catsmirk

manic rune
#

uh one sec, lemme check what it was

hybrid shadow
#

is checking for certain enhancements v:has_ability? also is glass and lucky cards just m_lucky and m_glass?

sonic cedar
#

(What I- ok)

vale glen
sturdy compass
viral ember
#

Pet Joker
eats (deletes) the rightmost joker each round.
if there is no joker it DIES. and you lose

#

always eternal

hybrid shadow
manic rune
#

context.glass_trigger

manic rune
sturdy compass
viral ember
#

not sure what to do for the Painted Joker

sonic cedar
#

paint it

manic rune
#

oh

hybrid shadow
viral ember
#

It's made with MS paint, hence the name

snow vale
viral ember
#

💀

#

I'm evil, not a monster.

hybrid shadow
viral ember
#

HHAHAHAHA

#

YES

hybrid shadow
#

if theres more than 3 jokers to the right of the cat it also dies

gray void
#

Stacks 4 of itself

snow vale
#

how can i add to this new card created any value?

sonic cedar
#

what

viral ember
#

Ok, every hand it eats the joker to the right and he gets 1 food point, every round he loses 1 food point. if he ever has more than 2 food points he DIES.
if he dies he kills your run

sturdy compass
#

Please do not the cat

snow vale
# sonic cedar what

like, i wanna do a consumeable that lets you store 1 joker in it (the joker destroys), but when i use the consumeable it gets destroyed so i have to create another one inside the code. How do i make so that newly created consumeable doesn't repeat the same code of use, using a variable or anything?

hybrid shadow
#

would this work as intended (check the scoring hand and see if there's cards that are glass or lucky, iterating one each time a card is glass or lucky)

sturdy compass
#

I keep forgetting no stickers why

sonic cedar
#

I had to hold in the laugh

snow vale
sonic cedar
snow vale
#

wdym?

sonic cedar
#

like is the issue that it saves the value of the joker stored despite being another copy

snow vale
#

i mean i want it to save it

sonic cedar
#

fat fuck

hybrid shadow
#

LMFAOOOO

#

the Very Hungry Caterpillar would like to have a word with this joker

sage crater
#

how do you get the number of cards played?
can you do #full_hand or something?

sonic cedar
hybrid shadow
vale glen
#

#context.scoring_hand?

#

Not sure what played means here

snow vale
viral ember
#

9/10th Joker?

#

💀

sage crater
snow vale
hybrid shadow
vale glen
#

You could look at Vanilla Remade in that case, if you know what joker you want to copy

viral ember
#

aw man

sage crater
gray void
sage crater
#

well it's not at all like square joker, but I'm sure I can glean something from it nonetheless

vale glen
#

Mindwave yay

gray void
#

Makes me having an idea of munched joker-

snow vale
#

wait huh

hybrid shadow
snow vale
#

i can drag my card anywhere 😭

vale glen
sonic cedar
#

bro just started cheating

hybrid shadow
#

bro forgot to set the area

vale glen
#

You could also just recreate the contents of add_card in your code, but that's up to you really

gray void
vale glen
sonic cedar
sturdy compass
hybrid shadow
hybrid shadow
vale glen
#

xD

sonic cedar
#

the bubble wrap pensiveclown_cc

snow vale
#

the thing is that he was a mod of the server

sonic cedar
#

If only I could swipe on my phone without accidentally tapping

vale glen
# hybrid shadow bump

The actual parameters into the has_enhancement function might be off, but the idea seems sound enough.

sonic cedar
#

might be missing a paean yeah

#

GDI

#

paean

hybrid shadow
#

paean

sonic cedar
#

p.a.r.a.m

hybrid shadow
sonic cedar
hybrid shadow
vale glen
#

paean

#

paellas

sonic cedar
vale glen
#

Which would be v in this case

sonic cedar
#

it’s (card, key)

hybrid shadow
#

like this?

sonic cedar
#

yeah

#

that text wrap is burning my retinas but yeah

hybrid shadow
#

im sorry its on google docs😭

vale glen
#

'm_lucky'

#

Forgot the closing quotation mark

hybrid shadow
#

thx

native zinc
#

change the font to a monospaced one

sonic cedar
#

or even

#

zoom out

hybrid shadow
#

IM ON MY PHONE

vale glen
#

Also you could just use FTP to just, download your code file from your computer and work on it on your phone

#

Then upload it back

native zinc
#

you can change font on phone

sonic cedar
vale glen
#

This has "uno comes free on your xbox" vibes

#

xD

hybrid shadow
#

is everyone this picky abt text or is it just yall three

sonic cedar
#

it does lmfao

native zinc
#

no it's just that you're making it unnecessarily hard for yourself

vale glen
#

Coders tend to be picky about their font choices and all that, since we read a lot xP

native zinc
#

arial ...

#

plus it's like

#

three clicks

hybrid shadow
sonic cedar
native zinc
#

i know you don't have a ce but google docs still has the ability to make code readable

hybrid shadow
#

do i need to manually color my text too for ease of reading for yall

sonic cedar
#

you would cry

vale glen
#

You can use three backticks, then the word Lua, then paste your code on a new line, then close with three backticks. That'd give color on Discord.

#

But also there are code editors for your phone

#

Could just use those A_HuTaoDerp

hybrid shadow
#

god this is the fucking worst lecture ive ever had in my life

vale glen
#

xD

hybrid shadow
vale glen
#

Time for the sequel, choice of syntax highlightingggg

#

holds up rainbow colored brackets

sonic cedar
#

😱

vale glen
hybrid shadow
#

would you guys hate me if i said i didnt even use vsc on my steam deck for my lua files

vale glen
#

Eh... anything works, at the end of the day. As long as you can compile your code and have it run on some machine, all's well

sonic cedar
#

do you use a ce

hybrid shadow
#

i use kate

vale glen
#

Anyways, gonna actually do schoolwork now

sonic cedar
#

oh yeah that one (never heard of it)

sonic cedar
hybrid shadow
sonic cedar
#

oh

hybrid shadow
#

like it came free with my Desktop Mode

#

it reads code... kind of

#

i dont get syntax errors or anything and i have to do debugging manually but imo thats probably the least impact using kate has had

sonic cedar
#

IT CAME FREE WITH YOUR DESKTOP MODE

hybrid shadow
#

like this looks okay enough to use for code

sage crater
#

does this work in lua?

hybrid shadow
hybrid shadow
native zinc
sage crater
native zinc
#

message = "+X"..total

sage crater
sage crater
viral ember
#

is it possible to show the joker's "food" in the description?

#

like this

sage crater
viral ember
#

Ah

#

Thanks

#

<3

sonic cedar
viral ember
#

/lh?

#

what does that mean

sage crater
viral ember
#

ohhhh

#

Sick it worked

#

thanks!

sage crater
#

lose the run?? damn

viral ember
#

Your cat dies, ofc you go with it

sage crater
#

seppuku after your pet dies? respectable

hybrid shadow
#

oh yeah are you able to do math with card variables inside a loop? (like card.ability.extra.mult = card.ability.extra.mult + (card.ability.extra.mult_gain * [whatever the variable is that's added by the loop]))

sonic cedar
viral ember
sonic cedar
#

hooray!!!

viral ember
hybrid shadow
viral ember
#

anything I should change before working on the functionality?

sonic cedar
#

The wording

viral ember
#

?

sonic cedar
#

When is “Every Round”

viral ember
#

Each Blind?

sonic cedar
#

When

#

Beginning or end

viral ember
#

Beginning

sonic cedar
#

so specify that 👍

#

“When Blind is selected”

viral ember
#

World's longest description lol

sonic cedar
#

aikoyori TLDR Joker

viral ember
#

?

sonic cedar
#

go look at the description in that

#

actually let me just

sage crater
hardy viper
viral ember
#

What the hell is that

hardy viper
#

it mentions jacks 3 times and i missed the 'c' on all of them

viral ember
#

I need to make one of those oh my god

#

WHAT IF I MAKE MINE ACTUALLY FUNCTION

#

YOU HAVE TO READ THROUGH IT LIKE 8 TIMES PER ROUND JUST FOR THE MULT

#

HAHAHA

#

NO EXPLANATION BOXES. NO HELP. PURE SUFFERING.

tall wharf
viral ember
#

I assumed from the name

hardy viper
#

its too lnog you cant see the mod badge youre missing out on free clout

tall wharf
#

it's still like that

viral ember
#

THERE'S JUST SOME CHINESE CHARACTERS FOR NO REASON HAHAHAHA

hardy viper
#

i mean now it doesnt fit on the screen does it

viral ember
hardy viper
# tall wharf

do these mean anything btw? i would imagine tehyd be like seeds or smth but then theyd be longer

hardy viper
#

ah

#

thanks google youre very helpful

viral ember
#

I need to not look at that so my mind isn't tainted

#

I need fresh ideas

#

not ones someone else made

tall wharf
#

you'll have to accept the fact that you can't be 100% original

viral ember
#

well yea

#

but 90% is good enough

hardy viper
#

have a random number generator give you a number 0-100 and thats how original youre gonna be

viral ember
#

lol

tall wharf
#

why limit yourselves

hardy viper
#

true -100 to 200

tall wharf
#

some of the jokers have different ability

sonic cedar
sonic cedar
sonic cedar
#

oh hold on ill just

#

"Consumes the Joker to the right of this card when a hand is played, gains +1 Food for each Joker consumed. When Blind is selected, eats 1 Food. You lose the run if it runs out of food."

tall wharf
viral ember
#

AWWW

#

I was going to make a chicken jockey one

#

dang it

sonic cedar
#

do it anyway catsmirk

viral ember
#

fine

#

hehe

sonic cedar
#

silly

#

might wanna fix your attentions though

#

they're called that for a reason

viral ember
#

this is a shitpost mod

#

respectfully, I'll work on the function first, then the form will come

sonic cedar
#

kk

#

just putting it out there

#

as for me it’s 3 am I need sleep

viral ember
#

lol

#

gn

#

thanks for the help :p

#

not sure why this is giving an error

sonic cedar
#

np ✨

sonic cedar
daring fern
viral ember
#

uh

#

how do I do that...? 😅

daring fern
viral ember
#

Chomped! or smthn

daring fern
hushed field
viral ember
last sentinel
#

If i wanted to have a deck that made specific vanilla Tarot cards more common, what would need to be in the lovely patch? would it just be:

_pool_size = _pool_size + 1```

in payload?
#

i'm pretty novice at patches

sage crater
#

is there a way to have a planet card level up a hand type by less than one level?
I'm trying to add a voucher that adds +50% planet card effectiveness

sage crater
#

neat!

viral ember
#

I don't think those are vouchers btw

last sentinel
#

oh shoot good catch thanks

#

dare i open the buffoon pack

#

i think i know whats gonna be in there

#

oh nvm it was jokers

#

the celestial pack however

gray void
#

And its all "joker" jokers

last sentinel
#

okay well the first part successfully adds my modded jokers to the joker pool 4x more often, but the second adds justice and tower in every other pool i guess?

viral ember
sage crater
viral ember
#

SMODS.Consumable

sage crater
#

oh, it's spelled correctly?

viral ember
#

not SMODS.consumeable

sage crater
#

someone told me it was spelled consumeable lol

red flower
#

not in that case

viral ember
#

maybe where they live

red flower
#

it's spelled that way everywhere else

viral ember
#

What should I do for this joker?

#

I had an idea but it didn't really work

last sentinel
#

it should make it so that Tower and Justice show up as vouchers i can show you how

sage crater
daring fern
sage crater
#

cheers

viral ember
#

Had a Joker idea

Math!

If you solve a random equation (result will be 1-5) and play that many cards, You get a X10 Mult

sage crater
#

how do I change the text for a new consumable type?

viral ember
#

Show the registering

gray void
viral ember
#

...

#

You do know, right?

gray void
#

I do not

#

Head empty

viral ember
#

that's what it used to do but it was pointless

sage crater
viral ember
#

what's the point of cards switching suits if when they come back they're switched again anyways

gray void
#

How about, "cards drawn from deck are from the bottom instead of top while having the joker"

viral ember
#

if anything that ruins combos

#

there are some cards that see the top card of the deck

#

now you can't grab it :<

gray void
#

Well its just an idea

#

but for cases like that, to troll

viral ember
#

well, all the others do that too so

#

one joker I added gives all played card a custom seal called "useless" which debuffs the card

gray void
viral ember
#

and the other...

gray void
#

Feels like a challenge run joker

viral ember
#

lol

#

I should do that actually

#

most of these cards are challenge jokers lol

gray void
#

Painted joker
"1 in 2 chance to retrigger each joker card except this or its copies"?

viral ember
#

ooh

#

retriggers ALL Jokers except Painted Jokers

#

how devious

gray void
#

Might be broken if just ALL

#

But yes

viral ember
#

this isn't supposed to be a "balanced mod"

#

this is a sh*t post

gray void
#

Then be my guest

viral ember
#

I mean, look at this thing

gray void
#

I made a joker to double its mult up to 1 trillion anyway

viral ember
#

does this scream "balanced"?

gray void
#

You forgot to give the limit

viral ember
#

... what limit...?

gray void
#

set the limit randomly each game start-

viral ember
#

what limit tho

gray void
viral ember
#

oh

#

it's secret

#

just like a real pet, you don't know how hungy they are

gray void
#

No i mean, set the limit to random-

viral ember
#

hm

#

maybe

gray void
#

and maybe, 1 in x chance to consume 2 food-

viral ember
#

I was thinking about that

sage crater
#

atm this consumable basically just copies deja vu, but it's crashing my game. Thoughts?

signal rose
#

whats the crash message for

sage crater
#

idk, it doesn't specify anything in the consumable.lua file, so I don't know what line it's having issues with

sage crater
#

ah, I fucking spelled it wrong in the card instantiation🤦‍♂️

viral ember
#

nice

signal rose
#

Trying to get the cards that appear on the startup screen to have a different back from red deck, changing G.GAME.selected_back has just done nothing, is there anywhere else that it would pull the card back from?
card.back is just "selected_back" which is whats confusing me on why changing G.GAME.selected_back does nothing

mainly just checking that im not being an absolute idiot and changing the wrong thing or if theres some other place it checks for the back

signal rose
#

i mean the way its making the card is this function repeated 200 times so honestly i could just input that

                args = args or {}
                local angle = math.random()*2*3.14
                local card_size = (args.scale or 1.5)*(math.random() + 1)
                local card_pos = args.card_pos or {
                    x = (18 + card_size)*math.sin(angle),
                    y = (18 + card_size)*math.cos(angle)
                }
                local card = Card(  card_pos.x + G.ROOM.T.w/2 - G.CARD_W*card_size/2,
                                    card_pos.y + G.ROOM.T.h/2 - G.CARD_H*card_size/2,
                                    card_size*G.CARD_W, card_size*G.CARD_H, pseudorandom_element(G.P_CARDS), G.P_CENTERS.c_base)
                if math.random() > 0.8 then card.sprite_facing = 'back'; card.facing = 'back' end
                card.no_shadow = true
                card.states.hover.can = false
                card.states.drag.can = false
                card.vortex = true and not args.no_vortex
                card.T.r = angle
                return card, card_pos
            end```
#

okay even if i put card.back = Back(G.P_CENTERS.b_green) into the code the back still shows as red

red flower
#

when it creates the card you can add {bypass_back = {x=0,y=0}} to change the position in the atlas

#

as the last argument

signal rose
#

what just instead of card.back = ... just put in {bypass_back = {x=0,y=0}}?

#

oh wait you mean as in local card = Card()

red flower
#

yes

signal rose
#

just woke up so took a second to process lol

pale holly
#
        if card.area and card.area == G.jokers then
            local other_joker
            for i = 1, #G.jokers.cards do
                if G.jokers.cards[i] == card and G.jokers.cards[i + 1] then
                    other_joker = G.jokers.cards[i + 1]
                end
            end
        end
            return { vars = { (G.GAME and G.GAME.probabilities.normal or 1), card.ability.extra.odds } }
    end,
--gotta re-add the function of before
    calculate = function(self, card, context)
        local other_joker
        for i = 1, #G.jokers.cards do
            if G.jokers.cards[i] == card and G.jokers.cards[i + 1] then
                other_joker = G.jokers.cards[i + 1]
            end
        end
        

    if other_joker then
        return SMODS.blueprint_effect(card, other_joker, context)
    end

    if other_joker and  pseudorandom('cymbal_dprinter') < G.GAME.probabilities.normal / card.ability.extra.odds  then
        local blue1 = SMODS.blueprint_effect(card, other_joker, context)
        local blue2 = SMODS.blueprint_effect(card, other_joker, context)
        
        -- Combine both effects if they return tables
        return {
            blue1,
            blue2
        }
    end
end
}```    

So i want my code to act like a normal blue print but with a 1/3 chance to retriger twice more but it only half works, for now it only act like a regular blueprint, i tried to use a local effect but it doesn't work, should i replace the local with something else ?
Also should use the prefix of my mod for 'pseudorandom' ? i used with and without but both does nothing so i assume the problem is more about trying to trigger it twice
signal rose
red flower
#

and even if it did the second return is formatted wrong

pale holly
#

Oh i see, so i should probably instead fuse both ways as a elseif then ?
like, if the 1/3 chance hit it'll trigger 3 times, otherwise only triger it once like a normal blueprint

red flower
#

yeah

pale holly
#

Also for the second return being formatted wrong, because of the double usage of the Smods blueprint or something ?

red flower
#

because returning a table of tables does nothing

pale holly
#

ah i see, i should then move out the local blue i made after the calculate to avoid that issue

#

i think i get it now, thanks,, and for the link too

red flower
#

keep in mind that is not merged into smods so you would need to copy the function as well

pale holly
#

Ah okay, gotta add this entire code as well, sure i'll think of this, thanks !

viral ember
#

Joker idea

All or nothing
Hands are set to 1 but you get + 5 hand size

#

1 in 10 chance to "win big" and get $3

gray void
#

or just mirror the burglar-

coral flume
#

Guys Im having some trouble with this joker being copied by blueprint specifically

#

it retriggers each card a number of times equal to its spot in the hand, first card retriggers once, second card retriggers twice etc

#

Brainstorm does this exact thing when copying it

#

but Blueprint goes first, doesnt increment the repetitions tally so falls behind by 1 trigger. First card none,second card once, thrid card twice

daring fern
# coral flume

What if instead of counting manually you just loop over the hand and get the position?

coral flume
#

I didnt know that was possible

last sentinel
#

is there a reason that this method of copying a played card doesn't trigger hologram?

last sentinel
#

or i suppose, is there a better method i should use that would trigger it

daring fern
last sentinel
#

fascinating, thanks!

daring fern
coral flume
daring fern
coral flume
#

any idea on how to make blueprint behave

daring fern
#

You would just iterate over context.scoring_hand instead.

coral flume
#

oh sick

molten musk
#

spectral not showing in my mod

#

i copied my seals code and changed stuff to show spectral but not working

#

the seals code work

#

found the issue

#

solved

coral flume
daring fern
coral flume
#

YAYYYYYYYYYYYYYYYYYYYYYYYY IT WORKs

#

thank you

#

amen

#

pogchamp

#

many thanks

#

This is a normal way to show appreciation

spice wadi
#

It's the same as yours, it calls a context
Although you'll need to change the code a bit as mine is set up for when probabilities fail
If you're gonna use it you should probably try and learn how each bit works so you can safely modify it

molten musk
#

any booster pack example i can see?

viral ember
#

I added something :D

thorn furnace
#

Is card:set_edition() supposed to work when the card already has an edition? It doesn't seem to be working

thorn furnace
#

I see

last sentinel
#

any ideas for making this not completely broken for econ?

viral ember
#

X2 Blind Size?

#

What does that do?

last sentinel
#

like required chips to defeat the blind

#

maybe thats improper wording

viral ember
#

oh

thorn furnace
#

i dont think its too bad
most of your income comes from interest or gold jokers anyway

gray void
last sentinel
#

yeah or maybe just a flat addition? kinda just a clone of burglar then

gray void
#

If handsize <6, double it
Else +5?

last sentinel
#

Also weirdly enough, when i have both burglar and that joker, mine always triggers before burglar regardless of joker order. Is that just how context.setting_blind works or am i missing something

#

just cause i think intuitively, the player would put burglar first to get +3 and then have the x2 hit, but it just doesn't happen like that

gray void
molten musk
#

so i wanna add booster packs, is it the same as seals and spectrals?

red flower
#

it is the same as in you need to use SMODS.Booster but the functions are different

molten musk
#

function u mean the code for booster like how they work, or u mean the code for adding them?

red flower
#

for how they work

#

i mean that they don't have use or calculate and stuff

molten musk
#

i'll worry about functionality later, for now how to add them in game
so this is spectral code
change consume type to booster?
and also consumable to booster too?

viral ember
#

How would I apply a shader to a joker?

red flower
last sentinel
#

much better

molten musk
#

yep, it worked

#

now gonna try doing the booster code

daring fern
last sentinel
#

you simply must score bones

#

good catch though I absolutely would've overlooked that

gray void
#

Or jokers that removes/destroys itself/others when its triggered-

last sentinel
#

maybe just "blind score or previous score whichever is greater" and then treat a bones score like a 0

gray void
red flower
#

what's the code

#

looks correct to me

#

did you restart the run before testing?

#

it doesn't do anything?

#

hmm did you try hard coding a 1 instead of using card.ability.extta

molten musk
#

whats kind?

red flower
#

yes

molten musk
red flower
#

it's more like a key for your booster type

#

it's weird tho

molten musk
#

i see

red flower
#

can i see the full joker definition

#

my guess is that config is not getting read