#💻・modding-dev

1 messages · Page 517 of 1

red flower
trail tide
#

What pseudorandom functions are there? I need one that generates a float between 0 and other number

rapid stag
#

bump

red flower
slim ferry
#

why do poll_enhancement and poll_seal just have args for their arguments? is that just to make it not care what you put in there or something?

slim ferry
#

oh its probably because you input a table isnt it

red flower
slim ferry
#

yeah okay

wintry solar
#

Oh I need to make SMODS.poll_edition actually

red flower
#

which is better than poll_edition(ni, nil, nil, nil)

slim ferry
red flower
#

in a hook? yes

worthy stirrup
#

Does the calculate function of a consumable apply when its held in the hand or what

red flower
#

yes

wintry solar
#

What are you hooking the poll functions for?

worthy stirrup
#

Damn, I’m not sure how I’m gonna make this work. I want it to keep an internal counter to check if it’s still the same ante it was used on, and then, when a hand is played, it should halve the chips, sorry if this is shittly worded

slim ferry
#

is options in poll_enhancement just a table of enhancements like <key> = true etc.?

#

and is the output just the key as a string

cursive gazelle
#

eremel have you seen my fork of smods ?

modern kindle
#

🍴

red flower
slim ferry
#

oh the utility page just has a worse explanation

#

i see

red flower
#

we love the smods docs

slim ferry
#

if poll_enhancement returns nil, will that crash or just do an unenhanced card?

red flower
#

the enhancement page doesnt say what it returns lol

warm dragon
#

ok, so jokerless does it with custom = {
{id = 'no_shop_jokers'}, but as far as I can tell there is no id for 'no_shop_planets'

slim ferry
#

yeah i think you would need to make your own challenge rule for that

#

because

wintry solar
slim ferry
#

challenges are annoying

warm dragon
#

So when you say that I would have to patch here, you are saying I would have to add something to the main game code? I can ban planets in the code for the challenge specifically?

red flower
#

yes, you would need to add a no_shop_planets and check for it there

warm dragon
#

Can I add the no_shop_planets somewhere in my mod instead of editing the actual code for the game?

rapid stag
#

bump

red flower
cursive gazelle
red flower
#

you can just make a draft PR

warm dragon
#

I think it would be useful to see a mod that used a hook as an example

wintry solar
#

I’m not going to go and seek out forks and read them

#

I have much better things to do with my time

modern kindle
#

hi eremel

#

hope you are well

wintry solar
#

Hello dilly, I am well, how are you?

modern kindle
#

i wish we could auto remove embeds instead of having to remove them ourselves for links

modern kindle
cursive gazelle
slim ferry
#

why does base use the prefix c_ but other enhancements use m_

#

that seems wierd

warm dragon
#

I know that the way my mod is now pluto will still show up in shop and blue seals are still possible, but I'd like to playtest it anyway. But when I try to open balatro its crashing so I don't even think I have the folders set up correctly and I'm not sure what I am doing wrong

wintry solar
cursive gazelle
#

its good for bigger modpack managment

modern kindle
#

is reload all mods just restarting the game anyway

#

feels like the keybind fulfills that purpose faster

wintry solar
#

Adding menu bloat to add niche use case buttons doesn’t seem ideal

cursive gazelle
cursive gazelle
warm dragon
red flower
#

also you can just send the file here

modern kindle
slim ferry
#

do empty tables act the same as nil?

red flower
#

notably empty tables are truthy

wintry solar
#

Eris what are you trying to do?

cursive gazelle
slim ferry
wintry solar
#

You mean four buttons right?

red flower
#

you need to press like 5 buttons to reach that

modern kindle
slim ferry
#

im just wondering what to do if all enhancements are banned

#

because i assume it doesnt like it when poll_enhancement returns nil

red flower
slim ferry
#

or if options is empty

warm dragon
#

THanks

wintry solar
#

That’s what it does when your poll doesn’t hit

slim ferry
#

ah i see

#

and what about options being an empty table?

red flower
#

at least banner lets me ban all of them

worthy stirrup
#

Hey, just wanting to get some help, how could I make the event trigger whenever the ante is the same as the ante it was used and when a hand is played?

    use = function(self, card, area, copier)
        self.ante_used = G.GAME.round_resets.ante
        self.active = true
        G.E_MANAGER:add_event(Event({
            func = function()
                return true
            end
        }))
    end,
slim ferry
wintry solar
rapid stag
#

bump

wintry solar
#

It would only not look at the banned list if the options have been manually fed in

red flower
#

<@&1133519078540185692>

rocky plaza
#

<@&1133519078540185692>

worthy stirrup
#

bro, i want help not scams

keen gorge
#

🔫

red flower
#

ty mods

exotic hedge
slim ferry
#

okay so i think this would work?

#

since i dont need to do anything if options was nil anyway

warm dragon
slim ferry
#

because that already respects bans

rotund sable
wintry solar
#

Options can also be an integer indexed table of strings

worthy stirrup
rotund sable
#

Oohh

#

Makes sense

red flower
slim ferry
warm dragon
# red flower

Well its good to know that forgetting a comma is as annoying to figure out in lua as it is in every other language lol

red flower
#

this is why you get a good editor that highlights errors :3

#

you can also make it complete your commas for you

worthy stirrup
slim ferry
#

okay NOW this should always work properly

red flower
#

== {} doesnt work

slim ferry
#

FUCK

warm dragon
#

ok, so why does the name of the challenge show up as ERROR instead of SpongeBob? and why aren't the three jokers negative?

red flower
#

do not next(table) or #table == 0

slim ferry
#

now would it be correct to assume that poll_seal doesnt respect bans by default, unlike poll_enhancement

red flower
red flower
#

it uses the same function

slim ferry
#

ah

#

(then why the need to do a hook to ban blue seals earlier...

red flower
#

i dont know if challenges let you add seals to banned keys but no idea

warm dragon
red flower
#

no

slim ferry
warm dragon
# red flower

I thought that was what I was doing with name = 'SpongeBob',

red flower
#

no that does nothing

#

afaik

rapid stag
#

bump

red flower
#

oh banner adds defaults

slim ferry
#

ah

#

but i assume i wouldnt need to do that for enhancements because returning nil already works

red flower
#

yeah im guessing

slim ferry
proven belfry
#

i made a joker that's like a blueprint for both sides of itself in joker forge and put it in with the rest of my mod but it's not copying the joker to the right, anyone know why?

slim ferry
red flower
proven belfry
slim ferry
#

idfk ive never made a blueprint card

warm dragon
slim ferry
rapid stag
red flower
red flower
proven belfry
rapid stag
#

i think smods has a function for that

red flower
#

it does i made it :3

warm dragon
# red flower what part

I replaced name = 'SpongeBob' with

loc_txt = { name = 'SpongeBob' }

and now the game crashes

candid prism
warm dragon
#

wait maybe because I forgot a comma again

warm dragon
candid prism
red flower
#

" and ' both work

candid prism
#

oh

slim ferry
red flower
warm dragon
#

ok, I got the name working! WOOOO this is so exciting

#

Still not understanding why my starting jokers aren't negative though

candid prism
warm dragon
#

I have negative = true

slim ferry
#

you need to do

#

edition = "e_negative"

#

i think

rapid stag
#

try edition = 'e_negative' instead

modern kindle
rapid stag
#

good git path

red flower
slim ferry
modern kindle
red flower
#

also its usually not a good idea to modify a table while iterating it

warm dragon
warm dragon
ebon shell
#

hi everyone can anyone tell me how i make this create the planet card for the most played hand? i know the key arg is what decides which planet to create but how do i make it look for the most played hand?

red flower
#

you would need to loop through the hands to check the most played (check Obelisk for something similar) and then iterate through the planets to get the planet for that (check blue seal)

worthy stirrup
#

when should I check if the ante has changed, the start or end of a blind

red flower
slim ferry
red flower
#

i would do that yeah

worthy stirrup
#

wait no, i can just check when a hand is played and intregate it with the rest

hidden notch
#

I tried to add a custom info_queue, but it always returns without the text component...?

worthy stirrup
#

How would I get context into a Event?
Im trying to check if a hand is played and then trigger the false part

    use = function(self, card, area, copier)
        self.ante_used = G.GAME.round_resets.ante
        self.active = true
        G.E_MANAGER:add_event(Event({
            func = function()
                if self.ante_used == G.GAME.round_resets.ante then
                    print("Same Ante")
                    return false
                end
                print("New Ante")
                return true
            end,
            blocking = false
        }))
    end,
rapid stag
#

bump, does no-one know at all what i need to put in config?

warm dragon
#

@slim ferry wait so can I use banned_keys to ban blue seals?

red flower
#

only in calculate

worthy stirrup
#

How would i check when a hand is played

red flower
#

if a hand is played then use cant be run

#

you want to use calculate for that

worthy stirrup
#

but you said the calculate only ran when the card is in hand, however I want the affect to apply when the consumable is used

#

sorry if what im saying isnt clear

red flower
#

you cant use the consumable and play a hand at the same time unless you modify the vanilla functions

#

whats the goal?

worthy stirrup
#

The card when used, gives the player a tooth, however for the rest of that ante the player will suffer with .5x chips

red flower
#

oh then you would need to do other stuff, thats kinda difficult

#

the easiest way i can think of is like Balatro Goes Kino's consumables that stay in hand after use and apply an effect and then get destroyed

worthy stirrup
#

oh, that does soundlike something I could try, thank you

red flower
#

else you would need to do stuff with dummy objects or things like that

worthy stirrup
#

I could probably make the tooth do the debuffing

warm dragon
#

ok @red flower so i have to use a hook to make a 'no_shop_planets' so that I can include that in my rules.custom

so I am going to write a local something but what function am I modifying?

ebon shell
#

i copied this code from another mod which is supposed to create the planet card for your most played poker hand, but it just keeps creating pluto. which part is causing this and what do i need to change?

warm dragon
#

I'm lost again I think

red flower
#

i honestly would just recommend waiting for that PR

warm dragon
red flower
#

no idea, maybe 2 weeks?

#

if it gets accepted of course

warm dragon
#

oh, ok then I guess I'll just wait

red flower
#

you can also use that version of smods

warm dragon
red flower
#

the one that includes my changes

#

of course it would be hard to convince othe rpeople to use it haha

hidden notch
#

How would I go about doing that? 🤔

warm dragon
#

@red flower btw did you mention there was a way to ban blue seals without a Hook? using banned_keys or something?

red flower
red flower
#

try adding "Blue" as a banned key

warm dragon
warm dragon
red flower
#

no

#

in banned_cards

#

it has to be Blue capitalized too

warm dragon
#

ok so in cards I would put {G.GAME.banned_keys = 'Blue'}

hidden notch
# hidden notch I tried to add a custom `info_queue`, but it always returns without the `text` c...

Yeah makes sense lewxen_Teary_Laugh

I wanna add a custom section for my Localisation, and I don't wanna add my new entries to "Others"
;; When accessing my custom "Artist"-Section, it shows the Name but not the Text
-# basil_squaredd had a very very similiar issue and was able to resolve it by adding their new description to "Others"

But I'd like to know how to make the game register my new "Artist"-Section x'3

red flower
#

like you did with the jokers and the packs

hidden notch
#

Gosh

Darn it

warm dragon
red flower
#

i did something like that by making a dummy object that extends from a center

#

but theres probably an easier way

red flower
warm dragon
#

oh just id = Blue with no quotes or with quotes

red flower
#

with quotes

warm dragon
red flower
#

whats the crash

rapid stag
#

i took a look through the process. this shouldn't be returning nil in nil.
further investigation is confusing me to no end - i tried intentionally causing crases by rempving config entirely from my table to no effect. i've tried doing config = { vars = { 1, 4} } to see if that's what's going on here. nothing. i've also tried wrapping the get_probability_vars in an assert() to see if i could work out what it's trying to grab, also to no effect.

why is it nil in nil

warm dragon
red flower
rapid stag
warm dragon
#

I think because it doesn't know what Blue is

red flower
#

yeah then seals dont work

warm dragon
ebon shell
#

please

warm dragon
# red flower yeah then seals dont work

Honestly that doesn't bother me as much as the fact that pluto cards still show up. If I could figure out how to ban planet cards I would be happy but I think I just don't know enough about lua to understand how hooks work

#

He seems to just set planet_rate=0

red flower
#

it does what i said, it sets planet_rate to 0 in a hook

#

this is for decks tho

warm dragon
#

I can't be the first person trying to ban planet cards in a challenge right?

red flower
#

no its not that hard to do what i said lol

warm dragon
manic rune
hidden notch
warm dragon
ebon shell
manic rune
#

mhm i guess thats the case

#

im on phone rn though so cant help much

ebon shell
#

now that im testing the joker i copied this from it also creates pluto, so the issue is in fact the code for detecting most played hand

manic rune
#

id probably try printing v.config.hand_type and G.GAME.current_round... to see if they are different

ebon shell
#

nvm actually after playing more hands it works, so the issue is within my own code

warm dragon
#

@red flower I need something like this? But i don't know what the og function is and also idk how the syntax works

local SomeFunction_old = ???
if challenge is spongebob
    self.GAME.planet_rate = 0
else
    local ret = SomeFunctionOld()
    return ret
end
buoyant thorn
#

i already checked the example vanilla mod and also tried searching the modding wiki on github but

theoretically speaking
how would one go about making a joker that gives 5 times current ante in mult?

and how is one expected to find specific variables on their own?
im so confused

manic rune
#

G.GAME.current_round.ante i think?

warm dragon
red flower
manic rune
#

but as for the latter part of your question, mostly just remembering the variables through muscle memory lol

buoyant thorn
#

ah!
I didn't know you could do that thank you 💖

modern kindle
#

Hi bepis

red flower
manic rune
#

hi dilly

#

have you seen the extra effects stuff i did :3

modern kindle
#

Nope i sure didnt

#

What you do

manic rune
slim ferry
manic rune
#

i always mix round_resets and current_round, bleh

manic rune
warm dragon
buoyant thorn
#

i guess i could try them one bye one
ill do that first actually

modern kindle
# manic rune

Ooo
Does it add the total to cav
Ie becomes x4.13 or does it do x3 and then x1.13

buoyant thorn
red flower
warm dragon
modern kindle
#

Icic

manic rune
#

its almost X2

#

by almost i mean X5.99999 mult type of almost

#

but also, you arent meant to have this much passive and attacks anyways lol

#

-# at least, not outside of bsr

modern kindle
#

That's pretty epic
Almost like my glitch edition which gives a random boost to values

manic rune
#

those effects use their own calculate

warm dragon
manic rune
#

and very easy to add new effects too

modern kindle
warm dragon
# red flower wdym

The link you sent me the example is

SomeObject.SomeFunction = function(self, arg1, arg2)

so is that

Game.start_run = no_shop_planets()

red flower
#

no

warm dragon
#

I am trying to follow this

local SomeFunction_old = SomeObject.SomeFunction
SomeObject.SomeFunction = function(self, arg1, arg2)
    print("PRE hook!")
    local ret = SomeFunction_old(self, arg1, arg2)
    print("POST hook!")
    return ret
end
manic rune
#

-# i did fix the table later on

red flower
modern kindle
manic rune
#

i will take a look at it when you do

#

:p

warm dragon
red flower
#

the hook is as i wrote it

#

you would only replace the prints with your code

#

args is the argument to the original

warm dragon
warm dragon
manic rune
#

sob

red flower
warm dragon
red flower
#

yeah

warm dragon
#

So like this:

local game_start_run_old = Game.start_run
Game.start_run = function(self, args)
    local ret = game_start_run_old(self, args)
    planet_rate = 0
    return ret
end

How do I make it only disable planet cards inside the one challenge though and not everywhere?

red flower
#

you can maybe do G.GAME.banned_keys["Blue"] = true there too

#

it's G.GAME.planet_rate

#

and you would check if G.GAME.challenge == "your challenge key"

warm dragon
#

like that?

red flower
#

you're missing the then and end on the if statement

manic rune
#

are you missing lua extension

red flower
#

also im not sure if the key for the challenge is correct

#

it might need to be ch_key or something

warm dragon
red flower
red flower
warm dragon
red flower
#

whatever you set in your json file

warm dragon
#

oh right

warm dragon
rapid stag
red flower
warm dragon
red flower
#

yeah thats good

warm dragon
red flower
#

oh

#

G.GAME.challenge == 'c_ec_spongebob'

warm dragon
slim ferry
#

finally finished this up, it should account for actually everything now

red flower
slim ferry
#

allows ignoring bans if you dont fill in options

red flower
#

oh ok makes sense

#

i still wouldnt ignore in_pool tho

slim ferry
#

how would i not do that,,...

#

also i didnt know enhancements worked with in_pool

knotty compass
#

heyaa does anyone know is there an option to check if the joker is being retriggered? i want to make so one of its abilities is not affected by retriggers

red flower
#

you would need to add an in_pool check

#

like get_current_pool does

slim ferry
#

but if i wanted to do that what pool would i even check

knotty compass
#

thanks!

slim ferry
#

well if you pull enhancements from a pool

#

you can use any pool

#

and how would i check in the correct pool

warm dragon
#

OK! I think everything is working and I learned a bunch. Thanks for the info and patience @red flower and @slim ferry 🙂

red flower
#

poll_enhancements is always on the enhancements pool

#

or the options

#

not in a custom pool

slim ferry
#

well then it wont ignore that though right?

#

because if options is filled in it changes nothing

#

and otherwise it does the regular enhancements pool like usual

tired otter
#

Hey um on a scale of 1-10 how hard is modding balatro without jokerforge?-

red flower
#

no, because you're adding all enhancements into the options with your first condition

slim ferry
#

uh yeah

#

all the enhancements in G.P_CENTER_POOLS.Enhanced

red flower
#

yeah you would need to check in_pool for each

slim ferry
#

is G.P_CENTER_POOLS.Enhanced not the enhancement pool?

red flower
#

yes

#

but it has all enhancements

#

in_pool doesnt remove it from the pool directly

#

thats why get_current_pool exists

knotty compass
slim ferry
#

and how would i check in_pool

#

where is that

#

because its not a function

#

is it in G.P_CENTER_POOLS?

#

for each enhancement

red flower
#

this is in get_current_pool

#

_starting_pool would be G.P_CENTER_POOLS.Enhanced

slim ferry
#

so just add if v.in_pool?

red flower
#

you need to add the entire if block in the screenshot

#

if v.in_pool would only check if the in_pool function exists

#

honestly it was probably easier to patch get_current_pool to not check banned keys lol

slim ferry
candid prism
#

im goimg imnane

slim ferry
#

because this just makes a bunch of variables

#

but i dont see it doing anything with them

#

besides changing them

candid prism
red flower
rotund sable
#

Or are you trying to pass animation atlas to a joker?

rotund sable
red flower
candid prism
slim ferry
#

you need an atlas

#

unless your atlas is called joker.png which i doubt

rotund sable
#

Oh I'm on mobile I thought it was a crash log

red flower
#

am i seeing the wrong file

#

the problem is that the atlas shold be named Analog in the joker

slim ferry
#

oh thats

#

an atlas definition

#

nvm

red flower
#

both of you said it wasnt there so i thought i was crazy lol

candid prism
#

can you tell i have no idea what im doing

buoyant thorn
#

hey um
i tried looking inside the game.lua file
i couldn't find the voucher redeem context at all

i need to make sure hieroglyph is accounted for and stuff since im not just making a joker so um
how do i?...

slim ferry
red flower
#

yeah

#

i dont think you need any arguments in in_pool

slim ferry
#

also when would something not be banned but also not be in_pool anyway

chrome widget
#

Oh wait no you mean in general

#

A lot of things can be not banned but not in the pool

red flower
#

or hook a function to unban the key dynamically

slim ferry
#

oh so like

#

things like the vanilla enhancement jokers do that right?

red flower
#

yes

chrome widget
#

Yeah

zealous glen
#

They could be in the pool but have a weight of 0

ebon shell
#

this is supposed to trigger if all cards held in hand are either hearts or clubs, so i have it do nothing if it finds a spade or diamond, otherwise it runs the rest of the code. but for some reason it's doing nothing in both cases? what did i do wrong here?

zealous glen
red flower
#

also why dont you check for the suits directly?

#

this will work incorrectly with any modded suit

ebon shell
#

if i do that it will still trigger if there are hearts/clubs AND other suits

#

i need it to be only hearts/clubs

wintry solar
#

Check if the card is hearts or clubs and if not stop

#

You currently only stop if it’s spades or diamonds

#

What if it’s a modded suit?

whole canyon
#

hey. I'm a noob

`v_1_joker: "1 Joker Tag"

v_2_jokers: "2 Jokers Tag"

v_3_jokers: "3 Jokers Tag"

v_d_tag: "D Tag"

v_reroll_tag: "Reroll Tag"

are these vouchers? tags?

wintry solar
#

Your check would not catch it and youd end up with a hand that could contain other suits

red flower
#

jumpscare

ebon shell
#

does something like this work?

wintry solar
#

No because like N said before, context.individual and context.joker_main are never both true at the same time

ebon shell
#

oh right forgot to fix that

slim ferry
#

tags have the prefix tag_ so identifying them is usually pretty easy

chrome widget
#

That said you're not still checking correctly anyway, if you need to poll all cards in hand

slim ferry
chrome widget
#

You'd need to loop through the rest of the cards in G.hand.cards and then cancel if any of them are not your two valid suits

red flower
# ebon shell does something like this work?

you probably want

if context.joker_main then
  local is_all_h_or_c = true
  for _, pcard in ipairs(G.hand.cards) do
    if not (pcard:is_suit("Hearts") or pcard:is_suit("Clubs")) then
      is_all_h_or_c = false
      break
    end
  end
  if is_all_h_or_c then
    -- your effect
  end
end
chrome widget
#

Could also just return outright instead of break

#

Assuming no other code follows

red flower
#

yeah

whole canyon
slim ferry
#

i cant find them...

red flower
#

the 2 Jokers Tag saved a lot of my runs

#

the 3 Jokers Tag is very bad tho

slim ferry
#

what the FUCK is a 3 jokers tag‼️

red flower
#

it's like the 1 Joker Tag but x3

slim ferry
#

whats the 1 joker tag

#

is that like the 3 jokers tag /3

red flower
#

exactly

slim ferry
#

uhuh

#

interesting

chrome widget
#

Is this a modded thing?

slim ferry
#

IDK

whole canyon
#

okay yes my bad
came from my own broken dict I started writing

#

sorryyy

slim ferry
#

i love 1 joker tag

red flower
slim ferry
#

7 grand tag

red flower
chrome widget
#

Honestly Cardsauce should add one of those or smth writing that down

#

Idk we already have a 7 grand dad joker

ebon shell
#

for some reason this part that's supposed to create the planet for most played hand only updates each ante, so like if most played hand changes on big blind it only starts creating the new planet card after the boss blind. why's that?

modern kindle
#

Winter :)

red flower
ebon shell
#

so umm what do

#

sorry i have no experience neither with coding nor modding this game

red flower
cursive gazelle
#

Doesn’t the Ox do that

cursive gazelle
#

Oh i see

red flower
#

oh but the code is a better example

#

its funny how it doesnt use the order part

cursive gazelle
#

I meant if it works

ebon shell
#

for obelisk it has a set hand to compare with, that being the current played hand, but for me I want to get THE most played hand, so i can't compare it to another hand and say "yes, this hand is played more, trigger the joker effect now"

#

how can i achieve that?

red flower
#

look at the screenshot i just sent

cursive gazelle
#

What is reading

lime thorn
#

But I think Love Live jokers would be peak

candid prism
#

how do i up text size in a joker's title

proven belfry
#

im making a double-blueprint of sorts, how do I also copy target_joker2

rapid stag
wintry solar
#

change return to local ret =

proven belfry
#

and then how do I use SMODS.merge_effects

#

the wiki doesn't show the formatting

plain ember
#

Had to leave that day, thank you so much!

frosty rampart
normal crest
#

should be SMODS.merge_effects { ret, ret2 } iirc

rapid stag
#

sanity check: does the seed value passed into pseudorandom_probability become the context.identifier in context.pseudorandom_result?

so for example, lucky card mult proc is SMODS.pseudorandom_probability(self, 'lucky_mult', 1, 5), i can detect that on the other side via context.identifier == 'lucky_mult'

normal crest
#

yes

red flower
proven belfry
#

microsoft family safety

red flower
#

goddammit nxkoo

#

i should have edited some weird choices here but i cant be bothered

chrome widget
cursive gazelle
red flower
#

yes

cursive gazelle
#

great i guess lol

chrome widget
#

hmmmmm trying to figure out the best way to display artist credits for my decks....

cursive gazelle
#

also is your mod out yet?, i think i asked before but i just wanna check some shader codes

#

i got mine working btw

#

thanks again

chrome widget
#

Maybe like this

#

Also no info_queue is not valid for the deck selection screen

chrome widget
cursive gazelle
#

know*

chrome widget
#

sure, it'll get a thread here

cursive gazelle
#

idk what's up with me sorry my headache is getting the best of me

chrome widget
#

idk I don't think you did anything wrong?

cursive gazelle
chrome widget
#

oh I see, shrug

cursive gazelle
#

btw how can i give a card a sticker

chrome widget
#

use Card:add_sticker(sticker_key, bypass_check)

modern kindle
#

silly winter, your real name is right there
i see it hidden in plain sight

#

N'

chrome widget
#

Also my series from earlier

#

third game falloff hurt

frigid cargo
#
local btct = {ticks = (1)}
local upd = Game.update
local btct_DEvil_dt = 0
function Game:update(dt)
    upd(self, dt)
    local DEvilobj = G.P_CENTERS.b_btct_DEvil
    btct_DEvil_dt = btct_DEvil_dt + dt
    if DEvilobj and btct_DEvil_dt > 0.1 then
            btct_DEvil_dt = btct_DEvil_dt - 0.1
            if DEvilobj.pos.x > 30 then 
                DEvilobj.pos.x = 0 
            else
                DEvilobj.pos.x = DEvilobj.pos.x + 1
            end
    end
end
for k, v in pairs(G.I.CARD) do
    if v.children.back and v.children.back.atlas == G.ASSET_ATLAS["btct_DEvilAtlas"] then
        v.children.back:set_sprite_pos(G.P_CENTERS.b_btct_DEvil.pos or G.P_CENTERS["b_red"].pos)
    end
end

this doesnt update the deck constantly but it does update if i look at a different deck and look at this deck again. How can i make it update constantly?

chrome widget
#

Uhhh question, does this work? Or do I have to hard declare the self argument if I send it to the function explicitly

#

Otherwise I can just do this I suppose

split saddle
#

I've got a working language pack that change up some names, but the misc = {} section isn't working
what's wrong here?

chrome widget
#

is it nested one too far down?

#

it should be at the highest level of the return table for the localization

split saddle
#

not inside description

#

maybe that's it

chrome widget
#

For example I'm fairly certain I saw you had quips aside it, but quips is actually within misc in the vanilla structure

split saddle
#

yeah, it was the nesting level

vast night
#

imma bump this since htis is apparently the only message that was sent about this but never answered. for me its before scoring tho

dapper sun
#

i never figured it out myself and just used a similar effect

#

..which likely wouldn't work for whatever you're doing

vast night
#

oh sry for pinging

#

ty

dapper sun
#

it's ok, i was already chatting in the next channel over

vast night
#

imma look at how the calculate works in the game elsewise rq

dapper sun
#

tbh you could probably just

#

chips x mult

distant junco
#

how does one check the amount of money one has

#

its dollar_buffer or something, right?

vast night
distant junco
#

ah

#

thank you

split saddle
# split saddle

k_not_allowed_ex is supposed to be the "Not Allowed!" text, right?

vast night
split saddle
dapper sun
#

i'd assume so

vast night
#

there are 3 different ones

#

which one

split saddle
#

i'm the guy that suggested we join forces

#

and nobody listened even though it'd be a great idea

split saddle
#

it's ok

vast night
#

competitive me

vast night
#

i also have another developer but he got another remote job + exams so hes busy

split saddle
#

there are also some jokers that have no art and I did some myself

split saddle
#

*hacker voice* i'm in

split saddle
#

everything else is working so idk

slim ferry
#

maybe the psychic is just stupid though idk

split saddle
#

that's the first thing i did

slim ferry
#

did you save it

split saddle
#

yeah

#

i have autosave on onFocusLost so it will always save when I reset the game

vast night
#

hi team. im bumping a wall rn tbh. why the hell dosent the context.before and context.after trigger? the context.joker_main works perfectly fine

    calculate = function(self, card, context)
        if context.joker_main then
            return {
                xmult = card.ability.extra.xmult
            }
        elseif context.before and context.cardarea == G.play then
            card.ability.extra.old_chips = to_Number(G.GAME.chips)
        elseif context.after and context.cardarea == G.play then
            print(to_number(G.GAME.chips))
            print(card.ability.extra.old_chips)
            if to_number(G.GAME.chips)-card.ability.extra.old_chips >= to_number(G.GAME.blind.chips) then
slim ferry
#

because the joker isnt in G.play

#

i think what youre trying to do is iterate over G.play

#

but this isnt the way to do that

#

also i dont think G.GAME.chips exists, pretty sure its G.hand.chips

vast night
#

idfk what im doing wrong

slim ferry
#

im pretty sure the docs are just wrong then

#

strange

royal ridge
slim ferry
split saddle
vast night
slim ferry
#

okay well apparently the docs are just fucked up ig

vast night
#

apparently i can just use context.before without the context.cardarea check 🤷

slim ferry
#

for the context.before check you should instead do if context.before and context.main_eval and not context.blueprint

#

or

vast night
#

or context.main_eval

#

lmao we said the same thing

slim ferry
#

i assume the context.after check could be the same as the context.before

#

wierd that the docs do it like that though, because context.cardarea == G.play would be for enhancements...

#

in context.before/after at least

vast night
#

yea

#

wth

#

context.after triggered before scoring finished

slim ferry
#

uhhh,,

#

did you put context.main_eval

#

because you could maybe try doing not context.main_eval? idk if that would work

vast night
#

gonna go sleep

#

ill ask tomorrow

#

tysm for trying to help <3

vernal path
#

am i stupit (dont answer that) whats the context for scored cards

faint yacht
#

context.cardarea == G.play

vernal path
#

no i mean like, for getting the amount of scored cards

#

#context.full_hand is the full hand

faint yacht
#

That's the "amount" of cards in the full hand.

#

context.full_hand by itself contains said cards.

vernal path
#

yes, thats what im looking for, lol

vernal path
#

i suppose i could just count them

faint yacht
#

context.scoring_hand

vernal path
#

ah

#

i knew it existed

split saddle
# royal ridge hardcode moment

i really don't wanna do this, but it seems i have no choice
where do you put this? or just plop it at the end of the main.lua?

royal ridge
#

huh?

#

do you wanna patch it or

split saddle
#

I want a localization for k_not_allowed_ex, but it's not working (as shown earlier)

royal ridge
#

i don't know why thunk has that hackfixed but you can try patching that line to reverse it

chrome widget
#

"But Winter," you might ask, "isn't it completely unnecessary and overdesigned to make every single one of your functions hooks completely modproof in terms of arguments and returns?"

And to that I would reply, "Yes."

split saddle
royal ridge
#

yes

split saddle
#

wtf man

red flower
#

same if they return something in a function that doest return anything

chrome widget
#

......I can see use cases for it

split saddle
#

wait so how do you fix it

red flower
#
[[patches]]
[patches.pattern]
target = "functions/state_events.lua"
pattern = '''play_area_status_text("Not Allowed!")--localize('k_not_allowed_ex'), true)'''
position = 'at'
match_indent = true
payload = '''
play_area_status_text(localize('k_not_allowed_ex'), true)
'''
#

that?

royal ridge
#

does that work

#

should patch i believe

split saddle
#

where does it go?

royal ridge
#

goes in a .toml file

red flower
#

i should probably fix that in my hooks too

royal ridge
red flower
#

oh damn

royal ridge
#

incredible line

split saddle
red flower
#

there

royal ridge
#

ok i have to ask

#

what is the point of the version number

red flower
#

according to meth, none

royal ridge
#

a

red flower
#

but i already had it like that from copying smods

royal ridge
#

why did smods change it

chrome widget
#

it's futureproofing. It might not be necessary now but could be useful later

split saddle
#

wait nevermind i'm dumb

#

i just realized that it just replaces hard-code into a localization

ocean sinew
#

how do I make a deck that starts with a specific joker,consumable,playing card with specific edition stickers etc

red flower
split saddle
#

I'm looking at the BUMod's hook to change the hangman text into two lines (since returning a table inside of the loc file crashes the game, unless i missed something), and it has a hook for the card's center.
All that is to say, what is the voucher's center that has the 'REDEEM' text in it?

red flower
#

like the button?

#

that's not in a center

split saddle
#

that's beyond the point, you get the idea.... What is the pointer to that text?

red flower
#

that's not beyond the point, it's what you asked lol
wdym pointer? the key? the ui node?

faint yacht
#

...localization entry?

red flower
#

b_redeem

hazy mountain
#

okay im a little stuck, ive been looking at refrence code, and the smods wiki but im unsure how to go about making my new tarot function which will turn all cards in hand to an enhancement like a stone card, ive got the enhancement working i just dont know where to start for creating the config stuff for it.

hazy mountain
#

oh sweet thanks so much

split saddle
# red flower b_redeem

no, that's not it

I want to write two lines into the 'REDEEM' text (that is in b_redeem), but passing a table into it crashes my game

b_redeem = {
  "two lines",
  "of text"
}```

So, I thought of BUMod and how it does it with the Hanged Man, where it says "Hang / 'em" so I went to that as a first idea. In there, I found out that it has a hook for `G.UIDEF.use_and_sell_buttons` using the card's `card.config.center.name/key` to interact with it within the code. Naturally, I wanted to find an equivalent to that within the voucher, and now we're here

In short: how do you put two lines of text instead of REDEEM in the voucher
red flower
#

you would patch into the code were b_redeem is used

#

if you want it for a certain voucher then you would need the key of that voucher but thats not relevant if you want it for all

#

it's in create_shop_card_ui

dapper sun
chrome widget
#

there b some insane ui hook code im writing

red flower
frigid cargo
red flower
#

inside the update

#

im guessing

dapper sun
red flower
#

does it work if you hover over them twice normally?

#

as far as i can see it shouldnt

#

because you're creating the badge once and it's getting destroyed as soon as you close the description

dapper sun
#

?

red flower
#

you need to create the badge in set_badges

#

so it does it every time you hover

dapper sun
#

okay yeah it's not about "the edge" like i thought before, it's specifically on the second hover

red flower
#

yeah that makes sense

dapper sun
#

it's not the same joker either

#

the second time i hover any joker with a badge

#

wait i think i get it now lol

red flower
#

yes because they all share the badge

dapper sun
#

yeah

red flower
#

as soon as you unhover any uibox it destroys all the children

#

thats why you need to recreate nodes or you need to copy cards when displaying them in a UI window

split saddle
# red flower it's in create_shop_card_ui

I seriously don't like the UI functions for this game...
Here's what I know:

  • the use button of the voucher is a certain "t2" type object that contains a UI.T node with localize('b_redeem'), which is what i'm looking to hook.
  • BUMod uses a different, custom UI.T for their use button. I don't know what the difference is yet, but clearly they did something to allow for line breaks.
#

I'm completely clueless as to what to do still, by the way

#

i'm trying ;-;

red flower
#

t2 is the name of the variable, not the object type

#

what they did is probably just add an extra row of nodes

frigid cargo
red flower
#

the buy and use button code is below that, you can check that out for two rows

red flower
split saddle
#

here's what i'm gonna do

#

since i'm a Professional Programmer™, I'm going to do a pro gamer move: ctrl + c, ctrl + v

#

and see what happens

atomic sandal
#

help i can't check my deck suits and all that bc everytime i click on the deck i get this error

#

i only modified the rarity of blueprint to common so idk if i may have just missclicked something else

split saddle
#

this kinda looks like you don't have SMODS installed... have you?

atomic sandal
#

what's smods

split saddle
#

or are you modifying the game's internal code? 😰

frigid cargo
split saddle
#

start here and come back

errant arrow
#

okay, i started using print to try and trouble shoot, and my joker is trying to retrigger the joker to it's right, but fails to do so.
Code below.

#

it's trying to retrigger 4 times, but other than it not being able to retrigger, i dont know what else there could be wrong with it

#

if anyone can help push me in the right direction, that would be very helpful

atomic sandal
split saddle
#

If you want to mod the game, you probably want to use that because it makes it orders of magnitude easier

red flower
split saddle
#

At the very least, try to install them and then maybe we could help you from there

red flower
#

especially not when the crash logs don't help in that situation

atomic sandal
split saddle
frigid cargo
atomic sandal
#

lets fricking go

#

i found out what went wrong

#

i fixed it

tiny hemlock
#

guys do you know why this keeps crashing? its the g.sound.play or its sound = "xmpl_whatevername" (fixed)

unborn bay
#

the hell is G.SOUND

rocky plaza
#

use play_sound(key, pitch, volume)

tiny hemlock
#

oh ok

#

like this? play_sound("xmpl_myhonorvoice", 1, 75)

#

or the pitch and volume are optional?

rocky plaza
#

not optional

tiny hemlock
#

alr

rocky plaza
#

i believe

tiny hemlock
#

thanks

maiden phoenix
#

only the key isn't

versed swan
#

how do you check if something is in the pool or not?

solemn shuttle
#

is there a way to check the start of an ante?/what is the context for the start of an ante/the first selection of blinds

solemn shuttle
red flower
versed swan
#

and how do you get said prototype?

#

given a key

red flower
#

depends on the object

#

for most cards it's G.P_CENTERS[key]

tiny hemlock
rocky plaza
tiny hemlock
#

like the SMODS.Sound({ key = "xmpl_myhonorvoice", path = "myhonorvoice.ogg" })

rocky plaza
#

yeah]

tiny hemlock
#

?

versed swan
rocky plaza
#

so do play_sound("xmpl_myhonorvoice",1,1)

#

or just play_sound("xmpl_myhonorvoice")

#

if what im told about the last 2 numbers is correct

lethal spindle
#

How can I change this joker to Cryptid exotic

#

I already have Cryptid as a dependency

rocky plaza
lethal spindle
#

String or just replace 4 with cry_exotic?

tiny hemlock
rocky plaza
lethal spindle
#

Thx

solemn shuttle
rocky plaza
rocky plaza
#

i dont believe theres a context for rerolling boss blinds

tiny hemlock
rocky plaza
solemn shuttle
#

or how should i start

rocky plaza
#

or something like that

#

i mightve messed up something tho

solemn shuttle
#

its at least smth i can try to work off of, im not the most familiar with hooks n all yet so i appreciate it lol

rocky plaza
#

oh right it needs to reset to 0 when a run starts

tiny hemlock
rocky plaza
rocky plaza
tiny hemlock
rocky plaza
#

so like where u create the SMODS.Sound(s) that u play

tiny hemlock
rocky plaza
tiny hemlock
#

like how

daring fern
tiny hemlock
daring fern
daring fern
rocky plaza
#

oh

#

my god

#

wait

rocky plaza
tiny hemlock
#

alright

#

wait wrong image

rocky plaza
#

yeah so key = "myhonorvoice"

#

etc

#

see if it works

tiny hemlock
#
    key = "myhonorvoice",
    path = "myhonorvoice.ogg"
})

SMODS.Sound({
    key = "myhonormusic",
    path = "myhonormusic.ogg"
})```
#

ok

rocky plaza
#

yeah

#

does it run

#

without crashing

tiny hemlock
rocky plaza
#

ok try removing the prefix from the function calls

#

idk whats going on

tiny hemlock
#

crash

#
Thread error (Thread: 0x01dfa0c4cd80)

Could not open file resources/sounds/myhonorvoice.ogg. Does not exist.
stack traceback:
        [C]: at 0x7ff9a3d958a0
        [C]: in function 'newSource'
        engine/sound_manager.lua:63: in function 'PLAY_SOUND'
        engine/sound_manager.lua:197: in main chunk````
#

wait i will do smthing

rocky plaza
tiny hemlock
#

sure

rocky plaza
#

huh

tiny hemlock
#

i dont even know whats happenin

#

ok so the joker 1 in 2 chances of x2 mult, 1 in 2 chances of x2 chips, 1 in 8 of losing instantly

rocky plaza
tiny hemlock
#

alr

#

NOOO

#

it crashed

rocky plaza
#

hmm i think we need the help of some outside people

#

i will bring in the heavy artillery of actually intelligent people

tiny hemlock
#

:0

solemn shuttle
#

-# like just if hook() or

rocky plaza
solemn shuttle
rocky plaza
#

or rather adds on to it

solemn shuttle
#

so what i should be doing is not checking if hook() but rather the variable change or smth else associated with it

rocky plaza
#

so by adding a global counter to the function i can get the number of times the boss has been rerolled

solemn shuttle
#

i see now

rocky plaza
#

the solution i sent earlier works if ur joker scales based on boss rerolls

daring fern
solemn shuttle
rocky plaza
#

aaaaa

#

i should not be trying to help people right now my brain is fried'

solemn shuttle
solemn shuttle
daring fern
rocky plaza
daring fern
rocky plaza
daring fern
rocky plaza
#

yeah imma leave i cannot program to save my life rn

solemn shuttle
# daring fern What is the goal?

well given ive hooked the boss reroll, i just need a way to set up a global counter that can reset to 0 at the start of a run
i can probably figure out a way to detect the change easy enough

solemn shuttle
solemn shuttle
#

really i just gotta figure out a proper way to detect the global var changing now but it shouldn't be THAT hard

chrome widget
#

Im genuinly strugglimng so hard to find out how to make the description box thinner

strong bloom
#

cant start game crashed after all the cards go into the light

#

mb wrong chjannel

ripe thicket
#

is there a way I can get a joker to directly modify the round score?

chrome widget
#

Can someone with a little more lua knowledge than me explain why exactly trying to change the third argument here doesn't work?

#

I get the results I want if I'm using the named arguments the function is declared with, but I want to make the hook respect other mods

chrome widget
manic rune
#

quick ques, what function is run when a joker is removed?

#

im assuming Card:remove() but just to be sure

manic rune
#

whats the cardarea for shops

#

i frogor

daring fern
unborn bay
manic rune
#

mhm thanks

frigid cargo
#

is there a way to change the way the deck acts instead? Because i want to create a specific joker on a deck and the sleeves special feature of that deck is changing it to negative. My first thought was just to check once card is created then just negative it but i was wondering if there might be an easier way to do it?

plain ember
#

Hi guys, does anybody know if there's a way to force trigger jokers, not like a retrigger but like, for example: i have perkeo on my jokers and another joker forces its activation after you discard a card, just an example

daring fern
#

Or just use Cryptids function, if it is installed.

plain ember
#

Honestly haven't checked (nor downloaded) criptid yet, lmao

#

i'll look into it

#

Whats the name of the card that uses that function?

frosty rampart
#

i don't think it's a card, the Hooked sticker forces one hooked joker to trigger whenever the other one triggers and vice versa (the hooked sticker can only ever be applied in pairs)

daring fern
#

But everything related to forcetriggering is in forcetrigger.lua

plain ember
#

Yeah, im seeing it now

#

honestly didn't thought it would be this complicated lol

#

Jesus cooking rice

chrome widget
modern kindle
frigid cargo
#
if self.get_current_deck_key() == "b_btct_DEvil" then
                G.E_MANAGER:add_event(Event({
                    func = function()
                        if G.jokers then
                            SMODS.add_card{ key = "j_btct_EvilAndTwisted2006ChevySilverado", edition = { "e_negative" } }
                        end
                    end,
                }))
            else

What does this crash mean?
-# (the code is not where the crash is btw)

daring fern
frigid cargo
#

oh woops thanks

unborn bay
#

so allat has to be custom

lament agate
#

a little help here?

#
    G.GAME.joker_buffer = G.GAME.joker_buffer - #destroyed_jokers
    G.E_MANAGER:add_event(Event({
        func = function()
            for _, joker in ipairs(destroyed_jokers) do
                joker:start_dissolve({HEX("ff0000")}, nil, 1.6)
                play_sound('slice1', 0.9 + math.random() * 0.2)
            end
            -- trying to figure out how to add all of their sell value to the joker
            card.ability.extra.mult = (card.ability.extra.mult or 0) + total_value
            card:juice_up(0.8, 0.8)
            G.GAME.joker_buffer = 0
            return true
        end
    }))
    return {
        message = localize{type = 'variable', key = 'a_mult', vars = {total_value}},
        colour = G.C.RED,
        no_juice = true
    }
#

in theory, how would i make this so that it gains all of the joker's sell value and put it into its own sell value

daring fern
daring fern
lament agate
#

@manic rune he did answer

#

here's the thing tho

#

it just

#

doubles the player's money

manic rune
#

how

lament agate
daring fern
lament agate
daring fern
lament agate
#

hold

lament agate
daring fern
lament agate
#

what do i do then

daring fern
lament agate
#

right

#

so i just

#

change it to use_joker?

daring fern
umbral zodiac
#

is there an easy way to find what card area i should use based on just the set name of a center

#

in order to support other mods content easily

umbral zodiac
#

rip

daring heron
#

Wait how does someone even make misprint-like text

lament agate
#

can you detect how much cards the player bought?

daring fern
trail tide
#

Do I need to manually put game seed into pseudorandom()? If yes, how do I access it?

lament agate
glass scaffold
#

Will pseudorandom_element(G.P_CARDS, pseudoseed('colr_green')) work in 0711a or does it also need to be converted somehow?

maiden phoenix
lament agate
#

hey, quick refresher

#

what does math.floor do again

cursive gazelle
#

Rounds numbers

maiden phoenix
lament agate
#

got it

#

thanks

#

im trying to fix this one joker

#

it goes into negative mult whenever the game crashes

cursive gazelle
#

What’s the issue

lament agate
#

that

cursive gazelle
#

Can i see the code

lament agate
cursive gazelle
#

Use abs

lament agate
#

there

cursive gazelle
#

I’m on phone, can you screenshot?

lament agate
#

oh

#

hold

#

there

cursive gazelle
#

Can you use

#

Math.abs()

trail tide
#

Huh? It doesn't even say where it went wrong in my code

trail tide
#

I tried removing card_eval_status_check and the G.E_MANAGER:add_event things to check where the problem is, but problem was still here

lament agate
cursive gazelle
#

Nevermind

#

The issue is from the timer