#đŸ’»ăƒ»modding-dev

1 messages · Page 132 of 1

sick sparrow
#

does it require PREFIX if the card is in another mod?
except that another mod is same author as the mod calling create_card()

dreamy thunder
#

wait how did you set the jokers rarity?

#

i need to check something

sick sparrow
dreamy thunder
#

no prefix or anything?

sick sparrow
#

at SMODS.Joker

dreamy thunder
#

no i know that

#

no prefix before rarity key?

sick sparrow
#

yes

dreamy thunder
#

oh well

#

i tried both

#

it worked

frosty dock
dreamy thunder
#

bro istg i tried that a lot

#

and it decided to work

#

today

#

😭** **

nocturne garnet
#

yippee

sick sparrow
#

we do a little trolling

dreamy thunder
#

where can i find all of the color code

#

s

sand oasis
random sleet
#

light mode npp.....

sand oasis
#

there's also C.attention which is the plain orange highlight, and C:inactive which is the light gray text such as the bottom line of the Castle joker

#

oh believe me i just found that, i'm normal and use dark lmao

dreamy thunder
#

thanks

#

this feels better with the custom rarity

wintry solar
#

the colours for loc txt aren't those ones

sand oasis
#

oh good god

wintry solar
#

these are for loc txt

#

the others are for UI elements

sand oasis
#

ahhhh

#

ohhh

primal robin
nocturne garnet
#

it should be uncommon btw...

#

if its when cavendish goes extinct

merry raven
#

I'm making a pair of opposite Consumables, and when one is used, the other is destroyed

for _, consumable in ipairs(G.consumeables.cards) do
            if consumable.config.key == "c_fm_voltaic_mote" then
                consumable:start_dissolve()
            end
        end

Unfortunately the other didn't get destroyed, is G.consumeables.cards the correct value to use for checking any existing consumables? Or maybe the config.key line doesn't have the right syntax?

zealous glen
#

I feel like it’s missing a center somewhere

merry raven
#

What will it do

zealous glen
#

It accesses the data for creating objects of its type

wintry solar
#

consumable.config.center.key

merry raven
#

Also I need edge cases that might tamper with Boss Blind-specific cards that has special mechanics required to progress the Blind

  • Cannot be discarded
  • Must return to hand after played
  • Cannot be cloned by Death, DNA or Cryptid
  • Cannot be destroyed by The Hanged Man, Incantation, Familiar or Immolate
dreamy thunder
#

1 in 1000

nocturne garnet
#

awwww

dreamy thunder
#

but i can change the color to uncommon

tall wharf
dry merlin
#

Does other_card work with an enhanced card? I'm trying to have a blueprint like effect with playing cards but it keeps crashing

runic pecan
#

Damn it Riv, it's [patches.regex] not [patch.regex].
Anyway my patch finally worked.

sick sparrow
#

how to add use button on joker?

sick sparrow
violet void
#

asking for opinions, is this an ok legendary?

-# considering there's the other one

#

Ill remove the first hand of round condition maybe

nocturne garnet
tall wharf
primal robin
tall wharf
sick sparrow
tall wharf
#

you tell it to

#

search for logic n stuff and then patch it

#

also ngl putting face on stone card kinda defeats the purpose of them

primal robin
#

Each card have 3 parts: front, center, back. Front - it's rank and suit, Center - enhancement, Back - deck's back.
You choose which card part you need and change it

tall wharf
#

honestly

#

just make another enhancement

sick sparrow
tall wharf
#

still

dreamy thunder
#

yeah this checks out

tall wharf
#

i made it so you can actually upgrade your cards

#

and not have it affect the deck

sick sparrow
#

how to add use button on joker?

zealous glen
tall wharf
zealous glen
#

The faceless part

tall wharf
zealous glen
#

Not necessarily as an Enhancement, but maybe as one

tall wharf
#

yeah but you wouldn't be able to upgrade the cards

zealous glen
#

I don’t see why not

tall wharf
#

i did try tinkering a bit

zealous glen
tall wharf
#

this was the alternate implementation i tried

#

didn't work very well

zealous glen
#

I can’t read right now

#

Aren’t letters separate from Enhancements?

tall wharf
#

yes

zealous glen
#

Then you could have the deck start with a Letter and an Enhancement

#

Then when applying another Enhancement it doesn’t override the letter

#

But it gives back the face

tall wharf
#

it won't override the letter

#

letters are separate from everything

zealous glen
#

I’m just giving an example where you can upgrade the cards

tall wharf
#

it's in its own thing

zealous glen
#

Since you said you couldn’t make it work

tall wharf
zealous glen
#

I disagree but ok

tall wharf
#

like

zealous glen
#

Then you probably do need a patch

tall wharf
#

i already patched a bunch

zealous glen
#

It’s fine. I was just thinking you didn’t need to

#

But if you don’t want faces to return

sick sparrow
#

how to add use button on joker?

tall wharf
#

i think it was too op with Dracula

#

or

#

vampire

#

I'm dumb

zealous glen
mental kiln
#

how do you spawn a specific card for debugging?

zealous glen
#

Debug mode

tall wharf
#

yeah but the deck has 100 cards

#

it's gonna give a bunch of xmult

zealous glen
#

Once

#

I mean it’s not like Midas Mask + Dracula where you can keep building up

tall wharf
#

anyway since i already made it not enhancement

zealous glen
#

Agreed

sick sparrow
#

rare joker front, vampired = still rare joker front

#

because it's not a enhancement

tall wharf
#

i just want it to feel a bit like base game where you can upgrade stuff and the fact stays the same

#

in this case the letter stays the same

zealous glen
#

I thought the letter stayed the same even if faces came back

sick sparrow
#

how to add use button on joker?

tall wharf
runic pecan
#

đŸ€”

tall wharf
#

i felt like i have had this problem a while ago

#

show code

runic pecan
#

Which part?

frosty dock
#

whatever this is

runic pecan
frosty dock
#

rarity needs to have your mod prefix

tall wharf
runic pecan
#

I also change the rarity code to this now:

sick sparrow
#

for some reason my mod's config dosen't seem to load

#

also the card change (like SMODS.Joker:take_ownership()) takes higher priority but in the hooked code lower priority takes precedence of execution (overwrites higher priority mod's values)

frosty dock
#

doesn't really matter though, steamodded recognizes that the prefix is already there and won't add it again

sick sparrow
#

it's like lowest priority mods having highest precedence of execution

frosty dock
#

lowest priority value gets run first

sick sparrow
#

and vice versa (highest priority mods having lowest precedence of execution)

sick sparrow
frosty dock
#

doesn't really matter what you're doing

#

mods have their main files loaded and executed in order of lowest to highest priority value

runic pecan
sick sparrow
frosty dock
runic pecan
frosty dock
#

you need to either have a loc_txt or define the label in a localization file...?

#

if you don't give it text to display it'll ERROR

long sun
#

Introspection! :D

bold sleet
tacit gyro
#

do you guys think aseprite is good for making jokers?

bold sleet
#

Aseprite is good for making pixelart.

#

Balatro uses pixelart for its well... art...

frosty dock
#

we have docs a reason 🙄

long sun
#

i personally use GIMP, bur Aseprite looks fine :D

sick sparrow
# frosty dock doesn't really matter what you're doing

some mod with lower priority

local hooke = Card.set_edition
function Card:set_edition(edition, immediate, silent, ...)
    if self.gerio_forced_edition then
        edition = tabledeepcopy(self.gerio_forced_edition)
        setmetatable(edition,{
            __newindex = function() end
        })
    end
    hooke(self, edition, immediate, silent, ...)
end
```cryptid with higher priority
```lua
local se = Card.set_edition
function Card:set_edition(edition, y, z, force)
    if not force then
        return se(self, (not self.no_forced_edition and G.GAME.modifiers.cry_force_edition) and { [G.GAME.modifiers.cry_force_edition] = true } or edition, y, z)
    end
    return se(self, edition, y, z)
end
```because the lower priority code takes later, it has advantage of overwriting higher priority mod's values
it's like fighting for lower priority so the value stays same
zealous glen
runic pecan
zealous glen
#

I wanted to make some HoloLive Jokers

#

I have 0 v_v

tacit gyro
# bold sleet Yes.

Well I guess I should say if you want to make an atlas? Cause I'm not sure how big the canvas would need to be or does it not matter.

tall wharf
#

still love how these are like this

bold sleet
#

For atlases I just take the size of one card and make multiply that number by 10.

#

I can now fit like 100 cards in one atlas.

tacit gyro
runic pecan
#

Now it worked.

#

Would it look too close to Common?

nocturne garnet
runic pecan
crisp coral
sick sparrow
nocturne garnet
long sun
#

kid named playing cards:

nocturne garnet
long sun
#

(/ref)

tall wharf
#

i don't know what I'm cooking

runic pecan
#

I don't think Gigi Murin is really an underage...
But her taste, on the other hand...

crisp coral
#

holy shit is that x3 mult

long sun
#

rabble distribution :D

tall wharf
#

i think it's +15

nocturne garnet
crisp coral
#

FUCK

nocturne garnet
#

1 in 6 chance to go extinct

crisp coral
#

spoiled again

long sun
#

isn't the Gros Michel extinct?

#

also that banana is a Cavendish

nocturne garnet
sick sparrow
tall wharf
#

it's actually gros michel guys it's only +15 mult

nocturne garnet
sick sparrow
crisp coral
#

it's called a mino not a monomino

tall wharf
#

i was like i haven't eaten a banana in a while

sick sparrow
crisp coral
#

you sound like -15 mult

tall wharf
#

😭

#

oops I'm stupid should probably not ping reply

crisp coral
#

You.

merry raven
#

You broke the law

sick sparrow
merry raven
#

Anywho hi Myst I got a couple of questions

  • Where in the source code is the Blind chip's texture rendered and where does it pull textures
  • Also where in the source code is the Blind's chip dissolving animation located

I'm working on a custom blind that changes the Blind's icon as a mechanic

runic pecan
sick sparrow
#

guideline color set are different colors

runic pecan
#

Then why is your T blue instead of purple

sick sparrow
#

i used sega specifically

tall wharf
tall wharf
#

ALSO pretty sure Tetris colours are copyrighted

runic pecan
#

wait, sega has a different set?

tall wharf
#

at least the official colours

#

trademarked

#

not the colours

#

the specific shape with specific colours

zealous glen
runic pecan
#

I'm too used to Nintendo set

zealous glen
#

(or DM)

#

But the dissolve is the same as everything else

#

It’s a Shader

merry raven
#

I see

long sun
merry raven
#

What about the textures rendering and swapping textures

zealous glen
crisp coral
merry raven
#

Making a custom blind that has a unique mechanic of changing it blind icon to a different design mid-blind

zealous glen
crisp coral
#

animatedsprite extends sprite so you can do set_sprite_pos and then reset

zealous glen
#

Because you could use L Corp’s Multiblind

merry raven
#

Basically you need to perform a specific action based on the colour of the Blind icon

long sun
#

hey, a little feedback on some joker text?

zealous glen
crisp coral
sick sparrow
#

i'm making monominos auto-merge if there's 4 monominos here (cuz i didn't found how to add use button on joker)

long sun
#

Introspection (Uncommon): When Blind is selected, creates a Tarot card and changes type to Planets (Must have room)
after creating a Tarot:
Introspection (Uncommon): When Blind is selected, creates a Planet card and changes type to Tarots (Must have room)

zealous glen
crisp coral
#

that sounds alright

crisp coral
#

when blind is selected happens before when round starts

long sun
#

i'm gonna go with the more common wording that Burglar, eg., uses

zealous glen
#

I might consider a small change like “then swap”

zealous glen
#

I don’t think there are different contexts

long sun
#

they aren't iirc

zealous glen
#

I remember reading the text and the code

long sun
#

one happens before the cards are dealt, the other happens after

zealous glen
#

And comparing it

crisp coral
#

well only Certificate uses When round begins

long sun
#

ya

#

and it creates its card after your hand is dealt

merry raven
long sun
#

but cards like Cartomancer create their Tarots while the hand is being dealt

crisp coral
zealous glen
long sun
#

how so?

zealous glen
#

For effects that apply after a hand is drawn

tall wharf
#

why do i keep doing this

nocturne garnet
long sun
#

okay but this isn't When round starts

#

it's When Blind is selected

#

and it'll trigger when Cartomancer would

zealous glen
#

I wasn’t talking about your effect

#

Just vanilla text

long sun
#

ah ya

candid epoch
#

hey guys, do think mod like this would be good? (i only got concept so far)

Red Potion - Add permanent +2 Multi to 3 selected cards
Blue Potion - Add permanent +12 Chips to 3 selected cards
Purple Potion - Add permanent +1 Multi and +6 Chips to 3 selected cards
Green Potion - Add a copy of selected card to hand
Yellow Potion - Gain 1$ for each potion used this run
Pink Potion - Add permanent x0.25 Multi to 2 selected cards
White Potion - Add Green Seal to one selected card
Black Potion - Destroy 1 card and gain 2$

/// Vouchers ///
Potion Merchant - Potion cards appear 2X more frequently in the shop
Potion Crafter - Create a Potion when Blind is selected

/// Jokers ///
Blue Vials (common) - +5 Chips per Potion used this run (Currently +0)
Red Vials(common) - +1 Mult per Potion used this run (Currently +0)
White Vials (uncommon) - Create a Potion when Blind is selected (Must have room)

/// Deck ///
PotionCraft Deck
Start the run with Potion Merchant and Potion Crafter vouchers.```
long sun
#

there is some inconsistency

#

like, with Riff-raff

nocturne garnet
zealous glen
#

@long sun I think for yours I’d just consider using “swap” instead of change, and see if you can make the “swap” text shorter

#

Hearthstone gets away without specifying what it swaps to, maybe that’s possible here

crisp coral
zealous glen
#

Maybe not

long sun
#

i plan to add Zodiac cards into the mix, so swap wouldn't work for the three types

#

because that implies two states

zealous glen
long sun
#

(but i didn't say that, so)

long sun
zealous glen
#

ya

#

But you can opt to the template you want

#

And let the player play to find out

dreamy thunder
#

how do i add stuff to my custom booster packs pool?

long sun
#

Balatro has a template, actually.

zealous glen
#

An inconsistent one, and one I disagree with

#

But it does

long sun
#

no but it uses changes:
Earn $5 for each discarded [rank], rank changes every round

candid epoch
long sun
#

Each played card with [suit] gives X1.5 Mult when scored, suit changes at end of round

#

Earn $4 if poker hand is a [Poker Hand], poker hand changes at end of round

#

so

long sun
#

well ya but this is consistent

zealous glen
#

But I’m not commenting on this specific wording

#

Just in general

long sun
#

it uses the word changes to denote changing the ability

candid epoch
zealous glen
#

I gave an opinion

long sun
#

you did, ya, that's not a problem

candid epoch
#

well, i rename it to potion without the craft

long sun
#

i'm just explaining why i want to stick to the word changing

candid epoch
#

bro wtf-

#

GET OUT

zealous glen
#

@grand violet

long sun
#

beat me to it ^^

zealous glen
#

<@&1133519078540185692>

zealous glen
#

Although I might use “change” myself if I stopped to write it while looking at the game

long sun
#

why swap instead, though?

#

i wanna be consistent with the game

zealous glen
#

At the moment, for two options, “swap” reads more natural

#

I also like it as it sounds less vague

long sun
#

i mean, they're synonyms

zealous glen
#

There are no true synonyms

runic pecan
#

Hmmm...
SMODS.Atlas document doesn't include Legendary cases I'm looking for...

zealous glen
#

Words carry different connotations

runic pecan
#

Like the effect vanilla has on Perkeo and other Leg. jokers

#

Combining a background and a secondary layer

#

Haven't found it in Cryptid code yet...

zealous glen
#

And it’s undocumented in the wiki

#

Though it has always been there

#

just pass the location of the soul on the atlas

long sun
#

ah lemme see if i can find an example

#

okay so, in the Googol Play Card's code, i found this:
soul_pos = { x = 10, y = 0, extra = { x = 4, y = 0 } },

#

so i think that answers your question

#

the x and y i think are the position of the floating image, and the second x and y pair is where its sprite is in the spritesheet

zealous glen
#

Or it has some modded functionality

#

The soul pos shouldn’t have an extra

#

Normally you just pass the position on the spritesheet

long sun
#

i'm presuming that means that extra is optional, and can be used to reposition it

runic pecan
#

So I guess like this:

long sun
#

looks good to me :D

#

though, i've never had to do that before, so =w=

runic pecan
sturdy compass
#

Sadly no

merry raven
#

@crisp coral
self.children.animatedSprite:set_sprite_pos({x = 0, y = 2})

Am I able to just do this to swap the sprites, currently it doesn't work because children is currently a nil value. I'm doing this in modify_hand since there are some mechanics that will change the blind's icon on certain conditions, rather than in set_blind where it just initializes and finishes

crisp coral
#

is it in a SMODS Blind object? because there you need to use G.GAME.blind over self

merry raven
#

Yeah

#

I'll try it out

long sun
#

okay, so i'm implementing Introspection, but the game's throwing an error on this line:
return { vars = { {'{C:tarot}Tarot', '{C:planet}Planet'}[card.ability.extra.chosen_type + 1], {'{C:planet}Planet', '{C:tarot}Tarot'}[card.ability.extra.chosen_type + 1] } }

#

this here

#

what'd i miss this time? :}

merry raven
crisp coral
#

check Blind:defeat

#

for all the dissolve shit

merry raven
#

Oh yeah I spotted that

#

God that's a lot of events just for dissolving

crisp coral
long sun
#

ah gotcha, thanks :D

#

okay, small problem

crisp coral
#

yeah fun fact it doesnt work lol

#

you can probable make use of color vars here

tall wharf
#

i don't know how to properly use SMODS.process_loc_text

long sun
#

at least it works mechanically :D

crisp coral
#

process_loc_text is used to initialize localizations

tall wharf
#

ah

crisp coral
#

probably need to generate_ui

#

shrug

long sun
crisp coral
#

err im too lazy to explain sorry lol

long sun
#

all g 👍

tall wharf
#

wrong part but correct text

nocturne garnet
#

wait

gilded narwhal
nocturne garnet
#

wait hold on

#

oh fuck wait

#

i havent tested this with arcana packs

long sun
#

the text is "When {C:attention}Blind{} is selected,", "creates a #1#{} card and", "changes type to #2#s{}", "{C:inactive}(Must have room){}"

gilded narwhal
#

I see

long sun
#

but the formatting applies before the variables are inserted

gilded narwhal
#

Srry

long sun
#

all g 👍

#

also, someone suggested that the Persona 5 Joker should be called the Looking Cool, Joker so i think that is amazing and have changed its name :D

dreamy thunder
#

how can i add multiple options for soul_set?

long sun
#

ooh i had another joker idea

#

Blind Joker: +3 hand size, 1 in 2 cards are drawn face-down

nocturne garnet
#

you dont get soul for free or anything 💀

#

so much variety

topaz sun
#

Guys, is there any way to check what kind of card is being sold in context.selling_card?

long sun
#

ooh i can answer that

#

two seconds

#

here's the code for selling Planets:
if context.selling_card and context.card.config.center.set == "Planet" then

#

tarots:
if context.selling_card and context.card.config.center.set == "Tarot" then

#

etc.

nocturne garnet
topaz sun
#

Woah, that was quick

#

Thank you guys very much

long sun
#

np!!

dreamy thunder
#

i love adding unbalanced stuff

candid epoch
#

question, is .JSON file required?

tall wharf
#

something finally showed up

candid epoch
tall wharf
#

i meannnn

nocturne garnet
# tall wharf

what if you could spell out enhancements and convert them all to said enhancements.....

tall wharf
#

i mean why not

wooden nexus
#

(the joke is that there's 6 sets of e)

violet void
#

do custom seals not work in context.after?

wintry solar
#

they do

#

what are you trying to do?

wooden nexus
#

I'm gonna slowly reveal the secret project as I go

long sun
#

IS THAT ZYGARDE

#

:}

wooden nexus
#

what?

#

What's a Zygarde?

long sun
#

this thing :>

wooden nexus
#

That looks nothing like that

nocturne garnet
wooden nexus
#

That's palm tree, you dumb dumb lol

violet void
# wintry solar what are you trying to do?
        -- repetition_only context is used for red seal retriggers
        if not context.repetition_only and context.cardarea == G.play and context.scoring_hand and context.after and card.base.id ~= 14 then
            print(card.base.id)
            cs_utils.flip_cards({card})

            G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.1,func = function()
                local suit_prefix = string.sub(card.base.suit, 1, 1)..'_'
                local rank_suffix = card.base.id == 14 and 2 or math.min(card.base.id+1, 14)
                if rank_suffix < 10 then rank_suffix = tostring(rank_suffix)
                elseif rank_suffix == 10 then rank_suffix = 'T'
                elseif rank_suffix == 11 then rank_suffix = 'J'
                elseif rank_suffix == 12 then rank_suffix = 'Q'
                elseif rank_suffix == 13 then rank_suffix = 'K'
                elseif rank_suffix == 14 then rank_suffix = 'A'
                end
                card:set_base(G.P_CARDS[suit_prefix..rank_suffix])
            return true end }))


            cs_utils.unflip_cards({card})
        end
    end,```

Im not getting the print
wintry solar
#

well context.after doesn't have a repetition_only flag

long sun
#

Blind Joker!! :D

wintry solar
#

oh hand on it says not

violet void
#

which would be false either way no?

violet void
candid epoch
#

question, how can i color potion to green?
(and how to make currently +X active)

wooden nexus
#

I love that it's in braile

long sun
#

^^"

wooden nexus
#

shame that they can't see the attention to detail

long sun
#

i know that you can use {C:inactive} for the last bit

wintry solar
#

what smods version?

candid epoch
violet void
candid epoch
#

will putting a variable inside work?

violet void
wintry solar
#

what smods version are you using?

violet void
#

oh you were asking me

#

old-calc

wooden nexus
wintry solar
#

thats why

#

context.after is only on jokers in old calc

violet void
wintry solar
#

its been stable since the day after it released

violet void
candid epoch
#

oh #1# is what would be for joker variable?

crisp coral
wintry solar
#

we fixed almost everything the day after

#

but now, it's very much stable

violet void
#

ill try it

tall wharf
#

i am about to pass out


if _c.is_null then
    full_UI_table.name = {}
    localize { key = "aiko_x_akyrs_null", set = "AikoyoriExtraBases", vars = {colours = {specific_vars.colour}}, nodes = full_UI_table.name }
    full_UI_table.name = full_UI_table.name[1]
    info_queue[#info_queue+1] = { key = "aiko_x_akyrs_null", set = "AikoyoriExtraBases", vars = {colours = {specific_vars.colour}}}
end
if _c.aikoyori_letters_stickers then
    info_queue[#info_queue+1] = { key = "letters", set = "AikoyoriExtraBases", vars = {text = _c.aikoyori_letters_stickers}}
end
#

what the fuck happened here

candid epoch
#

i have no idea if this would work

long sun
#

how are probabilities coloured?

#

ah, nevermind, i found it

candid epoch
#

greenie

violet void
candid epoch
crisp coral
#

rarity is so stupid

candid epoch
#

eh, debatable

violet void
crisp coral
#

how do i create_card that forces a specific rarity without knowing the weights or the rarity beforehand

candid epoch
#

i can check the orginal code?

crisp coral
violet void
crisp coral
candid epoch
#

already been said

long sun
#

okay so i've settled on the ability:
+2 hand size, +2 discards, 1 in 2 cards are drawn face-down
but i have no idea how to implement the last bit

ionic verge
#

ok, mb

candid epoch
#

wrong ss, mb

#

i really dunno how to continue

violet void
#

you should hook your own global variable

#

and increase it accordingly

candid epoch
#

where is misc.functions.lua?

violet void
#

functions folder

candid epoch
#

so i add that function to mine code?

ionic verge
#

how would i make a joker treat kings and queens the same rank?

#

i tried looking at pareidolia code and it doesnt really help

violet void
#

I tried something like that too, but there isnt a is_rank() function like is_face() sadly (there is get_id but its not the same thing)
You could make one but then you would have to make it compatible with vanilla jokers etc I dont think its doable

ionic verge
#

damn

candid epoch
#

i have no idea if whatever i am adding is right or wrong lmao

violet void
#

wait you arent adding it to the source code are you
ok it doesnt seem like it

candid epoch
#

nah, i am adding to my code
i know to not alter vanilla code

#

i only extract that
not alter

violet void
#

im not too familiar with hooks, I had some luck with gpt

candid epoch
#

intresting

#

also, i am not confident changing anything else in here

tall wharf
#

something i guess

candid epoch
#

i am guessing this will be how it works

#

this is harder than i imagined, ngl

#

anyone has consumable templates tho?

frosty dock
#

that's (not G.GAME.consumeable_usage_total.potion) == 0 and NOT not (G.GAME.consumeable_usage_total.potion == 0)

pulsar flower
#

is it possible to "hook" calculate_joker with that method of getting the reference to the original function then redefining it? i want to modify the return value every time it's called

frosty dock
candid epoch
frosty dock
#

i'm just telling you what this does

pulsar flower
frosty dock
#

that is, you're comparing a boolean to a number

pulsar flower
#

i managed to do it with eval_card, but can't wrap my head around calculate_joker since it's a Card function

frosty dock
#

you could hook out of this part of SMODS.calculate_individual_effect

#

(lovely patching smods files is still broken)

#

this would catch every xmult, similar to how exponentia from cryptid scales when any xmult is triggered

pulsar flower
#

hm, alright

tall wharf
#

i seem to struggle at dynamic info_queue

#

😭

frosty dock
#

can't do vars in tooltip names unfortunately, these don't get parsed by localize in the same way main text boxes do

tall wharf
#

alright

candid epoch
#

maybe i should do consumables first...

#

anyone got a template?

hushed briar
#

simple question but i'm kinda new to lua, how can i modify an object (i.e. a SMODS.Consumable) that i've already created?

frosty dock
#

when do you want to change it? also, globally or for one specific card?

zealous glen
hushed briar
#

well what i'm trying to do is change a spectral card's description based on a config value

zealous glen
#

Like modname_hey_change_me

frosty dock
candid epoch
#

why i cant find any consumable templates...

frosty dock
frosty dock
# zealous glen Why not?

because localize doesn't parse it in the same way that it does for the name of a main description box, it just returns the plain string stored in the localization entry

zealous glen
#

I think the most annoying part would be making names into tables

frosty dock
#

more so about how tooltips are constructed outside of generate_card_ui using just string data

#

i guess i could fake-substitute the vars

hushed briar
frosty dock
#

this page is getting split and reworked soon, gonna cover it more precisely when that happens

hushed briar
#

ah ok, thank you

tall wharf
#

😭

#

the description still does not appear

livid tapir
frosty dock
#

I'm thinking there should be separate pages for each subclass

#

each page would have its own methods that don't work on every center

livid tapir
#

yeah
i feel like that would be good

tall wharf
#

wrong location

wintry solar
#

I’ve almost convinced myself that general functions like loc vars should have an entire page just for them, like how there’ll be a calculate page soon

frosty dock
#

loc_vars could definitely use its own page

#

esp with the amount of features it now has

ionic verge
#

there wouldnt be a way to have a card have two card ids, would there? (not really serious)

shell tangle
#

Bumping this question one more time, I think I've narrowed it down to Game:draw(), but still unsure.

ionic verge
#

fairly unrelated and much more serious question, im trying to get it to detect kings and queens, but it keeps crashing upon evaluation, anyone have an idea whats wrong?

shell tangle
#

Also, scoring hand is passed to several different contexts.

tall wharf
#
    local dsdsds = string.upper(_c.aikoyori_letters_stickers)
    if dsdsds == "#" then
        dsdsds = "Wild"
    end
    if G.GAME.letters_enabled then

        if G.GAME.letters_mult_enabled then 
            info_queue[#info_queue+1] = {type = 'descriptions', key = "letters"..dsdsds, set = "AikoyoriExtraBases", nodes = desc_nodes, vars = {colour = G.C.UI.TEXT_LIGHT}}
            localize{type = 'descriptions', key = "letters"..dsdsds, set = "AikoyoriExtraBases", nodes = desc_nodes, vars = {colour = G.C.UI.TEXT_LIGHT}}
        end

    end
#

what do i do

#

to put the mult inside the smaller box

edgy reef
candid epoch
#

question, how to make new consumable set?

#

cuz game crashes when launching my game even if i just tried adding one consumable that does nothing

frosty dock
candid epoch
#

bwah

#

oh wait nvm, i forgor the ","

#

i be going insane by the end of this

frosty dock
candid epoch
#

notepad++

frosty dock
#

you should really install a lua extension

#

not having your editor point out syntax errors is quite terrible indeed

candid epoch
#

dunno how and dont wanna deal with that-

minor magnet
#

how do i make a custom order for my jokers in my collection without reshuffling around all of my code

#

?

frosty dock
candid epoch
frosty dock
#

you really should use a lang extension when coding

#

or you'll keep running into syntax errors like this and overlook something dumb instead of just having it highlighted right away

sturdy compass
#

Gonna give this a bump. I’m trying to track the number or retriggers prior to the second joker hitting joker_main

minor magnet
#

try repetitions = card.ability.extra.retriggers

#

no wait

#

im stupid

sturdy compass
#

Lmao

tall wharf
minor magnet
#

or any joker of the sort

sturdy compass
#

It also happens with Scholar so I’d assume it does for walkie too

#

Here’s the full calculate block if that helps

minor magnet
#

mmmm it's a weird issue then, since scholar does not retrigger the cards nor trigger them again in any way

sturdy compass
#

I agree that it’s weird

minor magnet
#

does the issue also occur with jokers that do not interact with the cards?

sturdy compass
#

I’d have to test that. I currently don’t have access to my setup so I cannot test it right now unfortunately

wintry solar
nova finch
#

almost got a page full

humble gale
#

is there a way that i can change the boss blind while im fighting it?

flat ridge
#

Im not sure where this would go, but modding seems more accurate than anything. I started working on an alternative language for the game, nothing useful, just more fun centered. It's probably been done before but here's my take on olden english Balatro:

nocturne garnet
flat ridge
#

Id like to prevent aneurisms

finite sorrel
#

Is there any way to run mod code using a separate thread or process to parallelize something?

glass scaffold
worthy stirrup
#

When making custom deck art, should I work on 1x and size it up to 2x or should I start with 2x and downsize to 1x?

zealous glen
#

I think upscaling makes more sense

#

That way you don't lose details

finite sorrel
frosty dock
worthy stirrup
#

I am thinking about making a skin for the DeckSkinsLite mod

glass scaffold
#

i'm just saying, there's a non-zero chance it's doable.

frosty dock
#

the game itself uses threads for certain things, i.e. save manager, sounds

finite sorrel
#

My goal is to run probability calculations so threading is less desirable because IO wait is almost nothing

#

But afaik there’s no native way do multi core in lua

cerulean rose
#

no

ionic verge
#

how would you re-enable a boss blind with a joker perchance?

#

(if it helps, this is the intended effect)

dry merlin
#

im trying to make an enhancement that works like Blueprint, but i cant get other_card to work i think? for now im just using the effect of walkie talkie, but every time i try to play it with something i get a attempt to index field 'other_card' [a nil value] crash, can anyone help?

SMODS.Enhancement  {
  key = 'e_chaos',
  config = { extra = { chips = 10, mult = 4 } },
  --no_rank = true,
  any_suit = true,
  always_scores = true,
  replace_base_card = true,
  loc_txt = {
    name = 'Chaos Card',
    text = {
      "{C:dark_edition}Copies ability of Card to the right{}",
            }
    },

  atlas = 'chaos',
   in_pool = function(self)
    return false
    end,
  --overrides_base_rank = true,

  pos = { x = 0, y = 0 },
 
  calculate = function(self, card, context, effect, info_queue)
        if context.cardarea == G.play then
            local other_card = nil    
            for i = 0, #context.scoring_hand do
                if context.scoring_hand[i] == card then other_card = context.scoring_hand[i+1] end --makes it look to its right
            end
            if other_card and other_card ~= card then            
                if context.other_card:get_id() == 10 then
                 return {
                chips = card.ability.extra.chips,
                mult = card.ability.extra.mult,
                card = context.other_card
                }
                
                end
            end
        end
    end
}
stray warren
#

You probably need to narrow down your context. Something like if context.individual might work. context.cardarea == G.play is called for multiple different contexts

frosty dock
#

like jokers, tag loc_vars are defined elsewhere

#

For jokers, we can't be doing anything about it because that would be fucking unmaintainable

#

i think i can come up with some trickery to redirect these to generate_card_ui though

cerulean rose
#

bump

ionic verge
royal ridge
cerulean rose
#

the curse of the green squares

worthy stirrup
#

Does balatro have an "offical" color pallete for its art?

ionic verge
flat ridge
frosty dock
ionic verge
#

(though note the full palette is like >256 colors)

flat ridge
wraith topaz
#

Starting to try modding but the text file isn't becoming a lua, any fixes?

viscid bough
#

totally unmodded

flat ridge
hollow patrol
#

hi, is there an event for when a blind is selected? or just a way to check if one has been selected

viscid bough
#

anyone know how i can go about making a joker that retriggers all other joker's effects?

hollow patrol
dry merlin
faint yacht
wraith topaz
#

Can someone help me learn some modding in this game?

minor magnet
#

and at the base game code

wraith topaz
#

Cant even make a lua file so far

minor magnet
wraith topaz
#

It still says Text Document instead of changing into Lua Source File

minor magnet
ionic verge
candid epoch
#

anyone has template for consumables, vouchers and pack? (i got for joker, seal and deck so just need those 3)

wraith topaz
#

How would I check?

cerulean rose
#

do you have show file extensions enabled

wraith topaz
#

Again, not sure

#

Ok, fixed it

candid epoch
#

KoLGames, do your other files have extensions shown? (.png, .txt, .exe)

wraith topaz
#

Fixed it, it’s good now. I forgot to enable it

minor magnet
#

how would i make a deck spawn my custom jokers with higher odds?

#

like the vine deck

#

in the cardsauce mod

#

im looking at its code and can't really figure it out

candid epoch
#

that some complicate math shit

minor magnet
#

it is?

cerulean rose
candid epoch
#

makeing stuff with more odds when conditions happen in general is

#

anyway, once again i am asking if theres any consumable templates

dull saddle
candid epoch
long sun
#

rate? :D (2/7)

candid epoch
#

gemies!

long sun
#

gemies :D

tepid crow
# long sun rate? :D (2/7)

love the left one, right one might need some work still? doesn't feel very shiny/gemstone-y to me if that makes sense

forest hinge
#

anyone know if the functionality of spectral cards is somewhere other than it seems? I tried using a lovely patch on the bit in card.lua that seems to describe incantation/grim/familiar, but even if I literally delete the entire code block the functionality is unchanged

wraith topaz
#

Do I need the Lua program for coding or am I asking stupid questions?

autumn coral
#

Yr asking stupid questions get vs code

wraith topaz
#

k

harsh wagon
#

hey I was just making a very basic alteration to the game (rearranging the jokers in the collection to an order that makes more sense) and the thought occurred to me that when I'm done I probably should put it up in case someone else was interested
but I don't know how to go from messing around in the game files to making a shareable modification

livid tapir
violet void
livid tapir
#

yeah i think thats what lovely patches are for from what ive heard

violet void
#

yes I love lovely patches

long sun
violet void
livid tapir
worthy stirrup
#

You know how the Smear card makes suits act like another suit, how could i make something similar?

long sun
long sun
#

i'm using my own upscales of the sprites as reference

#

so, here's Goldor's upscaled sprite, for example

worthy stirrup
violet void
long sun
#

here's Ignaize and Dimere

violet void
#

do you have a thread?

long sun
#

i can make one for my mods!

violet void
#

not here

long sun
#

ah

#

oops! will make one there then :D

candid epoch
#

by the amount of how much i never got response to consumable, vouchers and packs templates, i assume there arent

faint yacht
#

Is cards_destroyed always a random table? Trying to get the first card that's destroyed and it appears to be random every time?

candid epoch
long sun
#

i remember there's an example Spectral?

worthy stirrup
#

i have no idea what im doing. I found this under cards.lua, but i dont know how to convert it over to the joker function


if next(find_joker('Smeared Joker')) and (self.base.suit == 'Hearts' or self.base.suit == 'Diamonds') == (suit == 'Hearts' or suit == 'Diamonds') then
            return true
candid epoch
split creek
#
  front = possibilities[i],
  _center = pseudorandom_element(G.P_CENTER_POOLS["Enhanced"], pseudoseed('draft_highvaluegoods'))
}, G.deck, nil, i ~= 1, { G.C.SECONDARY_SET.Parcel })```
does anyone know why this would produce a regular, unenhanced playing card?
long sun
candid epoch
#

well, it be 1/8 cards i wanna make then

violet void
worthy stirrup
#

is this the part of the code thats ran when the joker calcuation is ran?

 calculate = function(self, card, context)
      if context.joker_main then
        return {
          mult_mod = card.ability.extra.mult,
          message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } }
        }
      end
    end
  }
candid epoch
violet void
#

you were proved wrong above

candid epoch
#

nuh uh
i replayed to message to the one where he havent made yet

violet void
wraith topaz
#

What is wrong with my code?

violet void
wraith topaz
#

I looked into modding video and it isn't working

faint yacht
# violet void what is happening in this video

Task Manager, on last discard, destroys all discarded cards. The WIP Joker to the left is intended to make a copy of the first destroyed card X times, where X is the amount of cards destroyed.

violet void
faint yacht
# wraith topaz What is wrong with my code?

Add

calculate = function(self, card, context)
    if context.joker_main then
        return {
            xmult = card.ability.extra.Xmult,
        }
    end
end

and change

loc_vars = function(self, info_queue, card)
  return {vars = card.ability.extra.Xmult }
end
faint yacht
candid epoch
cerulean rose
violet void
wraith topaz
#

Let's try again

jagged sun
#

in the context of final_scoring_step, what variable stores the final score? i'm helping out with a friend's mod and she referenced args which doesn't exist in the scope of calculate

violet void
wraith topaz
#

Still isn't working

faint yacht
faint yacht
wraith topaz
#

It's not showing up

#

No, it just doesn't exist as a joker in the collection

violet void
wraith topaz
#

No

violet void
#

then you would need to import it

wraith topaz
#

What, you mean the mod file itself?

#

Not like the place where you keeps mods but the mod itself

serene python
#

How would I make a mod that adds a new enhancement or edition

I wanna have one called Magnetic where the card is always drawn into your hand

dull saddle
#

i think there is a section somewhere on the steamodded wiki about enhancement/editions gimme mo

violet void
serene python
#

Of course if such an enhancement already exists in another mod, I don't need to do anything lmao

serene python
dull saddle
violet void
serene python
#

Gotcha

dull saddle
#

so for some reason when i import my mod into the game to test it out its throwing up a json error according to debug plus, and im at my wits end?? theres literally nothign that should be causing this??

violet void
dull saddle
# dull saddle so for some reason when i import my mod into the game to test it out its throwin...

this is the .json file

    "id": "sinful_jokers", 
    "name": "Sinful Jokers",
    "display_name": "Sinful Jokers",
    "author": ["Peachfroggg"], 
    "description": "Adds four new suit based jokers.", 
    "prefix": "sinf", 
    "main_file": "sinfuljokers.lua",
    "priority": -21, 
    "badge_colour": "fda0a5",
    "badge_text_colour": "a61a1f", 
    "version": "1.0.0", 
    "dependencies": [
        "Steamodded(=1.0.0~ALPHA-1309c)", 
        "Lovely (>=0.6)", 
        "Balatro (==1.0.0)"
    ],
    "dump_loc": false
}```
violet void
#

also depends on how youre getting the first destroyed card

faint yacht
# violet void does it copy correctly with hanged man?

Hanged Man makes the last selected card to be the first destroyed. When destroying via the Task Manager Joker, though, it goes from left to right as expected.

if context.remove_playing_cards then
  for i = 1, #context.removed do
    local _card = copy_card(context.removed[1], nil, nil, G.playing_card)
    ...

Also, the WIP joker catches any playing cards being removed via CTRL+R too.

faint yacht
dreamy thunder
#

I want to make an edition which turns a random card in hand to that edition if there is any in your full deck

#

is there any way of doing it?

violet void
faint yacht
#
if context.discard and not context.blueprint then
  if G.GAME.current_round.discards_left == 1 then
    return {
      delay = 0.45,
      remove = true,
      card = context.other_card
    }
  end
end
violet void
#

what if you tried with context.pre_discard? then you could pass G.hand.highlighted to be destroyed (which is probably correctly ordered) instead of it checking one by one

but idk if that would give error when trying to discard a destroyed hand

faint yacht
#

I used the Trading Card return base... and then there's Immolate that I have to test out potentially.

dull saddle
faint yacht
#

Just remove that part for the time being then.

dull saddle
#

mkay!

wraith topaz
#

This is so bare bones, how does this not appear in-game?

#

I checked collection, it just doesn't exist.

faint yacht
#

...are spaces even allowed in key?

onyx inlet
faint yacht
#

That isn't necessary.

wraith topaz
#

Can you just type in the code for that since I have two braincells trying to make my first joker.

onyx inlet
#

No? Oh dear, I have mislearned

#

Oh wait sorry

wraith topaz
#

Then why isn't it working?

onyx inlet
#

SMODS.Joker:new()

faint yacht
#

...that's not needed either?

onyx inlet
#

What?

faint yacht
#

It's just SMODS.Joker(table).

onyx inlet
#
    for _, v in pairs(jokers) do
        local joker = SMODS.Joker:new(
            v.name, 
            v.slug, 
            v.config,
            v.pos,
            {name = v.name, text = v.desc},
            v.rarity,
            v.cost, 
            v.unlocked, 
            v.discovered, 
            v.blueprint_compat, 
            v.eternal_compat, 
            nil, 
            'new_jokers',
            nil
        )
        joker.loc_def = v.loc_def
        joker:register()
        joker.calculate = v.calculate
    end
end```
faint yacht
frosty dock
onyx inlet
#

T_T

frosty dock
#

and I'm talking like 9 months old

onyx inlet
#

Well I just started learning Balatro modding and I've just been using other mods as examples.

frosty dock
frosty dock
wraith topaz
#

It's not showing up at all, not even in collection

frosty dock
#

does your mod show up in the mods menu?

wraith topaz
#

Nope

onyx inlet
#

Hmm. Does this mean I have an older version of Steamodded installed too? Because my mod actually works just fine 😭

frosty dock
# wraith topaz Nope

do you have a different mod with id ODDITIES that you copied this header from and is also being loaded?

wraith topaz
#

Nope, only this one

frosty dock
frosty dock
wraith topaz
#

Wdym?

faint yacht
#

Balatro\Mods\lovely\log

wraith topaz
#

Nothing there

jagged sun
#

in a joker, is there anything that i can refer to in the calculate() function that refers to the totalled score within the context.final_scoring_step?

#

basically i'm trying to make a joker that modifies the final score

faint yacht
#

hand_chips and mult are exposed globals for current scored chips and mult respectively.

#

G.GAME.chips is the current amount of score already put in iirc.

jagged sun
#

not the score for the whole round

faint yacht
#

Currently scored chips and mult. I have a Joker that swaps the two values around when it triggers on a card being scored, so the values can differ from one copy of the joker to the other due to their positioning in the hand.

jagged sun
#

roger that

vagrant cedar
lavish pewter
#

does anyone have a list or some way of finding out every jokers name and id? im too scared to tamper with the source code

vagrant cedar
#

I still want it to create negative Jokers, but instead of being everytime you leave a shop, it will be a 1 in 4 chance whenever a Joker is triggered

#

And needs to not be able to copy itself

glass scaffold
faint yacht
#

Add an odds to your config for the max chance, first.

vagrant cedar
#

I have like 2/10000 exp points in coding

#

I need much more explicit instruction

faint yacht
#

What's your mod prefix?

vagrant cedar
#

uh

#

SMOD?

#

If that's what you're asking?

faint yacht
#

The "prefix" defined in .json or the legacy header.

vagrant cedar
#

mvan

faint yacht
#

Though, maybe pseudoseed would've fit better, but I just use math.random instinctively.

extra = { odds = 4 } -- 1 in 4. For 1 in 5, it'd be 5 instead.
...
-- Find a random Joker that's not ourselves or a copy of us.
if context.other_joker and context.other_joker ~= card then
  local selectedjoker
  if #G.jokers.cards > 1 then
    selectedjoker = pseudorandom_element(G.jokers.cards, pseudoseed('j_mvan_wokeworm'))
    while selectedjoker.config.center.key == 'j_mvan_wokeworm' do
      selectedjoker = pseudorandom_element(G.jokers.cards, pseudoseed('j_mvan_wokeworm'))
    end
  else selectedjoker = nil end

  -- If we have a valid Joker, roll the chance.
  if pseudorandom('j_mvan_wokeworm') < G.GAME.probabilities.normal/card.ability.extra.odds and selectedjoker then
    G.E_MANAGER:add_event(Event({func = function()
      local card = copy_card(pseudorandom_element(G.jokers.cards, pseudoseed('wokeworm')), nil)
      card:set_edition('e_negative', true)
      card:add_to_deck()
      G.jokers:emplace(card)
      return true
      end
    }))
    card_eval_status_text(context.blueprint_card or card, 'extra', nil, nil, nil, { message = localize('k_duplicated_ex') })
  end
end
wintry solar
#

pseudoseed is 100% better

onyx inlet
#

If I have a card that returns a negative value in calc_dollar_bonus is that a problem?

wintry solar
#

please don't use math.random

vagrant cedar
#

What do I do then 😭

onyx inlet
#

Use the code Ali just wrote!

vagrant cedar
#

But math.random

faint yacht
#

I never grasped pseudoseed in places like such, but it should slot in instead of math.random.

hardy viper
#

psuedorandom

vagrant cedar
#

also I'm very silly and don't know which part I replace with the Ali code

#

I know, I'm obtuse

hardy viper
faint yacht
#

pseudorandom_element(G.jokers.cards, pseudoseed('j_mvan_wokeworm')), in this instance?

hardy viper
#

its just pseudorandom

#

for minmax you do pseudorandom(seed, min, max)

faint yacht
#

G.jokers.cards[pseudorandom('j_mvan_wokeworm', 1, #G.jokers.cards)]?

wintry solar
#

pseudorandom_element is more appropriate in this case

faint yacht
#

pseudorandom_element(G.jokers.cards, pseudoseed('j_mvan_wokeworm')) then?

vagrant cedar
faint yacht
#

Please re-look at the code I've sent earlier... there are edits to it I've done.

wintry solar
#

also you need to add a context check otherwise this will just crash the game

faint yacht
wintry solar
#

no

#

that's also not the right context

#

if context.ending_shop then

faint yacht
#

They wanted to change that to a 1 in 4 chance whenever an another Joker is triggered.

vagrant cedar
#

that's the old context

wintry solar
#

oh right

#

that should be on a post_trigger then

faint yacht
#

Well, at least I tossed my two cents in on this as I had to make my own "not self" Joker finder routine... as well as limiting it so that I don't end up freezing the game in the while loop.

Can we pass pitch alongside sound now?

vagrant cedar
sick sparrow
#

how to check card's center

valid trench
#

I keep getting crashes with no log

#

idk what could be causing it

#

oh wait

#

nvm

#

idk why it's crashing

#

I'm just trying to find how many unique ranks are in the deck

hardy viper
#

for one that wouldnt do the trick since youd have duplicate ranks

valid trench
#

ya I was gonna filter them out after it fills an array with em

#

because I don't think Lua has a function to check for duplicates

hardy viper
#

better way to do it is

local a = {}
for i, v in pairs(G.playing_cards) do
 if v:get_id() > 0 then --stone cards have <0 ranks
   a[v:get_id()) = true
 end
end

print(#a)
sick sparrow
#

how to check card's center

valid trench
#

idk how to make it so it only updates when the deck changes

hardy viper
hardy viper
#

ik eval_card used to result in a stack overflow (which can sometimes just not error and produce a crash)

#

not eval_card

valid trench
#

I just updated it before working on this mod

hardy viper
#

get_id()

hardy viper
valid trench
#

2 hours ago

#

maybe like 1

#

sorry not trying to be snarkly

#

should've specified that

hardy viper
#

thats fine

#

hm

#

do u have any other mods loaded

valid trench
#

a couple but nothing that should be cuasing it

#

putting it in the context.joker_main makes it work

viscid bough
#

is there any documentation of what the next() function does?

valid trench
#

well not crash, not work

wintry solar
#

anything not in a context check in a calculate function will stack overflow

sick sparrow
# hardy viper card.config.center
local monominos = {count=0,minos={}}
for _,h in pairs(card.area.cards) do
    if h.config.center == G.P_CENTERS["j_gerioc2_gerio_monomino"] then
        monominos.minos[monominos.count+1]=h
        monominos.count = monominos.count + 1
    end
end
```made this counting thingy
wet sand
#

is this fire
Wallet: Contains 4 random non-playing cards, will summon one at random when Poker Hand is played (must have room)

viscid bough
#

anyone know how i can check if all the cards in your played hand are a specific suit?

wet sand
#

poker hand is a placeholder for one of the random (currently unlocked) hands in a run, changes whenever you activate it

pulsar flower
#

any reason this wouldn't make the first card in an arcana pack a spectral card

valid trench
#

how would I make it so a value actively updates like Cloud Nine does

hardy viper
#

loc_vars

valid trench
#

what do you mean

#

I don't mean the text

hardy viper
#

well yeah

#

you update it both in calculate and in loc_vars

#

such that whenever you would be able to tell what the value is its updated

hardy viper
#

true

valid trench
#

should I just put it under when a consumable is used and before other joker calcultions

hardy viper
#

there is a context for using convsumeable

#

s

valid trench
#

I know

hardy viper
#

so you wouldnt need to do the first thing

valid trench
#

but there's other jokers that can modify the deck so it should update there as well

#

and also that makes sure it's correct before calculating

wintry solar
#

sorry, whats the effect?

forest hinge
#

if SMODS has taken ownership of something but I want to edit it further, what's the best approach? can I simply take_ownership again?

valid trench
#

it's meant to see how many ranks you have in the deck and reduce it's very high xmult per rank you have

sick sparrow
#

does pseudorandom return between 0 exclusive and 1 inclusive?

valid trench
#

so if you have a deck made of 1 rank it's super strong but it does nothing when you have a normal 52 card deck

#

it seems to work with this set up, does anyone know if there's a get_id() for suits because there's is_suit() but that wouldn't really work if there's any modded suits

wintry solar
#

yeah that's a check that should be done within the calculate context

sick sparrow
#

ah yes, tetriminos

pulsar flower
tepid eagle
#

are you using steamodded?

sick sparrow
#

o tetrimino producing square jokers are bit weird

forest hinge
sturdy compass
sturdy compass
#

Did you have to take ownership yourself to get around it?

tepid eagle
#

this is the code i used to make the first card of every spectral pack be trance

SMODS.Booster:take_ownership_by_kind('Spectral', {
    create_card = function(self, card, i)
        if i == 1 then
            return {set = "Spectral", area = G.pack_cards, skip_materialize = true, soulable = true, key = 'c_trance', key_append = "spe"}
        else
            return {set = "Spectral", area = G.pack_cards, skip_materialize = true, soulable = true, key_append = "spe"}
        end
    end,
}, true)
sick sparrow
#

any idea what 6 other tetriminos do? (I gains x6 mult if the poker hand is flush five, five of a kind, straight flush, four of a kind, flush or straight, as this is straightforward, T is full of twists)

flat ridge
pulsar flower
tepid eagle
#

it basically just puts a bunch of new code at the start of the booster pack code that means the vanilla code doesn't actually ever run

pulsar flower
#

ohhhh

cerulean rose
sturdy compass
#

Damn alright

#

I haven't messed with that stuff yet lol

sick sparrow
tepid eagle
#

i posted an example a little bit up in the chat

zealous glen
#

I think they could also patch Steamodded's patch

#

Or see if Steamodded provides somewhere to hook

vagrant cedar
#

Is someone able to help me fix this Joker? I was having help with it earlier but no one officially told me what to do, people were kind of disagreeing with each other and I never figured it out

pulsar flower
#

oh my bad, i didn't see it

vagrant cedar
#

It's supposed to have a 1 in 4 chance to clone a Joker (with negative) whenever the Joker is triggered, but shouldn't be able to clone itself

valid trench
#

it does whatever the lowest false value is

hardy viper
#

why would anything be false

#

its either true or nil

valid trench
#

sorry not false

#

I guess just nil

plucky wolf
#

is there a good way to find the fancy text the game does? e.g., the word "negative", or the words "The Fool" have fancy colors when used in descriptions -- but where would I look for an example of how to copy that into my own text?

hardy viper
valid trench
#

I guess there's no reason it shouldn't be a local variable other then I wanted it to work in set_ability and calculate

valid trench
#

??

zealous glen
#

the white background

hardy viper
valid trench
#

ya me too but it's just not?

hardy viper
#

ah

#

its context.consumeable

#

not context.consumable

zealous glen
#

are you trying to count the number of Stone cards?

hardy viper
#

(that might not be the issue)

#

(but still)

wintry brook
#

anyone know what juice_up does?

hardy viper
#

number of unique ranks in deck

valid trench
#

that is an issue thank you

zealous glen
#

Because the game does that for Stone Joker, if you need a reference

hardy viper
valid trench
#

but the main issue is that it's just not counting the length of the array correctly

hardy viper
#

you can just check non-stone cards

zealous glen
#

although I'd check for the ranks specifically

#

otherwise it won't work with mods

zealous glen
hardy viper
#

what are u talking about

zealous glen
#

Mods can implement more ranks or cards without ranks

hardy viper
#

?? yeah duh what do u think get_id() is for

#

negative values indicate non-ranked cards

#

which is why you check whether theyre positive

zealous glen
#

Does that work for modded Enhancements using Steamodded's built-in feature

hardy viper
#

it either works or wasnt intended to work