#💻・modding-dev

1 messages · Page 406 of 1

normal crest
#

tho if this crashed I don't have much hope for this working

rare torrent
#
    if context.individual and context.cardarea == G.play and context.other_card == context.scoring_hand[1] then
        for i, c in ipairs(context.full_hand) do
            local rank = c:get_id()
            if rank >= 2 and rank <= 10 then
                local pi_val = pi_digits[rank]
                card_eval_status_text(card, 'extra', nil, nil, nil, {
                    message = "+" .. tostring(pi_val) .. " Mult"
                })
                return { mult = pi_val }
            end
        end
    end
end``` like this? it now counts 2 times the mult
urban wasp
#

everywhere i put trash_gradient is showing up as orange in vs code which isn't a good sign

normal crest
normal crest
urban wasp
#

yes

normal crest
#

you changed the variable name remember

urban wasp
#

i know

normal crest
#

oh

urban wasp
normal crest
#

then dw, vscode doesn't know better

urban wasp
#

anyway game crashed

normal crest
#

rip

red flower
#

there isnt a crash log?

urban wasp
#

nope

#

just hard crash

#

every time

normal crest
#

I mean G.C.RARITY.crp_trash should've worked in the first place, so I guess return statements don't like gradients

#

which is weird cus if you do colour = G.C.EDITION it'll work just fine

red flower
#

let me try

urban wasp
#

yeah i'm just gonna define a local variable in joker.lua that is the average of my gradient and use that as the color

rare torrent
red flower
#

oh yeah it just hard crashes

urban wasp
#

yeah

#

i just ended up doing this

return {
    message = "+" .. lenient_bignum(card.ability.extra.create) .. " Trash Jokers",
    colour = HEX("606060"),
}
normal crest
last sentinel
#

would there be a good way to generalize this table so it can support modded hands? It's all the poker hands that "contain" the index hand (four of a kind necessarily 'contains' a three of a kind, pair, etc)

normal crest
normal crest
#

I guess all the extra stuff it has is not helping

red flower
last sentinel
#

just a joker that operates on that table. makes planet cards have a chance to promote one of the hands that its a subset of

limber blaze
#

you could sort hands based on their order in G.GAME.hands and do stuff that way to generalise but it still seems really complicated

red flower
#

not every hand is composed of other hands

limber blaze
#

but yeah you dont even need a custom table here

#

get_poker_hand_info returns a table poker_hands as one of its return values, (which also exists under context.poker_hands in some contexts) which allows you to check for hands even if they arent the main hand for this purpose

#

for example when playing a pair next(poker_hands["High Card"]) still returns true

rapid stag
#

bump

limber blaze
#

so youd loop over poker_hands then check if next(value) == true and that means that hand is a subset of the current hand

#

orr i guess you dont need == true here i forgot lua for a second

last sentinel
#

ooh okay. only issue is that it's going through planet cards not played hands, so i'd probably have to use the cards in the example hands? but then at the same time guarantee the example hand aren't accidentally another hand as well

limber blaze
#

for planets its a little more complicated since you wont have a poker hands table

#

but you could technically abuse the example of the levelled up poker hand

#

to get a fake hand to pass into get_poker_hand_info

#

seems janky though

red flower
#

yeah that wont work with my poker hands for example because they're all enhancement based

limber blaze
#

why not? just make the dummy hand copy over the enhancements

last sentinel
#

janky is what this community runs on lmfao ill play with it and see if i can get somewhere

red flower
limber blaze
#

oh

#

well theres not really a better solution other than hardcoding it which is worse

#

since it will work even less

red flower
#

yeah

last sentinel
#

Yeahh the idea might be a bit too specific to be able to broadly work for modded hands. Might just add a check and if its a modded hand its just "chance to upgrade any other poker hand"

limber blaze
#

like any other possible version of this idea would be less janky to implement 😭

#

planets levelling up a random lower hand that doesnt need to be a subset or levelling up a subset of the played hand for example

last sentinel
#

yeah, the whole crux of the idea that i like though is that it makes Pluto more powerful

#

Oh but its also not leveling it up one level its applying Pluto's l_mult and l_chips to the other hands so like Pluto gives a teeny wittle buff to the other hands but upgrading mars can still give you enough occasional leving to 5 of a Kind that you can make a pivot without sacrificing wasted leveling

#

but anyways yeah, finished up all my jokers and was happy with them but going back and trying to make them more broadly cross-mod compatible

tight notch
#

this joker crashes the game for some reason, the error says other_joker is a nil value

#

something along the lines of that anyway

rapid stag
#

because when it's checking the conditions, it has to evaluate the variables

#

so when it enters the first condition in the instance where you want your second condition inside that condition to be triggered, it's trying to index context.other_joker when it's nil

red flower
rapid stag
#

and vice versa, since those conditions aren't exclusive of each other

tight notch
#

so how would I fix it?

rapid stag
#

...is other_joker not a thing? cirDerp i thoughti t was a thing during post_trigger

tight notch
#

the joker retriggers all negative cards and jokers btw

red flower
#

maybe it is idk never did retriggers

tight notch
#

other joker is a thing, i've used it in other jokers before and it works

red flower
#

but then other_card is wrong

#

it's one or the other

rapid stag
#

they want to retrigger all negative cards and jokers, though, right? i think the idea there is other_joker for retriggering negative jokers and other_card for retriggering negative cards in played hand cirThink

#

in which case, the nesting is kinda wrong? since i don't think retrigger_joker_check happens on cards when a hand is played

red flower
#

yeah im not talking about the lower if

modern kindle
#

hi besties i hope youre having a fantastic day

tight notch
red flower
#

the nesting looks correct to me

rapid stag
tight notch
#

like instead of...?

red flower
#

instead of other_joker

rapid stag
#

instead of other_joker

tight notch
#

alr

#

i wonder why it works for the others though

red flower
#

idk

#

other_joker is its own context tho

rapid stag
#

yeah even in context.post_trigger it's other_card

tight notch
#

so like this?

rapid stag
red flower
tight notch
#

alr

rare torrent
#

how do i make the description not be this wide💀

tight notch
#

use multiple lines

#
text = {
  "thing",
  "thing 2"
}```
#

in loc_txt or your localization file

rare torrent
#

ah damm that simple?

tight notch
#

a better example

rare torrent
#

yeah it works but also what's the color name of this color?

#

ah nvm it's attention

red flower
ashen atlas
#

any ideas on what lua file the default jokers are stored in?

turbid maple
#

card dot lua

red flower
#

what for

turbid maple
#

this is a better reference if you want to look at them for help with making things though

ashen atlas
#

just want to make a joker and needed to read the code for the effect that i want

turbid maple
#

these are vanilla jokers remade with the smods api

#

okay then definitely reference the link I sent

formal parrot
#

I swear

#

N is my hero

ashen atlas
#

yeah looking through it now, and it is exactly what i needed thx! MC_Heart_Full

vale plinth
#

what does this do?

ashen atlas
#

so it looks like the main VanillaRemade.lua will load the other additions

#

instead of having it all in one LUA file

vale plinth
#

ohhh

#

that makes sense, thanks

ashen atlas
#

no problem im just reading through it myself right now

vale plinth
#

fire profile btw 😭

ashen atlas
#

thx

urban wasp
#

how do i make a deck start with a certain amount of money?

urban wasp
#

ah thanks

rapid stag
#

bump

plush depot
#

what this mean

rapid stag
plush depot
#

im make sticker

#

i really hope i did this right and i dont need smods.atlas

red flower
#

text has to be a table

plush depot
#

how do i do that

brave chasm
rapid stag
#

yeah, text needs to be lua text = { 'Line 1', 'Line 2' }
etc.

brave chasm
brave chasm
#

there, that should work now

plush depot
#

nope

#

same error message

brave chasm
#

did you save the file

plush depot
#

yes

tight notch
#

does anyone here know anything about the cardsleeves mod?

plush depot
#

now to make texture for it

#

uh

#

how do i do that

#

what should i use

brave chasm
#

whatever software or web program works

#

a good free one is libresprite

plush depot
#

what about piskel

brave chasm
#

that would work too

boreal vale
#

Is it possible to make a modded joker spawn another modded joker?

plush depot
#

i made these on piskel

#

E, jimbos father, and Noker

tight notch
#

aseprite is the best app for pixel art imo

plush depot
#

but what are the dimensions of the sticker lol

tight notch
#

but it's not technically free

tight notch
#

for example cryptid's prefix is cry_

brave chasm
plush depot
#

ah

brave chasm
#

while i'm here, i'm having an issue with card retriggers. i'm trying to make a seal that, on scoring, retriggers the card to the left. the issue is that when it retriggers that card, it triggers the original card again which i don't want it to do. i imagine that it's just setting the card to the previous one and then continuing forward, which ends up triggering the main one again. is there a way i can avoid it?

tight notch
boreal vale
tight notch
#

?

boreal vale
#

Where does the prefix come from

tight notch
#

the mod

#

in the main json file you specify your mod's prefix

#

so you would check that json in the other mod

boreal vale
#

Oh I’m trying to create one from my own mod lol

tight notch
#

like make a new joker?

#

if you want to spawn a joker from your mod i don't think you need the prefix

boreal vale
#

I tried putting the key and it didn’t work

tight notch
#

screenshot?

normal crest
tight notch
#

of code

rapid stag
#

bump

boreal vale
normal crest
#

Yeah you need the prefix

#

j_modprefix_key

#

where modprefix is your mod prefix, duh, and key is the joker's key

boreal vale
#

Ah I see

plush depot
#

like the card part

brave chasm
#

yeah, you just want the sticker

#

but leave the file the same size

#

just make everything but the sticker transparent

plush depot
#

ok

#

i now have the texture

#

where do i put it in the code

#

and do i make a new folder other than x1 and x2 for it?

brave chasm
#

no it also goes in the 1x and 2x folders

plush depot
#

ok

brave chasm
#

you just add the texture the same way you would for a normal joker

plush depot
#

ok

#

so path = 50UseSticker.png?

umbral zodiac
#

is there a way to scale a floating sprite? trying to add my own joker to the main menu similar to how cryptid does it but the face sprite is laughably teeny tiny

plush depot
red flower
#

you need to create an SMODS.Atlas

plush depot
#

oops

outer basalt
#

how would one get the amount of money currently in possession

umbral zodiac
#

G.GAME.dollars

outer basalt
#

epic

#

iirc isnt there something with like. tobig() you have to do or?

umbral zodiac
#

just dont compare number with table and you should be fine

#

so you will have to to_big() the values youre comparing it against

outer basalt
#

aight

#

ty

umbral zodiac
#

the place next to the ocean

outer basalt
#

beach

umbral zodiac
#

shore

plush depot
outer basalt
#

oh

umbral zodiac
#

god. WHY AM I TINY

plush depot
outer basalt
#

okay jimmy beach

plush depot
#

thats what the B means

plush depot
#

i see it now nvm

#

nvm again no i dont

#

somoene help

oblique pond
#

uncapitalize the U in atlas?

#

might be case sensitive, not sure

tight notch
#

it is case sensitive

#

always assume case sensitive when it comes to programming

plush depot
#

its still saying no

#

same error message

tight notch
#

did you save

plush depot
#

yes

tight notch
#

resend code

plush depot
#

no

#

i didnt save

plush depot
#

now i just need to make the thing that says "error" work and make the thing do the thing it says

tight notch
#

can you send your mod metadata file

#

or the stickers code

#

both preferably

plush depot
spare wren
#

how would I make a joker that applies the "X2 Mult" message multiple times in 1 context.individual calculate call?

#

I can only do this by returning a table of the message or pop up for the joker but I need to return multiple for this

#

would I use the event manager? how do I make the event manager do the "X2 Mult" or "X2 Chips" thing?

lucid owl
#

is there something similar to Blind:press_play() that can be used on a joker, aka right when a hand is played?

spare wren
#

specifically I'm working on something similar to Observatory where it applies X2 Mult and X2 Chips for each Planet in G.consumeables.cards, but I don't know how to loop through every consumeable per hand played

tight notch
#

#50C878

#

and don't use that prefix

#

you will regret it

plush depot
#

no my mod metadata works fine

lucid owl
tight notch
#

nvm

tight notch
#

for me i got the same issue when not adding the #

tight notch
plush depot
#

its the tag that says "50% Use"

lucid owl
lucid owl
#

is this for a joker?

spare wren
#

yep

#

but i can't do this using context.individual because context.cardarea is never G.consumeables (other than using a consumable)

lucid owl
#

yeah don't use context.individual

rapid stag
#

bump

spare wren
#

so without the help of seperate calls on calculate(...) by context.individual I can't return multiple messages to show X2 Mult

lucid owl
#

i think you're just going to want to loop through every consumable card when a hand is played

spare wren
#

but what about the popup

#

for x2 mult or chips

lucid owl
#

card_eval_status_text()

spare wren
#

ah

lucid owl
#

that'll give you a text popup without needing to return

spare wren
#

thats good

#

how do I multiply the scored mult? stupid question but I cba checking the smods documentation

#

it should be a simple answer anyways

lucid owl
#

you'll want something like card_eval_status_text(card, "extra", nil, nil, nil, {message = "etc etc",})

lucid owl
lucid owl
#

hmm, that one may be a bit more difficult

#

you could always compound all the mult together and give it at the end

#

let me think

spare wren
#

my thing only fires when everything is done scoring

#

so I'd just have to multiply the currently scored mult by 2

#

it should be decently simple no? it's the equivalent of doing

return {
  x_mult = 2
}
lucid owl
#

ohh, you'll likely want something like context.after or context.final_scoring_step

spare wren
#

yeah I know

#

that's fine

#

well I'm currently using context.post_joker but that isn't the problem

lucid owl
#

well i'm a little confused on what you're wanting to do here then

plush depot
#

where would i put the code to make it say "50% use" in red when it is applied to a joker

#

also what would i type

spare wren
#

I'm not having this applied by using consumeables so context.other_consumeable will always be nil

spare wren
#

without returning

red flower
#

that's not what that context does

lucid owl
#

is there a context for right when the hand is played? i'm looking to do something very similar to the hook blind, and context.before has a delay

red flower
#

that context works like observatory

spare wren
lucid owl
plush depot
red flower
#

it's a different context

spare wren
#

shit mb lol

#

wait no

red flower
#

yes

spare wren
#

oh yeah it does

#

okay

vale plinth
red flower
#

it's just called other_consumeable instead of otehr_joker

spare wren
#

I see

#

thank you

spare wren
# red flower it's just called other_consumeable instead of otehr_joker

okay so, this works, but my only problem now is even though I'm doing this:

return {
    x_mult = self.ability.extra.x_mult_per_planet,
    x_chips = self.ability.extra.x_chips_per_planet,
    card = context.other_consumeable
}

the X2 Mult and X2 Chips effects are on self, not context.other_consumeable

red flower
#

replace card = for message_card =

spare wren
tight notch
#

how would I edit the joker slots in a deck

#

like playing on it gives +2 joker slots

tight notch
#

how would i make it so that value changes?

red flower
#

use calculate

tight notch
#

like if this then give+2 joker slots if not then nothing

tight notch
red flower
#

modify G.jokers.config.card_limit

#

iirc

tight notch
#

alr

tight notch
red flower
#

G.jokers.config.card_limit = 6182

tight notch
#

like in the calculate function

#

do i return or

#

this is just what i have so far

red flower
#

well, first of all what's the condition for changing

tight notch
#

if you're playing on the modded deck i made

red flower
#

oh i dont know how decksleevs work sorry

#

let me check

tight notch
#

it's basically the same as making a deck

#

except that there are some extra contexts for calculate

red flower
#

then i would check how black sleeve does it

tight notch
#

well black sleeve is permanent

#

oh nvm

red flower
#

black sleeve changes depending on the deck from what i see but idk how it is set up

tight notch
#

for black sleeve it just kinda changes the config for black deck

#

i don't want the base deck to modify joker slots

red flower
#

what's the difference

tight notch
#

?

#

well the normal deck doesn't change your slots, and the sleeve is the same

#

but when combined you get +3 slots

#

bc you spawn with more jokers

red flower
#

ok, but you can do that by adding it to the config

tight notch
#

so i just add it to the config and then...?

#

and of the sleeve or deck

red flower
#

idk, you told me that's what it does lol

#

but the config in decks is automatic

tight notch
#

well that's a problem

red flower
#

joker_slots = 3 should give you 3 slots

tight notch
#

i want it so that only under the condition do you get an extra 3 slots

red flower
#

and the condition is that you have both the sleeve and the deck, right?

tight notch
#

yeah

red flower
#

then you can do what black sleeve does and change the config when you have that sleeve on that deck

tight notch
#

ah ok

#

so just have it at 0 normally

red flower
#

yes

#

or not having it should work too, you can add any new values to any table

tight notch
#

so it doesn't work

#

it just doens't apply the joker slots buff

primal robin
#

Question. Can something bad happen if I'll update event queue G.E_MANAGER:update(0, true) multiple times inside Game:update()?

#

So far it works fine, but maybe I don't know something

chrome widget
zenith sage
#

my game is saying SMODS.find_mod is a nil value

tight notch
tight notch
zenith sage
#

this is the line local SMODS_NYCTO = SMODS.find_mod("NYCTO")

#

this is the block

#
function SMODS.INIT.NYCTO()

    -- file loading
    SMODS.load_file('ddcjokers.lua')()
    SMODS.load_file('ddcchallenges.lua')()

    -- config
    local SMODS_NYCTO = SMODS.find_mod("NYCTO")
    SMODS_NYCTO.optional_features = function ()
        return {
            post_trigger = true,
            retrigger_joker = true,
            quantum_enhancements = true,
            cardareas = {
                discard = true,
                deck = true
            }
        }
    end

end
tight notch
#

it needs to be a table

#

i think

lament agate
#

say, what to do if i want to make it so that it lasts for 2 rounds before self destructing?

tight notch
#

or maybe it isn't

#

also what you're doing isn't neccesary

#

idk if it's required but i would load files last

#

and second to enable optional features you can do this SMODS.current_mod.optional_features = { retrigger_joker = true, cardareas = true }

#

that's just from my mod so do what you will

#

i'm assumong that this is your main lua file

zenith sage
#

yeah

tight notch
#

if so you don't need everything in a function

#

do something like this

#
SMODS.current_mod.optional_features = {
  the stuff
}

SMODS.load_file(stuff)()```
violet oasis
#

Is there something like G.jokers.cards[1].edition but for ObjectTypes I already defined? I added some vanilla jokers to an ObjectType called "Robot" and I want to check if one of my jokers is in there

tight notch
#

here's mine for example

zenith sage
#

do any of the files need the header?

zenith sage
#
--- STEAMODDED HEADER
--- MOD_NAME: Nyctophilia
--- MOD_ID: NYCTO
--- MOD_AUTHOR: [Nycto, AnnaSH]
--- MOD_DESCRIPTION: Adds a few jokers.
--- BADGE_COLOR: c7638f
--- PREFIX: nycto

----------------------------------------------
------------MOD CODE -------------------------
tight notch
#

headers are deprecated

zenith sage
#

oki doki

tight notch
tight notch
violet oasis
chrome widget
#

😔 I should probably take a break from shader stuff and just make normal cards for a while

#

Ough

tight notch
red flower
# tight notch bump

ok second idea, use the sleeve's apply function and copy the black deck apply from vanilla remade

tight notch
#

alr

#

uh black deck doesn't have an apply in vanillaremade

red flower
#

it does

#

it's commented out

#

but you can copy that

tight notch
#

oooh didn't notice

violet oasis
red flower
#

im pretty sure it is for that

violet oasis
#

Is there any way to check for it? Something like G.jokers.cards[1].edition, but for the ObjectType?

normal crest
#

you can check if a joker is in the pool by going to G.P_CENTER_POOLS.<your pool name>

#

iirc

outer basalt
#

this is the code thats causing it

red flower
#

it's probably the return of calc_dollar_bonus

outer basalt
#

figures

#

do i need to store it locally before doing that?

red flower
#

no the problem is that you're returning a bignum

outer basalt
#

man

normal crest
#

I don't like talisman

red flower
#

I don't like talisman

outer basalt
#

😔

#

the price i pay for ^

violet oasis
normal crest
#

It's not very efficient

violet oasis
#

damn

#

oh well it's something

#

thanks for the help

red flower
#

you can maybe generate a look up table once on startup or something

normal crest
#

I'd go that route too

#

problem is you have to make sure to generate it after every mod has loaded

brave chasm
#

is there a way to trigger a specific card in your played hand? im trying to make a seal retrigger the card to the left of it but using the normal repetition system retriggers the current card instead

keen totem
#

is it breaking copyright with all of these references to other games in a bunch of mods?

#

cause like

brave chasm
#

im thinking maybe i can call a method that triggers the previous card if the current card has the seal

outer basalt
#

its when i play a hand

rapid stag
#

bump

red flower
#

ok i assumed that talisman would take tables as returns

#

like at all

normal crest
outer basalt
#

i mean this is another joker in my mod

#

so idk why the other guy is crashing??

normal crest
#

question, what is e_mult

red flower
outer basalt
#

talisman thing for ^

normal crest
#

i see i see

outer basalt
#

i guess the crashing one has decimals??

red flower
#

then that's not going to crash

#

no, it's because G.GAME.dollars is a table

keen totem
red flower
#

it's a bignum

outer basalt
red flower
#

because big number

#

big number funny

keen totem
#

big nums are tables

outer basalt
#

i

#

what

keen totem
#

to represent big ass numbers

#

luas limit is like 2^1024

red flower
outer basalt
red flower
#

{mantissa, exponent}

keen totem
#

{base,exponent}

tight notch
#

does anyone know what could be causing this?

#

it just won't tell me what mod is the issue

outer basalt
#

this is like teaching a goldfish advanced calculus asdkjasd

#

alas i do not need to understand the math behind it all

red flower
#

it just makes it instead of one number being max_limit now you can have max_limit^max_limit

outer basalt
#

so like

#

2 numbers

red flower
#

yes

outer basalt
#

as one number?

red flower
#

yeah

outer basalt
#

dang

red flower
#

and omeganum is that but bigger

keen totem
#

regular num - 1e308
bignum - 1ee308 (1 with 1e308 zeros)
omeganum - youll never hit it, so who cares

vale glen
#

Is there no try-catch in Lua, to like, catch that error in the to_big() function and try something else

#

Like loading the number into a table in the function for comparison purposes

red flower
#

if there is no one has told me about it

vale glen
#

Sadness

normal crest
#

isn't that pcall

red flower
#

probably

#

but it would be hard to wrap smods functions in it unless you reimplement a bunch of stuff

outer basalt
#

anyways the crash isnt happening when i cash out anymore i can do that no prob but i still cant score 😭

red flower
#

did you know talisman recalculates the played poker hand 4 times during scoring

#

fun

red flower
tight notch
outer basalt
#

you can prolly grab the card list and then do the card w seal + 1 and retrigger that

normal crest
# brave chasm guys please lmao

this reminds me of paperback's bandaged cards, which took adding a new context for calculating retriggers on cards from playing cards

#

hopefully you find a better solution

brave chasm
#

this is what i had before, but it still retriggers the current card and not prevCard

red flower
#

yeah i tried something similar with enhancements and i couldn't get it to retrigger the other cards, only itself idk why

brave chasm
#

so is it not possible with the base framework?

normal crest
#

to my knowledge nope

brave chasm
#

damn

#

youd think there'd be a method specifically for scoring a card

harsh shoal
#

hii does anyone know how to call the sell cost of a joker? im starting to mod stuff and im trying to make a perkeo-thing that copies stuff bassed on sell value

red flower
#

joker.sell_cost

harsh shoal
#

will try

harsh shoal
#

tyyy ^^

outer basalt
brave chasm
red flower
brave chasm
#

oh, so i just leave it as is?

#

alright

normal crest
#

wait.

brave chasm
#

?

tight notch
# tight notch bump

it seems like maybe an issue with my code, but i don't know what's causing it or what "mul" is

#

it only occurs when scoring cards and playing with my moddd sleeve+deck

normal crest
#

what that code is doing is adding a new context called paperback.repetitions_from_playing_card (which is currently only called on enhancements cus we didn't need it for anything else atm) that you can use inside the calculate function of the enhancement to add repetitions to other playing cards

outer basalt
tight notch
normal crest
# brave chasm oh, so i just leave it as is?

so if you want to implement this in your mod I recommend you change the paperback part with your mod id and modify the calculate_enhancement part with whichever is the equivalent to seals

outer basalt
normal crest
#

which it seems there is no calculate_seal so idk

#

this might not even apply to seals

brave chasm
#

i think it might just be calculate

#

idk

normal crest
#

anyhow, it won't work if you just copy paste it, you need to modify it to your needs

harsh shoal
tight notch
#

nvm

violet oasis
raven wing
#

How can I make it so that the seed is refreshed each time the loop passes instead of just once per card scored?

lament agate
#

is_numbered is a thing right?

faint yacht
#

-# No?

lament agate
#

shit

#

what was it again

chrome widget
#

It would be not card:is_face()

lament agate
#

i want to give the player +15 chips for each played cards

chrome widget
#

Although I can't guarantee a modded card that's not a face card is implicitly numbered either depending on what bullshit the mod author does

#

Like Aikoyori lmao

lament agate
#

fair

lament agate
chrome widget
#

not context.other_card:is_face()

lament agate
#

thanks

faint yacht
drifting vapor
#

how would i use G.GAME.blind:set_blind() for a custom boss?

#

i can put G.P_BLINDS.bl_final_vessel in there just fine and it goes to the violet vessel but thats not what i want

EDIT:
For anyone else who finds this in the future, Solution Found!
G.GAME.blind:set_blind() asks for the blind OBJECT. NOT KEY.
What I was Doing:
G.GAME.blind:set_blind('bl_modid_bosskey', nil, nil)
when infact i was supposed to do
G.GAME.blind:set_blind(G.P_BLINDS['bl_modid_bosskey'], nil, nil)

tawdry shale
#

i might be stupid but how would one change the bg color in the splash menu of the game

#

bc this doesn't seem to be working rn

chrome widget
#

How does the stay_flipped calculation return work?

lament agate
#

did i do something wrong here

red flower
chrome widget
#

No but I mean, are there specific contexts where it's valid?

#

Like just draw_cards or whatever it's called?

red flower
#

it's its own context

#

context.stay_flipped

chrome widget
#

Oh, I see

#

I love undocumented features

#

Either way if it allows me to replace some stuff I had used before, I'm all for it

red flower
#

yeah i added to my mod as soon as it was added it's cool

chrome widget
#

I had some kinda finnicky patches for a card that draws diamonds face down

red flower
red flower
#

also then and

lament agate
lament agate
red flower
lament agate
#

oh okay

wooden nexus
#

Hey question: what args is a booster pack? (Like a standard playing card booster pack)

red flower
#

yes, but now you need (get_id == 6 or get_id == 9) in parentheses

lament agate
#

sure

lament agate
red flower
#

A and (B or C) and D

#

dont make me write the whole thing

lament agate
#

YOU WONT

#

hold on

#

this?

#

WOOOOOOOOOOOOOOOOO

red flower
#

👍🌅🎧

rapid stag
#

bump

zenith sage
#

but like

#

why tho

red flower
#

i mean i dont have an answer for that but the main menu is like any other ui element

normal crest
#

aka: learn how ui works in balatro

rapid stag
#

where would i find the definition of the main menu ui cirBlech

#

and the options menu ui for that matter

normal crest
#

idk, i'd start looking through functions/UI_definitions.lua maybe

lament agate
#

this will make it mutable for oa6 right?

#

the #

normal crest
#

if you pass the correct variable yes

lament agate
#

should be good

red flower
#

i recommend looking for the localization strings

rapid stag
# lament agate should be good

G.GAME and G.GAME.probabilities.normal or 1 otherwise it will crash when hovering in collection as G.GAME is nil when not in a run

lament agate
#

okay so

#

bad news

#

the XMult doesnt work

#

but the ## worked

rapid stag
#

what's your calculate looking like

lament agate
normal crest
#

yeah that's not true

rapid stag
#

cirLost that happens for me

if i pass something via loc_vars that depends on G.GAME being indexable, it crashes when viewing it in collections in main menu

red flower
#

but vanilla does it so i cant blame you

#

damn

keen totem
#

im getting conflicting results for how to replace the title screen's logo

red flower
lament agate
rapid stag
red flower
lament agate
#

case sensitive?

red flower
#

yeah

normal crest
#

always

rapid stag
#

i believe so, yes

lament agate
#

fml

red flower
normal crest
#

i'd love to see a programming language that's not case sensitive

red flower
#

brainfuck

normal crest
#

it needs to have letters

#

:(

lament agate
normal crest
#

get a new copy of your joker

lament agate
#

oh

#

thats a thing??

#

okay yeah it works normally now

#

WOOOOOOOOOOOOOO

normal crest
#

yeah the values of jokers save with the run

#

otherwise you'd just lose all the stats you got on your scaling joker if you ever left

keen totem
#

made a custom title logo

lament agate
#

i'd kneel if someone made the logo font

chrome widget
#

Always feels good to shake a few

normal crest
#

but they're lovely!

modern kindle
red flower
#

latest smods release i removed like 10 of them

keen totem
#

would i theoretically be murdered by the YOMI hustle dev for adding a joker based on it

red flower
#

granted most of the PRs were mine

crisp coral
#

no

chrome widget
modern kindle
#

im gonna do a cool thing whenever i get back to working by pretending my patches are needed still regardless of changes

zenith sage
#

is there a context for "trying probability"

keen totem
normal crest
#

nop

chrome widget
#

Honestly it'd be an incredible tool but no

zenith sage
#

would be nice

red flower
#

there's a pr for that

normal crest
#

is it your pr

zenith sage
#

was it yours

#

jynx

red flower
#

but seems hard to enforce

red flower
crisp coral
#

you are that smart tho

red flower
#

thank you myst

chrome widget
#

You're v smart. It seems like almost all of the really useful new features I've been leveraging are yours lmao

normal crest
#

i mean the pr looks like it's just replacing all pseudorandom calls with its own

chrome widget
#

That's kinda what it has to do if it wants a feature like that

#

Since vanilla doesn't wrap the entire thing in a function

vale glen
#

Experienced and dedicated, yeah. Been seeing a lot of your messages helping others here, and you even code on phone. Amaze.

normal crest
#

I know but it doesn't seem overly complicated, making the regex is the hardest part

keen totem
#

will destroy_cards just skip eternal cards or is that implementation manual?

red flower
chrome widget
#

Wugh I need to remove my lovely patch for quantum editions too

normal crest
chrome widget
#

I'm just gonna make it a function hook and update it ocasionally when smods changes something

#

Right now it's weird and annoying

keen totem
red flower
#

yes

normal crest
#

yep, that's on you, you monster

keen totem
#

so i need to custom code that bruh

#

how do i check if a card is eternal

normal crest
#

if it's a joker that destroys itself just make it non eternal compatible

#

otherwise yeah you have to check

#

if card.ability.eternal

#

pretty much

untold vigil
#

Is there something to correct?

red flower
#

is there something not working?

normal crest
keen totem
#

well duh

#

functions arent real

red flower
#

true!

#

all programming is made up

normal crest
#

who made it up

vale glen
#

up quarks

red flower
#

thunk

normal crest
#

what is the civil chatter role

red flower
#

i think that allowed you to be in thunk chat or smth?

untold vigil
#

When I set this up it crashed when I played a queen

stark geode
normal crest
red flower
stark geode
normal crest
#

remove the } after 'Spades' and the { before invis_rounds

normal crest
zenith sage
#

also is_face() doesnt need an argument

#

probably copied from the above line

normal crest
#

yes there is a lot wrong with that code but

#

they have to learn lua 😔

vale glen
#

the indentation is pain

zenith sage
#

indeed

vale glen
#

Doesn't VS Code have an autoformatting button at least, or is that an add-on

red flower
#

it does

normal crest
#

the addons provide the formatters

zenith sage
#

i do mine manually

#

is there

#

a balatro addon??

red flower
#

i have it on save

vale glen
#

Nod nod

normal crest
#

not a balatro addon, a lua addon

zenith sage
#

ohhh okay

untold vigil
#

Just that I don't have the security to use it

red flower
red flower
normal crest
#

yes, now you shouldn't get the error you did (if you start a new run)

untold vigil
untold vigil
crisp coral
#

fuck security, who up downloading extensions from unknown sources

red flower
#

it doesn't fix stuff, just formats the code to look nicer

#

(sometimes it might add commas)

normal crest
#

you just right click and "format document" anywhere on the text

chrome widget
#

Okay I couldn't completely eliminate my multi-edition patch but I made it less stupid, which is acceptable

vale glen
#

Meanwhile, Axy in Notepad++, since VSC would likely lag with too many tabs open...

chrome widget
#

We ridin'

red flower
#

my vscode did lag a lot when i had a massive localization file

crisp coral
#

does Axy actually need all of those tabs open at once

normal crest
#

I've never had lag with having too many vscode tabs open

vale glen
#

When we get bored with one thread of development, we switch to another one, and they all do different things, soooo

crisp coral
#

insane

vale glen
#

Some tabs are just for reference, like the compat_0_9_8 one, but most of them are to figure out what fields things have

#

Currently trying to figure out UI, get a sprite to change when it the user hovers over other nodes on the page

crisp coral
#

oh noooo UI

#

good luck o7

vale glen
#

But if that gets frustrating, can switch to looking at rarities, or replacing textures during play and restoring them when the card is sold, or so on

#

Will eventually think of storing card state between runs and per profile as well, to have things progress between runs. And if all that gets too frustrating, there's always updating things to add Joker Display stuff

red flower
#

i love jokerdisplay

vale glen
#

Yeah, it's so good

red flower
#

best mod ever

normal crest
#

i wonder who made it

normal crest
red flower
#

i need someone to do jokerdisplay for me i hate it

#

not the mod but the compat with my other mod

vale glen
#

xD

#

Still haven't learned Joker Display yet, so can't quite help there

untold vigil
#

Even with this it dosen't destroy itself and creates the other card

vale glen
#

Will definitely learn it eventually, just uh... the progress is horizontal, as you can see

red flower
#

the wiki should cover most of it but im not that good at english or writing

vale glen
#

Mmh, documentation is difficult

normal crest
#

and message is meant to be a string, not a table

#
SMODS.destroy_cards(card)
SMODS.add_card { key = 'j_sab_spade_king' }
return { message = "stuff" }

you want something like this

lament agate
#

is it possible to have 2 style in 1 string?

untold vigil
#

with the (card) being the own card's key?

normal crest
#

the only thing you'd have to change there is the message

#

and please run the lua formatter on your file

lament agate
#

{C:inactive}Gains {C:blue}+15{} Chips{}

red flower
#

yes

#

the chips wont be colored tho

normal crest
#

Gains will be gray, +15 will be blue and Chips will be the default color

untold vigil
lament agate
#

let me figure out a way

normal crest
lament agate
#

also

#

one ladst question

normal crest
lament agate
#

can i edit the message to be local

#

like message = 'bruh'

normal crest
untold vigil
normal crest
#

it didn't do anything cus you have syntax errors

#

you need to fix those first

normal crest
#

if that's what you meant

lament agate
#

actually 2 last question

#

how the hell do i make this joker endure 2 losses

#

ignore the text

normal crest
#

don't make it destroy itself when it saves you lol

lament agate
untold vigil
#

Like this?

lament agate
#

i want it so that its still there until 2 losses

normal crest
# lament agate but like

you'd want a variable to keep track of how many times it can save you, decrement it each time it saves, and if it's less than or equal to 0 destroy itself

#

and you want that variable in your config

normal crest
#

thank you

normal crest
# untold vigil Like this?

on the line right above SMODS.destroy_cards you want to remove the context( .. ) part, leaving the stuff inside the parenthesis but getting rid of the rest

split saddle
#

well my pc died so i can't work on my stuff anymore for the time being :/
in the meantime, how do the floating image jokers work? (legendaries & holo)

normal crest
#

in a joker definition you can optionally add soul_pos = { x = 0, y = 0 } which will take the sprite in that position of your atlas and make it floating

untold vigil
#

The joker isn't destroying itself

#

I'll keep doing this tomorrow tbh

normal crest
#

cus you're never modifying either of them

#

so that's why it's not destroying itself

ashen atlas
#

hey im trying to figure out how to destroy Hearts after they have been scored,
any ideas?

zenith sage
#

am i hooking this wrong

local add_to_deckref = Card.add_to_deck
function Card:add_to_deck(from_debuff)
    if not self.added_to_deck then
        if self.ability.name == 'Christmas Tree' then
            G.hand:change_size(self.ability.extra.h_size)
        end
    end
    add_to_deckref(self, from_debuff)
end
zenith sage
ashen atlas
#

going to test that out

zenith sage
#

wow thats super buggy lol

#

theres definitely a better way for that event to work

ashen atlas
#

i cant seem to get it to work at all lol

zenith sage
#

error?

ashen atlas
#

no error just not doing it

zenith sage
#

did you replace card with v

#

needs to be removing v

normal crest
#

you can add an add_to_deck function in your joker def

zenith sage
#

woah

#

thats sick as hell

normal crest
#

these two

oblique pond
#

question: how do you use no_ranks? this is what i've got inside but it doesn't work

            "A",
            "2",
            "3"
        }```
zenith sage
# ashen atlas i cant seem to get it to work at all lol
calculate = function(self, card, context)
    if context.cardarea == G.jokers then
        if context.after and not context.blueprint then
            for k, v in ipairs(context.scoring_hand) do
                if v:is_suit("Hearts") then 
                    G.E_MANAGER:add_event(Event({
                        func = function()
                            v:juice_up()
                            v:start_dissolve()
                            return true
                        end
                    }))
                end
            end
        end
    end
end
ashen atlas
#

i figured it out

ashen atlas
keen totem
#

are you talking about no_rank in enhancements or something else?

oblique pond
#

it is named "no_ranks"

ashen atlas
#

@zenith sage thx for the help!

#

wait no now it destroys the whole hand if it has one heart in it lol

normal crest
oblique pond
normal crest
#

the number ids are just the numbers btw

#

T is for ten

normal crest
hybrid shadow
#

is there a limit to how long a file can be before it stops being read?

#

im getting a crash that says '=' expected near 'key' but there is one there

hybrid shadow
keen totem
#

and its line 1396?

hybrid shadow
#

yes

keen totem
#

also not how you get the boss blind

#

also SMODS.Joker {

#

you forgot the {

keen totem
#

G.GAME.blind.boss

#

not that

#

maybe it works but i know that G.GAME.blind.boss does

hybrid shadow
keen totem
#

nah

#

just G.GAME.blind.boss

hybrid shadow
#

like that?

keen totem
#

yea

hybrid shadow
#

alr cool does not crash and works as intended

keen totem
thorn furnace
#

What is the key of an enhancement
like steel or whatnot

hardy viper
#

c_steel iirc

thorn furnace
#

i keep getting editions and enhancements confused SALADWENTBAD

thorn furnace
hardy viper
#

double check tho

#

i haven't modded in awhile

thorn furnace
#

o

keen totem
normal crest
#

m_steel

keen totem
#

its stupid, but im assuming c_base works for editions too

#

so thats the point

normal crest
#

c for consumables, m for enhancements, e for editions, j for jokers

hardy viper
#

y for nothing

daring fern
#

steep rain
#

[SMODS RReferences "items/jokers.lua"]:21: unexpected symbol near '='

thorn furnace
daring fern
thorn furnace
#

doesn't appear to be

#

oh
wait

steep rain
thorn furnace
steep rain
#

I cant just type out the code in chat because I dont have Nitro

daring fern
steep rain
#

But if I remove that, the game breaks

daring fern
steep rain
#

are you talking about the
}
}
}

#

are you talking about those parenthesis?

daring fern
steep rain
#

[SMODS RReferences "items/jokers.lua"]:26: '}' expected (to close '{' at line 8) near 'calculate'

#

so I need that parenthesis

daring fern
#

You're missing a , on the end of loc_vars

#

It's because since you're missing a , it thinks you want to end the table.

steep rain
#

That didnt fix it

#

I'm trying everything I could to fix it

thorn furnace
#

Is the negative edition functional on cards or does it require custom implementation

steep rain
#

ykwhat, I'll just fix this tomorrow

#

I'm tired

thorn furnace
#

i mean like playing cards not jokers/consumables

daring fern
thorn furnace
#

oki

daring fern
#

It's implemented by SMODS

thorn furnace
#

I wasn't 100% sure because like seals don't work on jokers for example
dance

daring fern
thorn furnace
#

oh

#

still

frigid blaze
#

Tell me if there is an author of All in jest mod here

rugged pier
tall wharf
chrome widget
#

What is ego browsing?

tall wharf
#

i just look up my name in search

chrome widget
#

Ah I see

tall wharf
#

anyway

#

null cards are inherently just a blank card

#

so they are not face cards ever

#

unless you have Henohenomoheji

#

then j q k are considered face cards

plain gazelle
#

Is it possible to determine whether the player bought specifically a Joker or a consumable? I tried to use ".ability.set == 'Joker'" but crash errors say that context.buying_card is purely Boolean

daring fern
plain gazelle
daring fern
molten musk
#

so i starting coding today "finally after 3 days of trying to figure out what will i do with the mod"
was writing the json file

#

whats badge color?

daring fern
plain gazelle
#

Got it, thanks

molten musk
#

and what version do i put in dependencies?

daring fern
molten musk
#

if my questions seem stupid thats because i just woke up and my brain is still in dream land

strange wasp
#

Hi, I know the YT video is outdated, but I am at the point (5:33) where I can potentially see my joker in game, But I don's see it there, Here is where I am at in coding.

strange wasp
daring fern
manic rune
#

thats a .txt file, not a .lua file

#

main.lua**.txt**

strange wasp
daring fern
hardy viper
#

should be fine as long as the main_file in your json is "mod.lua.txt"

bold sleet
#

cursor

strange wasp
#

sorry, I can be abit annoying when I ask questions

manic rune
#

all good lol

strange wasp
#

so, now that I got the lua file figured out, is there anything else I need to do so that my joker appears in the game. I;ll taks care of the variables next after seeing the joker.

manic rune
#

can you show me your .json file

strange wasp
manic rune
#

main_fille

#

badge_tect_colour

#

be sure to check for typos :3

daring fern
#

Or use the template.

strange wasp
#

misspelled, my bad

thorn furnace
#

How do I go about getting/setting a seal that's on a card

daring fern
thorn furnace
#

hm
to get the key of said seal would be card.seal.key right?

daring fern
thorn furnace
#

oh

#

that's where I messed up then SALADWENTBAD

molten musk
#

so in the assets folder where 1x and 2x files
i put the same files with same names?

daring fern
molten musk
#

like i double the photo size ...

#

ok

plain gazelle
#

I want to compare suit of the first played card in a hand with suits of the rest of the played cards but
"first_card_suit = context.scoring_hand[1].suit" returns nil?

plain gazelle
#

thanks!

thorn furnace
#

How would I go about lowering the blind requirement

daring fern
thorn furnace
#

Okii
Thank u :>

#

Also
How would I check if the player is currently in a round

#

actually nvm

thorn furnace
#

What are the tags for the vanilla seals

daring fern
thorn furnace
#

The keys yeah
Sorry

daring fern
unborn bay
#

just "Red"

#

fuck

thorn furnace
#

O

unborn bay
#

!!!!

manic rune
#

you could always just print them out to check, actually

thorn furnace
#

I thought it wouldve been like "Red_seal" at least

manic rune
daring fern
manic rune
#

force of habit, sorry :3

#

this is the joker i made for the tutorial, is this good

thorn furnace
# daring fern Modify `G.GAME.blind.chips`?
SMODS.Consumable {
    key = 'bread',
    set = 'jojo_Scraps',
    config = { extra = { blindPercentage = 2 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.blindPercentage } }
    end,
    
    use = function(self, card, area, copier)
        G.GAME.blind.chips = G.GAME.blind.chips * (1 - card.ability.extra.blindPercentage / 100)
    end,
    
    can_use = function(self, card)
        return G.GAME.blind
    end
}

Am I doing something wrong
I figured that would be how you'd lower the blind but it doesn't do anything

thorn furnace
daring fern