#đŸ’»ăƒ»modding-dev

1 messages · Page 31 of 1

zealous glen
#

hmm

#

Shouldn’t it be card.ability.extra.copied_joker?

fast badge
#

it should, but that shouldnt change the functionality

frosty dock
#

ability gets copied fully, but it happens after the load hook

#

so card.ability isn't yet initialized with these values when using that function

zealous glen
#

If you reset the Sprite in set_ability does that help?

fast badge
#

thats not called on load

#

Also, what you suggested aure, card.ability is nil at the point of set_sprites execution

#

so id have to rewrite some code to catch that, but card.ability is where the part im trying to access is stored so i dont think its gonna work lol

zealous glen
fast badge
#

I thought I tested it last time and it didn't work, but I'll test it again

#

first ill move stuff into extra

frosty dock
#

set_sprites should do for load

#

it's called at the end

#

though maybe there's no reason for the load hook to be this early

fast badge
#

Works now

#

with set_sprites and some nil checks

zealous glen
# fast badge nupp

I have a Joker that has self.ability.extra.whatever = stuff in set_ability and it works

fast badge
#

hmm

fallen tendon
#

oh god sleeping was a terrible idea

#

i have so many bugs to fix

mellow sable
#

I also think there's an issue with the Gear pool from testing but I had several other mods loaded so đŸ€·â€â™‚ïž

fallen tendon
#

@mellow sable did you do anything weird to cause that to happen? iv been trying to replicate it in a game but i got a trowel with it's full uses after already using one fully, and everytime i get a gear from the debug menu it doesn't come back with no uses, and in addition using two gears side by side still gave them individual numbers of uses

mellow sable
#

I had like 10 other mods installed

#

when I was testing

fallen tendon
#

i think it might be a mod you had that interfered with the game's ability to distinguish between instances of an object

#

something definiterly is wrong with the gear pool though

#

it appears that it causes crazy amounts of jokers to spawn if you have one in your consumable area

#

i didn't really define a fallback gear

#

so it defaulted to joker

#

but i still dont know why the pool regards every gear as the same one

#

oh no the pool is more jank than i thought

mint tundra
#
local function fillInDefaults(t,d)
    for k,v in pairs(d) do
        if t[k] == nil then t[k] = v end
    end
end
#

i dont know what went wrong there so i wanted to ask what i have to fix and how

wintry solar
#

t doesn’t exist

gilded narwhal
#

Hey what is this super weird name

gilded narwhal
#

Yo my game is saying edition is nil but I've seen it used before in this exact way

wintry solar
#

That looks correct to me, what situation is it crashing in?

gilded narwhal
#

When there's negative jokers

#

Actually just when there's jokers at all

wintry solar
#

Try putting the card.edition.negative in a separate if block

maiden phoenix
#

Getting somewhere

fallen tendon
#

now that is a cool concept

#

balatromon

#

or balamon

fast badge
#

ballmon

fallen tendon
#

ballman

maiden phoenix
#

I should legally be allowed to murder anyone calling it a pokemon mod balatrojoker

fast badge
#

poketro

maiden phoenix
#

Sucks

fast badge
#

dude downgrading your 1.0.0 mod for 0.9.8 users is pain

unkempt thicket
#

boketro

fallen tendon
#

polamon

unkempt thicket
#

pokeatro

fallen tendon
#

galvanized square steel with eco-freindly wood veneers-mon

#

gsswewvm for short

unkempt thicket
royal ether
#

they gotta make the switch eventually anyways

fallen tendon
#

best solution

#

i really hope that 1.0.0 gets a full release soon

#

and the agonizing bugs with the pools it generates are fixed

#

i buy 1 modded consuable and now the shop is flooded with jokers

gilded narwhal
fallen tendon
#

base jokers

#

space joker's evolution is gonna be AETURNUS, THE ETERNAL LORD OF ALL SPACE AND TIME

#

1 in 2 chance to level up played poker hand

royal ether
#

1 in 2 is too strong with oops

#

1 in 3

#

1 in 2.5...?

fast badge
#

1 in π

royal ether
#

wait is doing fraction odds legal

fast badge
#

Anything is legal

#

Don't quote me on that

maiden phoenix
#

Is there a way to dynamically change a card UI_box content?

royal ether
#

while its being displayed?

maiden phoenix
#

Like if an event trigger similar to a joker context

royal ether
#

cant you just use loc vars for that or are you changing, like badges and stuff

maiden phoenix
#

Not really, because the card value I'm fetching only exists during card addition

gilded narwhal
maiden phoenix
#

And the card object from the UI func isn't really a card 😔

gilded narwhal
#

In fact if I just have "if card.edition then" still doesn't work

royal ether
#

remind me, what does the card object in the ui function contain

#

theres probably a convoluted path to get back to your card

maiden phoenix
royal ether
#

alright im stumped

maiden phoenix
#

I could do a loop trough G.joker.cards if I wanted to maybe đŸ€” That feels so unoptimal lol

royal ether
#

you probably need unique_val for that

#

to handle duplicates

maiden phoenix
#

What's that?

royal ether
#

its just a unique value for every object

#

so you can differentiate 2 exactly the same cards

#

i also dunno what your use case is, so maybe you dont need it

fast badge
maiden phoenix
#

But otherwise I can't just change the uibox content?

wintry solar
royal ether
#

you probably need a way to get back to the actual card object from wherever youre doing your stuff

maiden phoenix
#

I know the card when I do my stuff

royal ether
#

oh

#

you can do card.AUT

#

and modify that

#

i think

maiden phoenix
#

Interesting, I'll give it a look

royal ether
#

that exists only while youre hovering the card though

maiden phoenix
#

I mean that's when info_queue shows up so I guess it doesn't really matter?

royal ether
#

and gets regenerated when you re-hover it

#

yea

#

maybe

#

yea i think its card.AUT.(probably a table name here).info or something for the info queue

#

i havent looked at code in a month so sorry if im wrong

maiden phoenix
#

Eh I'll just experiment, thanks a lot 👍

royal ether
#

idk tho ive never touxhed sort id

#

i usually use unique_val just to check if the card im messing with is the card it should be

#

like "this affects all other jokers" type beat yknow

fast badge
#

Victin (i think it was them) told me to use sort_id to save the joker im looking for

royal ether
#

it probably works fine

#

i just found unique_val first so thats what i ended up using yknow

fast badge
#

yee

#

I woulda too

#

maybe I'll refactor my code to it, eventually

fast badge
#

then probably Math

zealous glen
royal ether
#

yea

zealous glen
royal ether
#

yea

#

every object has .unique_val i think?

zealous glen
#

But I haven't checked to see if it was saved when you saved the game

#

Because Card objects aren't

royal ether
#

dont objects extend nodes

zealous glen
#

huh?

#

That's what I said

royal ether
#

oh you mean like saved saved

zealous glen
royal ether
#

oh

zealous glen
royal ether
#

the way i use it, it doesnt matter what the actual number is

zealous glen
#

Because Card objects aren't saved

royal ether
#

so it can change and the use case still works fine

zealous glen
#

so if the unique ID is saved that helps

royal ether
#

(im literally just checking if card.unique_val == self.unique_val)

#

i dont think its saved

#

pretty sure they get (basically randomly) reassigned when you re-opem the game

zealous glen
#

F

zealous glen
royal ether
#

yea

zealous glen
#

but translated and scaled down

#

for whatever reason

royal ether
#

no biggie

#

serves the exact same purpose

zealous glen
#

I don't think it'd help me

#

If it's not saved

#

Because I'd want a thing to remember a specific card

royal ether
#

you can save a value to the game object

#

in fact, you can save anything to the game object

zealous glen
#

But it doesn't matter because Cards aren't saved

royal ether
#

or you can just add a value in card.ability to check for

#

like to one specific card

zealous glen
#

When you load the game, it recreates every Card

#

So the saved Card doesn't exist anymore

royal ether
#

yea but it has to load the old cards .ability table

#

so you just toss whatever you want to be saved in there

zealous glen
#

card.ability.extra.remember = other_card doesn't work because other_card stops existing between reloads

royal ether
#

card.ability.extra.rememberer = G.game.num_remember
other_card.ability.extra.rememberee = G.game.num_remember
G.game.num_remember++

#

boom

zealous glen
# royal ether boom

that's not helpful because if I need to iterate over every card to find out which card remembers which then there are better ways of doing it

royal ether
#

its not an expensive operation

#

in the grand scheme of things

zealous glen
#

First I'd need a list of all cards

#

then iterate over it

#

for each card that needs to remember another

royal ether
#

thats like, 200, tops

zealous glen
#

(you might be able to do one pass by being smart)

royal ether
#

well if you figure out a way lmk because im kinda curious what a good solution would be

zealous glen
#

Add a Boolean variable to each card and iterate over each relevant card when I want the thing that I want to happen to happen

zealous glen
#

But I don't think there's a master list of all cards

#

although maybe you can do it on Card:load

royal ether
#

oh wait youre remembering cards that dont exist yet?

#

like centers?

zealous glen
#

They're recreated

royal ether
#

yes i know

zealous glen
#

which is why saving the Card object doesn't work

royal ether
#

im asking if other_card is a center or a card

zealous glen
#

For me it was a Card

royal ether
#

what cards are allowed to be other_card?

#

playimg, joker, consumables?

zealous glen
#

yes

royal ether
#

because you can just iterate through the three seperately

zealous glen
#

I was mostly concerned with playing myself but in principle it could be extended to anything

zealous glen
royal ether
#

g.deck

zealous glen
#

aren't they removed from G.deck when they go to other CardAreas

royal ether
#

iirc they arent

#

when i was testing beaver, it upgraded everything i think

#

i could be wrong

zealous glen
royal ether
#

id test beaver again to see for sure, but im not home fr another day or so

#

im pretty sure it has sometjing to do with the translucent cards in G.deck

zealous glen
#

Looking at the sequence of calls they do seem to be removed

maiden phoenix
edgy reef
#

card.AUT doesn't exist.

#

AUT is defined as a local variable in G.UIDEF.card_h_popup, which is equal to card.ability_UIBox_table

#

If you want the ability UIBox table, you check that.

maiden phoenix
#

Yea I know I was just mentioning it to correct him

edgy reef
#

ah

maiden phoenix
#

But its weird cuz it says it's not a table?

edgy reef
#

Is it nil?

#

It does get set to nil when remove_UI is called

#

Might actually return as a UIBox

#

(which is a table so probably not)

maiden phoenix
edgy reef
#

If it's nil then it would return "not a table"

#

Which makes sense, it's only set when the card is hovered.

maiden phoenix
#

So it can't be modified

edgy reef
#

card.ability_UIBox_table is the same as card:generate_UIBox_ability_table()

#

If you need the values you can fetch it from there.

fast mango
#

Hi guys, I'm migrating my mod to 1.0.0 but somehow when I use the function create_card i get this. It works perfectly on the 0.9.8 version

maiden phoenix
#

Thing is it's different from perishable as a mechanic

edgy reef
#

Modify as in add stuff to it?

maiden phoenix
#

Not add, replace

edgy reef
#

The UI is screwed but hey, it works.

zealous glen
maiden phoenix
#

Screw it, no tracking

edgy reef
#

Right now I'm copying how blinds are created in their menu with this as the text info.

#

Copying the name text from a different desc setup since name_text also contains the {C:attention} that I do for the normal description.

zealous glen
fallen tendon
#

also why are thye hexagonal when a d6 is a cube

edgy reef
#

Hexagon is the best shape for that + it's 6-sided.

maiden phoenix
edgy reef
#

Very simple way of representing it.

zealous glen
edgy reef
#

There's a selector sprite drawn to show which one is rolled.

#

It's the white line

#

Oh I know what you mean.

#

Don't like that idea as it means you won't know what the all the sides are.

zealous glen
#

And have the current face display somewhere where you don’t need to click to see

nocturne garnet
#

does anyone just have a joker template of a joker that just gives +4 mult

#

im still confused on how to make one do anything

edgy reef
edgy reef
#

I've made a joker with tons of tooltips, adding another one could cause it to not be visible when hovering.

zealous glen
nocturne garnet
#

i didnt understand the basic mult stuff

#

just pure +4 mult

zealous glen
#

In this case, I’ll let you know you can define an appropriate return as the game collects them and displays an animation

#

I think the context ought to be joker_main, which you’d test for with if context.joker_main then 
 end

#

So it would end up looking something like

function calculate(self, context):
    if context.joker_main then
        return {something goes here}
    end
end
nocturne garnet
#

ty

stray warren
#

What is the context for a joker card that is in the available booster cards to pick from a buffoon pack?

#

I see context.open_booster, but is that for when it's first opened? I see Hallucination uses that

zealous glen
#

You can try set_ability and see if a Joker was created while the state is a Buffoon Pack and the Joker is in the right place

#

As opposed to being in G.jokers

stray warren
#

Oh, I think I see what you mean. Is that section a cardarea perhaps?

zealous glen
#

I don’t know

stray warren
#

I'm gonna try to send some debug messages and figure it out. Maybe it'll show me

zealous glen
stray warren
#

I didn't think of that. That seems much easier

#

It looks like this might be what I'm looking for... checking if G.STATE == G.STATES.BUFFOON_PACK in my calculate_joker function

zealous glen
#

But remember I also said they need to be created in the right place

stray warren
stray warren
#

Wait what about Judgement? I'm not sure I understand

zealous glen
#

<@&1133519078540185692> bot?

zealous glen
#

Including when the state is G.STATES.BUFFOON_PACK

carmine yacht
#

what in the world

limber kraken
#

Lol

carmine yacht
#

oh m ygod i had my phone on in my pokcet

#

sorry about that

livid scroll
#

Yeah that ain't a bot

zealous glen
#

I saw the posts and the bio and I was suspicious

livid scroll
#

People have have links in bio we only band posted links

edgy reef
#

That's a discord feature?

stray warren
zealous glen
zealous glen
#

I still think it’s weird to have it show up on every Joker when the state is that tho

#

As opposed to only the Jokers you don’t yet have

stray warren
#

Yeah, that's true. I probably need to make it that way

wintry solar
#

Is the pack its own cardarea? That would be easy to check for if so

stray warren
zealous glen
edgy reef
#

Guys look.

#

It works

#

And the "text in the corner" is gone (somehow, I've done literally nothing about text)

#

I should add a badge to this.

#

Nah, actually

#

No need

unkempt thicket
#

how do you remove suits, during runtime in 1.0.0?

edgy reef
hallow forge
#

when making a challenge, should i ban blinds that don't effect anything at all in the context of the challenge.

edgy reef
#

There we go

random sleet
waxen turtle
#

Anyone know why context.end_of_round appears to be triggering 3 times at the end of the round?

    key = "test",
    name = "My First Joker",
    rarity = 1,
    discovered = true,
    pos = {x = 0, y = 0},
    cost = 2,
    config = {extra = {Xmult = 3}},
    loc_txt = {
        name = "My First Joker",
        text = {
            "{C:inactive}({C:mult}+#1#{C:inactive} XMult)"
        }
    },
    loc_vars = function(self, info_queue, card)
        return {vars = {card.ability.extra.Xmult}}
    end,
    calculate = function(self, card, context)
        if context.end_of_round then
            card.ability.extra.Xmult = 1 + card.ability.extra.Xmult
        end
        if context.joker_main then
            return {
                Xmult_mod = card.ability.extra.Xmult,
            }
        end
    end,
    atlas = "jokers"
}
edgy reef
#

Because it's called 3 times. Once for jokers, once for cards, and once for repetition.

#

You'd need to specify the CardArea

#

adding and not context.individual and not context.repetition then to the end_of_round check should work

waxen turtle
#

thanks

fast badge
olive shoal
#

if i have an if statement like this is it possible to use lovely to inject another or condition into it? ive tried with no luck

fast badge
#

use the replace at

#

and just copy that line

#

and add your "or" part

#

and add it back

#

pattern = (what you just sent)

#

position = "at"

#

payload = (what you sent + your new or statement)

spice scroll
#

is there a way to alter how many joker slots a joker takes up

zealous glen
fast badge
vivid eagle
zealous glen
#

but as an or it there are no further changes replacing the line with itself plus an or 
 is better

zealous glen
spice scroll
#

probably, yeah

zealous glen
#

To use as reference

spice scroll
#

i also had an idea for a joker today

fast badge
spice scroll
#

not sure, and id have to play around with the values to balance it

zealous glen
spice scroll
#

but the idea is you just keep storing up power

fast badge
#

To see the scaling

zealous glen
#

The scaling is linear but the price is quadratic

fast badge
#

i linear until she quadratic

zealous glen
#

I do like the synergies it enables, but I don’t think it’s worth it

#

Balance-wise currently I mean

fast badge
#

mfw cryptid

spice scroll
#

oh yeah btw i created a github for cardsauce with a list of things i gotta figure out how to do/need help with

zealous glen
#

I think it should be the same card that’s created in the shop so it inherits other buffs

fast badge
#

How hard would it be to have a mod, that holds both Steamodded versions 0.9.8 and 1.0.0 and checks if a mod failed to load with the one and tries with the other instead

olive shoal
#

im using the replace at but im not happy about it because it means if any other mod tries smth similar im boned

fast badge
fast badge
#

then use position = "after"

wintry solar
fast badge
olive shoal
wintry solar
#

It depends what you’re injecting though

zealous glen
wintry solar
spice scroll
spice scroll
#

aight cool i got it working

sonic mortar
#

why can't i for loop this? LambConfused

crisp coral
#

set is in loc_txt

sonic mortar
#

oh, shit i didn't realise lambderp

#

everything is in loc_txt lol

mellow sable
#

lol

fast badge
#

loco loco

zealous glen
#

mojo jojo

crisp coral
#

added a lil icon to my mod

fast badge
#

naw

zealous glen
zealous glen
fast badge
crisp coral
#

😐

zealous glen
fast badge
fast mango
#

is it possible to prevent glass cards from shattering?

mossy robin
#

Hello,
I'm creating a mod and I'd like to create a deck with infinite jokers but after the 4th joker bought, the ante scaling increase
Is there a way to increase ante scaling in the middle of the game?

zealous glen
#

A lovely patch might make it easier to do

mossy robin
#

do you have an idea of how I can do that?

zealous glen
#

Make them shatter more

fast mango
#

i'm trynna make a joker that retriggers glass cards and keep em safe

zealous glen
zealous glen
zealous glen
mossy robin
zealous glen
#

Actually I think I do the code is inside this I think

#

@mossy robin

nocturne garnet
#

what the fuck did i do wrong!!!

#

steamodded v1.0.0-alpha btw

zealous glen
#

You didn’t close some {

nocturne garnet
fast badge
#

nuh uh

nocturne garnet
#

it says specifically on line 65

zealous glen
#

For example, {{{}}, which brackets are paired up? 1 and 5? 1 and 4? 2 and 4? 3 and 4? 3 and 5?

#

It assigns some pairs and returns one bracket it couldn’t match

wintry solar
#

its the card.ability.extra.Xmult right?

nocturne garnet
#

i assume

wintry solar
#

why is that in your return

nocturne garnet
#

wait

fast badge
#

doesnt it need vars= or am i mixing things up

wintry solar
#
return {
  Xmult_mod = card.ability.extra.Xmult
}```
#

I think

fast badge
#

^

mossy robin
mossy robin
# mossy robin Ok so, I tryed your code and I have this error

here is my code
`G.E_MANAGER:add_event(
Event(
{
trigger = 'after',
delay = 0.8,
func = function()
local new_chips = math.floor(G.GAME.blind.chips * IJnewantescaling)
G.GAME.blind.chips = new_chips

            local chips_UI = G.hand_text_area.blind_chips
            G.FUNCS.blind_chip_UI_scale(G.hand_text_area.blind_chips)

            G.HUD_blind:recalculate() 

            chips_UI:juice_up()

            return true
        end
    }
)

)`

zealous glen
#

but you can omit the part that updates the UI for now, probably

mossy robin
mossy robin
zealous glen
zealous glen
#

That’s just if you’re currently in a Blind

mossy robin
#

ye but it crashs my game on start

#

the UI part is good

zealous glen
#

I mean you know you can just no do it

#

Or again you can check if it exists before doing it

fallen tendon
#

so i uh have this joker and its supposed to scale in xmult when consumables are used and decrease when the shop is rerolled, and that part works fine, but any time it creates the little effect for xmult triggers it just says ERROR

    calculate = function(self,card,context)
        if context.using_consumeable and not context.blueprint then
            card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.xmultgain
            return {
                message = localize{type='variable',key='a_xmult',vars={card.ability.x_mult}},
                colour = G.C.MULT,
                card = card
            }
        end
        if context.reroll_shop and not context.blueprint then
            if card.ability.extra.xmult ~= 1 then
                card.ability.extra.xmult = math.max(1,card.ability.extra.xmult - card.ability.extra.xmultloss)
                return {
                    message = localize{type='variable',key='x_mult_minus',vars={card.ability.extra.xmultloss}},
                    colour = G.C.RED,
                    card = card
                }
            end
        end
        if context.joker_main then
            if card.ability.extra.xmult ~= 1 then
                return {
                    message = localize{type='variable',key='x_mult',vars={card.ability.extra.xmult}},
                    mult_mod = card.ability.extra.xmult
                }
            end
        end
    end
}
#

anyone know what's happening

#

also just realized the adding and subtracting mult messages aren't happening either

edgy reef
#

You're not using the correct localization key

#

iirc x_mult doesn't exist

fallen tendon
#

i changed it and it still doesnt work

edgy reef
#

that's... also not a key that exists.

fallen tendon
#

whats a key that does?

edgy reef
#

a_xmult

fallen tendon
#

oh

edgy reef
#

You can check localization/lang file to see all the base game localization keys

#

Or search through the code for times when the localize function is used.

zealous glen
#

Coding isn’t magic

fallen tendon
#

yeah im not stupid

vivid eagle
#

@fast badge this is literally the only code in the mod lol

#

from what autumn said, i have to use the take ownership call on the other spectral cards so smod registers them

fast badge
#

ah yes

#

ill do it later

vivid eagle
#

thank youuu

#

now
off to bed i go

fast badge
#

gngn

fallen tendon
#

they were orignally going to all be editioned and sealed too

#

it appears playing cryptid has completely destroyed my sense of game balance

mellow sable
#

who needs game balance

mossy robin
#

How can I make an event fire if an other event fire?

mossy robin
zealous glen
tepid egret
#

sorry if this question has been asked a million times but you cant load .dlls with with steamodded right?

mossy robin
mossy robin
#

ooooh

#

thx, I'll try

nocturne garnet
#

does the break_positions context not work on steamodded 1.0.0-alpha

#

because my joker needs it to function

#

and so i checked on Bunco mod's Joker Knight

#

and it doesnt have a negative side effect anymore so im assuming its just broken

night pagoda
#

it doesn't exist in the base game

nocturne garnet
#

OH

#

im so stupid lmao

fast badge
#

Can I grab a list of all spectral packs and iterate over them?

#

Also, how can I remove the Mod badge from a joker for example?

#

speaking 0.9.8

maiden phoenix
#

Adding more evolution cond

fast badge
austere schooner
# maiden phoenix Adding more evolution cond

would it be possible to have using a specific spectral card force an evolution on a random joker and have that be the only way to do it
since if so i might be able to get my mod idea back off the ground

maiden phoenix
#

Yea Ig so

nocturne garnet
#

is there a way to check whether or not your jokers have been rearranged

fast badge
#

What exactly are you trying to achieve

nocturne garnet
#

joker that gains mult/chips/Xmult when jokers are rearranged once per round

fast badge
#

You could save the ordering of the jokers in context.setting_blind, and then in the context.joker_main (when it calculates it's scoring) you can check if it has changed. if yes, increase the mult, and also add a boolean that tells you "increased already", and that boolean you only reset when entering a new round (context.setting_blind)

nocturne garnet
#

problem is i dont now where to find the ordering of the jokers

#

if its just how the G.jokers table is arranged then im just confused on something

fast badge
#

in Lua, tables aren't sorted

#

they dont persist their ordering

nocturne garnet
#

OH.

#

no wonder goddamn

#

cant find where to find the ordering of the jokers

#

i tried looking for brainstorm code but its just G.jokers[1]

fast badge
#

You'd have to ask someone more advanced in Lua on how to make sure to go through them by order, maybe using ipairs or iterating using the index, I don't know

unkempt thicket
#

how do you add code to decks in 1.0.0?

wintry solar
#

ipairs(G.jokers) should go through them in the order they are afaik

fast badge
#

that'd be my first try too

tepid egret
#

did you find a fix for this?

mellow sable
tepid egret
#

thx

royal ether
#

chat i am so barack

hallow forge
#

Welcome back

royal ether
#

thanks

edgy reef
#

@brisk pond (moving here since this is related to mod debugging) you should be able to do this and replace the self.effect.config.spectral_rate stuff with G.CerloMod.Milk_Used = 0

brisk pond
edgy reef
#

You don't need to return true btw

brisk pond
mossy robin
#

does anyone tryed to overide any of the base game function to make something work?

unkempt thicket
#

i think im doing this wrong

#

game is loading but nothing is happening

zealous glen
mossy robin
zealous glen
mossy robin
#

how can you do that?

zealous glen
#

Lovely

mossy robin
#

lovely rewrite the majority of the game no?

zealous glen
#

No

#

Lovely just allows you to inject

mossy robin
#

how do you inject some code into an already existing function with lovely?

zealous glen
mossy robin
#

oooooh

#

oki

zealous glen
#

By some way I mean one of the two ways lovely gives you to do that

mossy robin
fallen tendon
#

that feeling when you are stummped for 15 minutes only to find out you are missing a then after an if

zealous glen
mossy robin
# zealous glen You mean to introduce a hook in the middle of the function?

to do that
`local original_set_blind = G.GAME.blind.set_blind

G.GAME.blind.set_blind = lovely.hook(original_set_blind,{
after = function ()
if G.GAME.starting_params.UwU_infinitejoker then
self.chips = get_blind_amount(G.GAME.round_resets.ante)self.multG.GAME.starting_params.ante_scaling*IJantescaling
self.chip_text = number_format(self.chips)
end
end

})`

#

welp, it doesn't work XD

wintry solar
#

have you even looked at the lovely docs?

mossy robin
#

nooo >w<

#

XD

zealous glen
#

Unless you understand what the code does and what you’d rather it do instead

mossy robin
wintry solar
mossy robin
mossy robin
#

ok, the game starts

fallen tendon
mossy robin
#

IT FRICKING WOOOORKS!!!

#

thank you @zealous glen and @wintry solar for helping me

random sleet
#

pretty sure ethereal tags exist

stray warren
fallen tendon
zealous glen
random sleet
#

yes that is the key for the ethereal tag

zealous glen
#

I wonder if this is a steamodded bug @frosty dock ?

edgy reef
#

I do know that the Steamodded API takes ownerships of some objects so that they work.

random sleet
#

it probably has to do with tags not being centers

#

and not being in G.P_CENTERS specifically

edgy reef
#

I wonder if we should add a condition for Steamodded taking ownership of objects so that when other mods want to take ownership of it they're not obstructed.

random sleet
#

take ownership isnt obstructed

#

you can do multiple take ownerships

edgy reef
#

Oh? I thought they were

random sleet
#

mods past the first are added as "dependencies"

#

you can have 200 mods take ownership of the same thing, and it all works out. granted, any conflicts between them might cause problems

#

e.g. if two of them modify the atlas

#

only the last one to load will function

mossy robin
#

what is the most balanced way of modifying the chips of the blind for a deck with infinite joker?

if #G.jokers.cards > 5 then
IJantescaling = math.log(#G.jokers.cards,2) - math.log(5,2) + 1
end

or

if #G.jokers.cards > 5 then
IJantescaling = math.sqrt(#G.jokers.cards) - math.sqrt(5) + 1
end

random sleet
sturdy glen
#

Would a legendary joker that makes it so you can play 6 cards instead of 5 be possible?

#

(i know atleast if it is it would be a lot of work adding in new poker hands, planets, and a lot more...)

crisp coral
#

yes

stray warren
#

So I know G.jokers is for the jokers area, but what is it for cards that are in a buffoon pack?

#

I've been debug messaging for a while now with no luck trying to find it

crisp coral
#

G.pack_cards i think

#

or something similar

fallen tendon
#

huh, so thats how you make a fallback consumable

#

doesnt fix thew stupid everything is a duplicate bug but it's a start

stray warren
# crisp coral G.pack_cards i think

Ok, so is there a way to access the cardarea of a certain joker in this function function Card:generate_UIBox_ability_table()? It doesn't have context as a parameter

#

like the calculate_joker function does

fallen tendon
#

so ive been looking through the steamodded code to find out what the bug could be and i think ive narrowed it down to this

if SMODS.ConsumableTypes[_type] and SMODS.ConsumableTypes[_type].default and G.P_CENTERS[SMODS.ConsumableTypes[_type].default] then
    _pool[#_pool+1] = SMODS.ConsumableTypes[_type].default
#

this is the code that makes it go to the fallback consumable

crisp coral
fallen tendon
#

actually maybe not

#

i genuinely cant tell

#

im unsure of what G.ARGS.TEMP_POOL is in the games code

#

gahhhhhh i cannot understand why this stupid bug is happening

#

seriously why is this stupid function such spaghetti code

#

i can barely understand it

crisp coral
#

thunk moment

fallen tendon
#

i literally cant find out where the hell the section that culls duplicates is

#

this comment isnt being very descriptive

#

considering its for all of this and then even more

stray warren
#

Ok, so it looks like I can just check if self.area == G.pack_cards. I didn't realize Card had it's own area field. That's good to know

fallen tendon
#

this STUPID bug is unfixable

#

why is everything a stupid duplicate??????

zealous glen
#

Do also look at how Steamodded injects into it presumably

brisk pond
#

i'm adding a Tarot that discards all cards from hand. What is the function for it?

zealous glen
#

What function for what

fast badge
#

Discarding cards ig?

brisk pond
#

Like Hanged Man, but without removing the cards from the deck and with all the cards of the hand

#

you just discard the whole hand

zealous glen
#

What part don’t you know

brisk pond
zealous glen
#

You can search the game’s code for how cards are discarded

frosty dock
#

first thing you should think of is if there's a vanilla functionality that does this

brisk pond
#

but I can't find it in the game files

frosty dock
#

There's also The Hook

zealous glen
#

If only there was a word describing the action of discarding one could search for in the files

brisk pond
#

maybe I can tweek this part to make it so that all cards are table.remove'd

zealous glen
#

If only there was a function in that screenshot that could “discard cards from” somewhere

frosty dock
#

the parts that are important to you are add_to_highlighted and discard_cards_from_highlighted

sturdy glen
#

i found the discard mechanic (i think) in cardarea.lua while looking for something else might be wrong sorry if am

#
    if not self.cards then return end
    local _cards = discarded_only and {} or self.cards
    if discarded_only then 
        for k, v in ipairs(self.cards) do
            if v.ability and v.ability.discarded then 
                _cards[#_cards+1] = v
            end
        end
    end
    if self.config.type == 'discard' or self.config.type == 'deck' then
        card = card or _cards[#_cards]
    else
        card = card or _cards[1]
    end
    for i = #self.cards,1,-1 do
        if self.cards[i] == card then
            card:remove_from_area()
            table.remove(self.cards, i)
            self:remove_from_highlighted(card, true)
            break
        end
    end```
brisk pond
# brisk pond

don't understand why in the first loop it is "for k, v". Why 2 variables?

zealous glen
zealous glen
#

It’s related but separate from discarding.

#

Any kind of movement between two CardAreas is treated by the game as a “draw”, so the actual function that moves cards would be something like “draw from hand to discard”, though there’s like 3 or 4 different draw functions inside that one

#

It also doesn’t help drawing also refers to drawing images on the screen

frosty dock
#

thunk moment

zealous glen
#

So the code has a couple of different functions that refer to two different kinds of card drawing

zealous glen
brisk pond
#

I tried with this code and it freezes like this when I use the card, like in an infinite loop

#

do I need to add table.remove() in some way?

zealous glen
#

Compare how both yours and the Hook’s event end

sturdy glen
#

where can i find how the game limits how many card you can play in the code? i am currently looking in common_events but idk if this is the wrong file...

zealous glen
#

I think MystJokers might help?

crisp coral
#

CardArea.add_to_highlighted

sturdy glen
#

i wanted to change the played card limit from 5 to 6 if you have the specific joker

crisp coral
#

oh right there are two

#

that and G.FUNCS.can_play

sturdy glen
#

got it, ty

#

found it in button_callbacks

crisp coral
#

has anyone checked if undiscovered cards display properly in 1.0.0?

maiden phoenix
#

They do

crisp coral
#

hm

#

modded ones also do?

maiden phoenix
#

Oh from my experience modded ones does

#

Didn't try with vanilla

crisp coral
#

ewe

frosty dock
#

I'm not sure how I should have even tried to break vanilla undiscovered cards

crisp coral
#

i wrote my shit incorrectly so i wanted to ask to double check

frosty dock
#

understandable

nocturne garnet
#

would this be sorta balanced

#

i was gonna make it so that it changes whenever it is rearranged but i didnt know how

#

and realized this would make more sense

fast badge
#

how is it getting triggered though

nocturne garnet
#

when the hand is played

nocturne garnet
#

who

nocturne garnet
nocturne garnet
nocturne garnet
#

wait

#

oh my god i might just have been stupid

#

eh this new concept is better

fallen tendon
#

has anyone figured out how to use the custom sound api in steamodded

#

it hasn't exactly been working for me

frosty dock
#

which one?

fallen tendon
#

literally register_sound_global()

#

i dont know where the hell to put it and anywhere i put it chaos happens

#

steamodded reeeeally needs more documentation

honest elbow
#

ahh I hate getting softlocked

#

well or hardlocked

fallen tendon
#

dont we all

honest elbow
#

whatever its called

frosty dock
frosty dock
#

I'm on it when I can, but I'm currently sick in case you haven't heard

#

I don't have anyone else who writes these for me 💀

frosty dock
#

bro didn't wanna waste a word, huh

#

something like "Get well soon" can't be too much to ask for tbh

maiden phoenix
frosty dock
tepid egret
#

Get well soon

mellow sable
#

Get well soon!

frosty dock
#

thanks :)

sturdy glen
#

How do you use process_loc_text correctly? I need to take control of the amount of cards you can play.

fast badge
#

process_loc_text is for the localization of text and not controlling the amount of cards you can play..?

sturdy glen
#

no i want to take over the part after process_loc_text

fast badge
#

what

sturdy glen
#

its from base game code and i thought i needed to localize it for my ability to work

nocturne garnet
#

how do you change values in text?
trying to change the (Currently x time(s)) but i have no idea how

fast badge
#

loc_vars

#

or loc_def

#

depending on your version

nocturne garnet
#

how do you use it

fast badge
#

placeholder in your loc txt and the return in the loc_vars fills it

nocturne garnet
#

well fuck

#

my text has multiple values per row and i think it broke because of that??

nocturne garnet
#

wharg

zealous glen
#

#n# where n is the n-th value

nocturne garnet
#

OH

#

i didnt understand how it worked

#

ty

#

ty it works now!!!!!!

wintry solar
#

if there's a lovely injection that replaces a line, can I use that new line as a pattern?

edgy reef
#

Don’t think so

fallen tendon
frosty dock
#

ty 💀

frosty dock
tepid egret
#

is there currently way to get the profile_tabRef?

#

to edit the profile selector

tepid egret
#

oh i found it it was G.UIDEF.profile_option(_profile)

nocturne garnet
#

i've been making okay-ish jokers really quick

#

god forbid the amazing digital is clown...

maiden phoenix
#

X being in front of the number triggers me

nocturne garnet
#

wait what the fuck why is it there

austere schooner
#

regional difference

#

i think

#

some people say "two times x", some people say "x times two"

nocturne garnet
#

how the hell do you use G.GAME.chips

#

i thought it was a number

#

why is it a table

sonic mortar
nocturne garnet
#

ya

#

steamodded 1.0.0

#

-alpha

mellow sable
#

Talisman makes it a table

#

Because it’s a BigNumber now

nocturne garnet
#

oh

#

i see

mellow sable
#

It works fine with numbers too just comparisons will break

nocturne garnet
#

so how should i get the chips

mellow sable
#

You’d need to do something like:
Big and Big(x) < Big(y) or x < y

#

Anything besides comparisons should just work

#

With both types mixed

crisp coral
#

talisman support scary

mellow sable
nocturne garnet
#

whar.........

#

all i wanted to do was make a chip multiplier......

mellow sable
#

Then you don’t need to touch anything

nocturne garnet
#

i tried but uh

#

didnt work

mellow sable
#

What was the error?

nocturne garnet
#

gimme a sec

nocturne garnet
#

i probably did something stupid

mellow sable
#

Check if Big exists and wrap it around a Big:new(<equation>):to_number() if it does

hallow forge
#

Did you use two dots instead of one?

nocturne garnet
mellow sable
#

Yep

#

Actually there’s a better solution

nocturne garnet
#

and do you mean tostring() instead of to_string() or is it just something i didnt know about

mellow sable
#

Wrap it around number_format()

#

It’ll work with and without Talisman and you don’t need any checks for it

nocturne garnet
long gust
#

x is the times.

mellow sable
sonic mortar
#

it's one card... or is it?

crisp coral
#

hm how do you do formatting with strings in loc_vars

slow ocean
#

we dont pay you to be sick

unkempt thicket
#

we get paid?!?

tawny perch
#

maybe i should ask people to pay me for my 9 hours of work next time

hallow forge
#

you are payed in balatro dollars

tawny perch
#

epic

hallow forge
#

I should probably make another mod, Blackjack Hands went pretty well.

brisk pond
crisp coral
#

because you can only select 5 cards to highlighted

zealous glen
#

What she said

brisk pond
#

So I should be doing something like this?

#

I don't know if there is a way

zealous glen
crisp coral
zealous glen
#

Besides an API hook for Steamodded that adds a new argument, I’m not sure what else could be a good option besides either injecting to use a new global parameter or doing what they suggested

#

I think the global parameter is slightly less likely to break things

crisp coral
#

well you either reimplement discard or you remove highlight limit

zealous glen
crisp coral
#

hm yeah just set a global var

frosty dock
fast badge
zealous glen
#

*starts coding \NL*

maiden phoenix
frosty dock
#

what's this then

#

how many pings would I need to even start getting paid 💀

vivid eagle
#

elloo
anyone know what the key is for the soul crystal?

#

im just adding one.. ""final"" addition to the trans mod

frosty dock
#

the crystal is a floating sprite

fast badge
#

ill aure strikes again

vivid eagle
#

its for the 1.0.0 version

fast badge
#

Still

frosty dock
fast badge
#

the stone does not have its own key / sprite

vivid eagle
#

i got the soul card changed just fine 👍

fast badge
#

Yay

vivid eagle
fast badge
#

its linked to the soul card

frosty dock
#

the weird thing with The Soul is that it doesn't actually have a soul_pos

fast badge
vivid eagle
#

so it doesnt even have an object type eh?

fast badge
frosty dock
#

for this one, you need to mess with a shared sprite

fast badge
#

^

frosty dock
#

since it gets initialized before steamodded loads, just overriding G.shared_soul should be fine

vivid eagle
#

sorry, how do i override G.shared_soul?

fast badge
#

G.shared_soul = (your sprite)

brisk pond
mellow sable
vivid eagle
frosty dock
#

what'd you assign to shared_soul?

vivid eagle
#

the Enhancers png

frosty dock
#

I mean like the exact code

vivid eagle
#

oh sorry
G.shared_soul = "Enhancers-TSpectrals.png"

frosty dock
#

yeah no, it's meant to be a Sprite

vivid eagle
#

oh a sprite is a different thing?

#

i see
sorry, i have no coding knowledge whatsoever

frosty dock
#

G.shared_soul = Sprite(0, 0, G.CARD_W, G.CARD_H, G.ASSET_ATLAS["centers"], G.P_CENTERS.soul.pos)

#

should do fine

#

on second thought, G.shared_soul:reset() is probably good enough

vivid eagle
#

aww it didnt work

#

do i add anything else to the code?

frosty dock
#

"it didn't work" is never specific enough...

vivid eagle
#

oh the sprite didnt change
the soul crystal is still using the vanilla one

frosty dock
#

I don't even know which one of the two things I suggested you tried...

vivid eagle
#

i tried both of them, sorry

frosty dock
#

wait

#

are you replacing the vanilla spritesheets at all?

#

if not, you need to give it your own atlas

vivid eagle
#

is the spritesheet different from atlas?

frosty dock
#

no

vivid eagle
#

this is the asset im using for the centers

#

should i show you the code im using?

frosty dock
#

yeah

vivid eagle
#

this is the relevant code for sprite swapping that im using

wintry solar
#

Omg white text editors

fast badge
#

my eyes are burning

wintry solar
#

I didn’t know people unironically used those

vivid eagle
#

too lazy to change it xd

#

im not a coder

fast badge
frosty dock
vivid eagle
#

ah! okay
so G.shared_soul = Sprite(0, 0, G.CARD_W, G.CARD_H, G.ASSET_ATLAS["TransCenters"], G.P_CENTERS.soul.pos)
like this?

#

actually, i should just try it first

fast badge
#

otherwise G.P_CENTERS.soul.pos will be the wrong position

vivid eagle
#

the game crashed 😭

fast badge
#

mfw

frosty dock
#

you didn't account for the mod prefix, I think

fast badge
#

‌

zealous glen
#

Trainer Nether challenged Wild Aure to battle!

crisp elbow
#

Am I registering for trying to find a flush properly? I feel likemy main concern when it comes to the calc is probably around the self.ability.extra.poker_hand part
https://hastebin.com/share/diqepewaho.lua

frosty dock
crisp elbow
#

I will gladly take any notes

#

first time coding in balator logic

frosty dock
#

First, you need to limit the context of your calculate function or it will literally run all the time, so wrap everything in

#
if context.joker_main then

end
#

you then need to check, also from context, whether a flush is contained

#

you'll want to use context.poker_hands for this - it contains a table for each poker hand

#

you need to confirm that table contains something to know if that hand type is contained

#

So you might extend your check like

#
if context.joker_main and next(context.poker_hands[self.ability.extra.poker_hand]) then

end
#

next there's the issue that you can't have more than one eval status text be returned from your calculate function

crisp elbow
#

so how would I return both mult and chips?

frosty dock
#

there's this helper function

#

while it's bundled into steamodded 1.0, you have to include it yourself in 0.9.8

crisp coral
#

eval_this.png

frosty dock
#

you can give it the card, message and mult_mod or chip_mod and return the other, or use it once for each

crisp elbow
#

So would I be able to implement this code higher up in my script and then refer to it later on? Like taking eval_this and plugging in (j_conniving_joker, mult = 80) or whatever

#

Sorry if I'm asking a lot of questions still a bit eepy

frosty dock
#

you'd give it self as its first argument, then whatever you would otherwise return, something like { mult_mod = 80, message = { key = 'a_mult', ... }

maiden phoenix
#

Joker evo update, I got 10 evolved jokers done, need to add more evo conds for the API and do some spriting

vivid eagle
#

also sorry for replying late
went out to eat

tepid egret
#

yo guys how do i properly get a ref to the Game:update(dt) function

zealous glen
tepid egret
#

ye thanks i already found it, but its much appreciated, new to lua n stuff

nocturne garnet
#

goddamnit

#

cant even use G.GAME.chips without atleast one problem

#

all i wanted to do was make a chips multiplier...............................

fast mango
#

how do we make custom tooltips? I can assign an existing tooltip but when I try to add my own to G.localization.descriptions.Other i just get "error" on the tooltip

#

what's the scope for
G.localization.descriptions.Other['my_key'] = { name = 'My tooltip', text = { 'Fancy text, and', 'even more fancy text.', 'Var 1: {C:attention}#1#' -- this will display 10 } }

frosty dock
fast mango
#

the most recent one

#

the wiki isn't updated 😱

frosty dock
#

1.0 alpha or 0.9.8? that was not of help

fast mango
#

alpha

frosty dock
#

I'm currently sick so I can't do much

#

you need to put it inside this

fast mango
#

it's okay man haha

frosty dock
#
function SMODS.current_mod.process_loc_text()

end
unkempt thicket
frosty dock
#

adding that was needed due to the language API requiring and additional reload of localization

#

np

remote coral
nocturne garnet
#

how do i find the goddamn chips!!!!

mellow sable
#

type(<chips>) == 'table' and (<chips>):to_number() or <chips>

#

where <chips> is whatever expression you use for the chip calculation

#

@nocturne garnet

nocturne garnet
#

ty

#

ill try

tepid egret
#

Anybody know how to check for the current stake of the run??

hallow forge
mellow sable
#

nice

hallow forge
#

although this has a few function overrides which mess with the function logic it may be hard to make this compatible with other mods

#

this is a blackjack

mellow sable
#

6+4+2+2+7=21

hallow forge
#

indeed

#

Splash + uno poker cards is OP

unreal nacelle
#

Why is a Reverse counted as a 7? XD

wooden nexus
unreal nacelle
#

Fair point. I mean, with +2s and +4s, that at least makes sense.

#

Also, just imagine having Splash, then playing a 4oaK hand with four +4s and a Reverse at the end. +32 in card advantage

hallow forge
unreal nacelle
#

I mean, I wasn't saying it was a bad thing that Reverses were 7s. If anything, I would've thought that they'd be treated as 3s

hallow forge
#

Not too sure what to do for skips tho

zealous glen
hallow forge
#

Not that kind of skip

hallow forge
hallow forge
zealous glen
stray warren
#

Am I doing something wrong? I'm trying to create a custom info box, but I keep getting this error. Here's the code:

local generate_UIBox_ability_table_ref = Card.generate_UIBox_ability_table
function Card:generate_UIBox_ability_table()
    local generate_UIBox_ability_table_val = generate_UIBox_ability_table_ref(self)
    local info = generate_UIBox_ability_table_val.info

    if self.ability and self.ability.set == 'Joker' then
        info[#info + 1] = {
            {
                {
                    {
                        config = {
                            scale = 0.32,
                            colour = {
                                0.1,
                                0.1,
                                0.1,
                                1
                            },
                            text = tostring(self.sell_cost)
                        },
                        n = G.UIT.T
                    },
                },
                name = "Sell Value"
            }
        }
    end
    return generate_UIBox_ability_table_val
end
sturdy glen
#

how can i make this basegame code local for my joker? (process_loc_text is my part i saw someone else use it but im not using it correctly...)

unreal nacelle
fallen tendon
#

day 395 of patiently waiting for someone to figure out how the hell you use the sound api

elfin nimbus
#

How would I go about checking if a specific Joker triggered its ability?

shell tangle
#

I've gotten this to work through just overwriting the entire function from the source code in a lua file, so I know this part at least works, however, whenever I tried to move it into a .TOML file, it seems to just not apply. Anyone have any ideas? Alpha steamodded, and lovely 0.5. It also throws an error whenever I get rid of the "match_indent", however, the patch counter to the file I'm writing to doesn't seem to change when it's added or removed.

frosty dock
fast badge
#

đŸ€”đŸ’­

fast badge
frosty dock
crisp coral
#

no more

fast badge
frosty dock
#

annoyingly

#

I will not engage furtherly

fast badge
#

accidentally?

frosty dock
fast badge
#

tbh i dont get whats so funny about thisly

spice scroll
#

anyone know how context.other_joker works lol

#

wanna get a joker to trigger something when a specific other joker is in your slots

fast badge
spice scroll
#

well i figured id use baseball card as a blueprint

#

and that uses context.other_joker

fast badge
#

Aha

fast badge
#

so youd check for if context.other_joker.ability.name == <xyz> i guess

spice scroll
#

which file are you on where youre seeing what it does?

fast badge
#

card.lua

spice scroll
#

would context.other_joker.config.center.name work? not seeing where context.other_joker has children

#

or whatever theyd be called

#

i forgor 💀

spice scroll
#

yeah i saw but the way my jokers are set up they dont rly have ability names like the vanilla ones do

fast badge
#

Well you should

#

It's the normal way jokers are handled

#

If you don't that'll ensure that your mod is compatible with like, 0 other mods

spice scroll
#

dang

#

but also

#

i just got it working LMAO

fast badge
#

mfw

frosty dock
#

literally the entire reason we use keys for everything is because names are prone to overlaps, causing deadly incompatibilities

crisp coral
#

the piggy bank incident

frosty dock
#

i don't even a way you could have been more wrong there nether

#

(I'll admit the game sometimes expects a name to exist and has freaked out for no reason)

#

but that's beyond the point

frosty dock
fast badge
#

Just saying that it might kill itself due to nil values

frosty dock
#

it doesn't

fast badge
#

shut

#

no Döner for you

frosty dock
#

names are, by definition, not keys

frosty dock
fast badge
#

nerd

frosty dock
#

no u

crisp coral
#

here we go again sigh

fast badge
#

sighly

fast badge