#💻・modding-dev

1 messages · Page 37 of 1

edgy reef
#

It does

solemn coral
#

Aaah okay that's a bit safer then

crisp coral
#

except people are dumb most of the time

solemn coral
#

Still would prefer Discord didn't allow them at all, but as long as they show the real link before loading any of the page they're at least making an effort I guess

solid salmon
#

oh shoot i need to patch my mod

mellow sable
#

They should allow markdown links but not to spoof links

#

Check if it looks like a link with regex or something

crisp coral
#

maybe i should put all the badge colors into G.C...

solid salmon
#

Guys is it ease_joker_slot or ease_joker_slots?

crisp coral
#

neither

#

read Antimatter's code or some Cryptid ones

mellow sable
#

Negative Joker

edgy reef
#

It should be a CardArea function, no?

#

iirc

mellow sable
#

I think you just change the number of joker slots manually

solid salmon
#

i can't find it in your source code

mellow sable
#

Epic Jokers.lua

glossy stump
#

hello, sorry if this has been asked before, is there any resources or documentation for developing the mods? im having trouble understanding the example mods

crisp coral
#

don't look at example mods, most of them aren't updated

#

look at Lua documentation for how the language works, and the source code for Balatro and other mods to know how a mod works

glossy stump
#

where can i find balatro source code?

solid salmon
pine trellis
solid salmon
#

then do 7zip --> open archive

glossy stump
#

thanks! i'll check it out

solid salmon
#

ok

#

final product

#

this is my yellow deck joker suggested by denver

#

Imma sleep

stray warren
#

Is this an issue :: WARN :: DefaultLogger :: Duplicate Mod prefix joke used by JokerSellValue, JokerDisplay

#

Because my game is not loading JokerSellValue in-game and I can't figure out why. But Lovely is acknowledging its presence in the terminal

edgy reef
#

Do you have a defined mod prefix?

#

If you don't it'll use the default which would match with JokerDisplay (if it also uses default).

stray warren
#

My mod doesn't add any content that would use a prefix though

edgy reef
#

Steamodded still checks anyways.

stray warren
#

That wouldn't be the issue of strictly not loading my mod in-game, would it?

edgy reef
#

That's what happens when a mod triggers this type of error.

stray warren
#

How do I implement my own prefix?

edgy reef
#

--- PREFIX: asdf Add this to the main mod file header

stray warren
#

That fixed it. Thanks!

rough furnace
unkempt ridge
fast badge
#

real af

#

im stealing that

zealous glen
#

Is that Monika

unkempt ridge
#

Just monika

fast badge
#

she just a goofy goober

zealous glen
#

She’s a goofy goober, yeah

night pagoda
#

another fluorescent iteration

solid salmon
#

wait are chips usable like self_ability_mult

solid salmon
#

found out that it's called self_ability_extra

fallen tendon
#

Lol no thats just the config

#

Used to change the values in jokers at a glance

#

But yeah it does the same thing

solid salmon
#

as chips

fallen tendon
#

Well im pretty sure the game uses self.ability.chips

solid salmon
#

oh

#

that was my first thought

fallen tendon
#

Also why are you putting underscores instead of periods

solid salmon
#

betmma told me to

fallen tendon
solid salmon
#

wait

#

it actually is periods

fallen tendon
#

Or you could make extra = {chips = value}

fallen tendon
solid salmon
#

ok

fallen tendon
#

Periods indicate that its a series of variables inside each other

#

Also im pretty sure using self.ability is weird in steammodded, you could hse self.config or card.ability

solid salmon
#

i did

#

i keep on texting the wrong things

#

this crashes the game

fallen tendon
#

You are approaching this completely wrong

#

First, learn lua, that is not how in pairs works

#

Second, just use campfire context in the calculate function so you dont need to hook

#

Oh also you are saving a variable to uhhhh absolutely nothing whatsoever

#

yellow_deck_joker has not been declared at all in the code so jokers becomes nil (the absence of any meaningful value, different from 0 or false)

frosty dock
#

i seriously can't with this

fallen tendon
solid salmon
#

i read that

fallen tendon
#

Im not sure he has read any of it

solid salmon
#

not entirely

#

but read some

fallen tendon
#

Ok what is a boolean

solid salmon
#

dude

#

im on vacation

#

im on freetime

fallen tendon
#

That was the sixth page

frosty dock
crisp coral
#

based

solid salmon
#

fine you want me to read ill read

fallen tendon
#

Ok

solid salmon
#

and take notes

fallen tendon
#

Great idea actually

solid salmon
#

so far i am at chapter 2

fallen tendon
#

Right now, chapter 5

solid salmon
#

ok

brisk pond
#

I just copied the load line and changed it to load the Zorro file, and put 01_Zorro.lua in the jokers folder

#

if I delete the load line from main file, the game loads perfectly

#

line 202 is load(NFS.read(SMODS.current_mod.path .. 'jokers/01_Zorro.lua'))() just after -- JOKERS

wintry solar
#

is your Zorro file the same as your others?

#

also missing curly bracket on config

#

missing end in your calculate function

solid salmon
#

I read chapter 5

outer hedge
#

why did my code trigger 12 times

        G.E_MANAGER:add_event(Event({
            func = function()
                local card = create_card('Joker', G.jokers, nil, nil, nil, nil, 'j_madness')
                card:add_to_deck()
                card:set_edition({
                    negative = true
                })
                card:set_eternal(true)
                G.jokers:emplace(card)
        return true; end}))
        G.E_MANAGER:add_event(Event({
            func = function()
                local card = create_card('Joker', G.jokers, nil, nil, nil, nil, 'j_riff_raff')
                card:add_to_deck()
                card:set_edition({
                    negative = true
                })
                card:set_eternal(true)
                G.jokers:emplace(card)
        return true; end}))```
#

(the if self.effect.config.deck_insanity then does end but it's after this part of the code)

outer hedge
outer hedge
# outer hedge and it decided to now work fine?

i made it log when the functions were called and the "This is an info message" message doesn't exist in the code

        sendInfoMessage("deck_insanity function called", "InfoLogger")
        G.E_MANAGER:add_event(Event({
            func = function()
                local card = create_card('Joker', G.jokers, nil, nil, nil, nil, 'j_madness')
                card:add_to_deck()
                card:set_edition({
                    negative = true
                })
                card:set_eternal(true)
                G.jokers:emplace(card)
        return true; end}))
        G.E_MANAGER:add_event(Event({
            func = function()
                local card = create_card('Joker', G.jokers, nil, nil, nil, nil, 'j_riff_raff')
                sendInfoMessage("Card Created!", "InfoLogger")
                card:add_to_deck()
                card:set_edition({
                    negative = true
                })
                card:set_eternal(true)
                G.jokers:emplace(card)
        return true; end}))```
solid salmon
#

Before you get mad at me i did read the book to chapter 6

#

nvm

fallen tendon
#

Thanks so much!!!!

#

So now can you tell me what a boolean is?

outer hedge
fallen tendon
#

I was talking to @solid salmon

#

Well guess i need a different easy question now

solid salmon
#

looking at my notes

#

its a true or false values

#

like Print(true)

fallen tendon
#

Ok

#

What is an index in a table?

solid salmon
#

I need to get better notes of that

fallen tendon
#

Its the label for the data in the table

#

When constructing a table, its the first part, {index = value}

solid salmon
#

1 =red

#

2= gren

#

3= blue

#

like that?

fallen tendon
#

Ye

#

1 2 and 3 are indicies

#

You can get their value by doing table[index]

solid salmon
#

alright

fallen tendon
#

How do you do concatenation?

solid salmon
#

a = hello

fallen tendon
#

No

#

That is defining a variable

solid salmon
#

bascially the ..

fallen tendon
#

Oh ok

#
if x > 2 then
   y = 5
else
   if x > 1 then
      y = 2
   end
end

How would you make this with only 1 end?

solid salmon
#

i need better notes of that

fallen tendon
#

Its contained inside the book

#

Maybe try visiting the page for the things that are making the ends neccesary

solid salmon
#

ok

#

imma go back to fixing my mod

fallen tendon
#

Well im glad you know lua a bit more

#

Maybe you might be able to figure out why your syntax isnt correct

solid salmon
#

I mean it's getting easier now

#

so yeah it does help

fallen tendon
#

I would reccomend you try looking at the game code again with your new knowledge

#

You might understand a lot more

solid salmon
#

That's what i am doing

#

also debug doesn't work for me

fallen tendon
#

???

#

The crash reports?

#

Or is it the debug messages

#

Those are on the lovely command screen that pops up

solid salmon
#

no im using 1.0.0

#

and seems to only work for 0.9.8

fallen tendon
#

Yeah uh it works

#

And you still didnt answer which one it was

solid salmon
#

it doesn't work for me

rough furnace
#

What isn't working?

solid salmon
#

debug

rough furnace
#

Debug mode?

solid salmon
#

ye

rough furnace
#

Is there an fps counter in the top right?

solid salmon
#

i gotta check

#

No

#

it just shows the red !

rough furnace
#

Oh

#

I thought 1.0 enabled debug mode by default, but if not, I know debug plus works on it as well

solid salmon
#

do i just download the source code

rough furnace
#

Yeah and stick it in the mod folder

solid salmon
#

i did that

#

but no fps count

rough furnace
#

Try holding tab

solid salmon
#

nope

rough furnace
#

What's the folder for debug plus look like?

solid salmon
#

DebugPlus-Master

rough furnace
#

Make sure it's only one level

solid salmon
#

now it has one level

#

now it works

#

back to work

#

could rocket be a good base for the yellow deck joker

fallen tendon
#

Yeah

#

Try to find the part that triggers on boss blind defeat

solid salmon
#

apparently it's this

fallen tendon
#

Yup

solid salmon
#

but everytime i try it

#

the game crashes

fallen tendon
#

What are you using it in?

solid salmon
#

this may be stupid

fallen tendon
#

Ok the big joker table doesnt have a curly bracket

#

And you have an unnecessary comma

solid salmon
#

ooooh

#

wait

fallen tendon
#

You should maybe try to pull your ease dollars code from a joker that gives money directly

solid salmon
#

like golden

fallen tendon
#

You need a little more critical thinking with finding syntax errors

#

The crash log gives the exact line that the error is occuring in

#

So you should just double check everything around there

solid salmon
#

it says 115

fallen tendon
#

You didnt give me the line numbers

solid salmon
#

full image

lusty epoch
#

did you forget that

solid salmon
#

ah

fallen tendon
#

Yeah

#

Instead of asking us the instant something goes wrong

#

Look at the line number on the crash log

lusty epoch
#

I also see a few issues with it's effect in general

#

what is it supposed to do in the first place

fallen tendon
#

Give 12 dollars when boss blind is defeated

#

Oh i kinda realized

#

That needs to have the blind defeated context

solid salmon
#

i saw it

lusty epoch
#

yeah you don't need line 115 in that case

#

that would make it scale by +12

#

plus ease_dollars was hardcoded so it won't even do anything lmao

fallen tendon
#

Try to steal code smartly

#

Dont just completely take an entire jokers code, take only the pieces that are relevant

solid salmon
#

okay

rough furnace
#

Isn't there a payout api for this?

edgy reef
#

calc_dollar_bonus iirc

quasi kettle
#

Does anyone have an example for modifying an existing joker? None of the examples modify existing and I can modify the calculate code I can’t manage to change the description for a card

quasi kettle
#

Working on 0.9.8 but either would be helpful

frosty dock
#

for 0.9.8, you need SMODS.Joker:take_ownership('joker'):register(), then modify whatever you need inside SMODS.Jokers['j_joker'], where j_joker is the key of whatever joker you're trying to modify

#

to change the description, you can set a loc_txt on it

solid salmon
frosty dock
#

it's slightly different for 1.0, you don't need the register call, and whatever changes you need on the joker go directly in the call as a second argument

#
SMODS.Joker:take_ownership('joker', {
  loc_txt = {
    -- description text goes here
  }
})
quasi kettle
#

Tysm I was so confused why I was able to modify the code but not the description but that makes sense

frosty dock
#

for 0.9.8 only, you can also change the description text directly via G.localization.descriptions.Joker.j_joker

solid salmon
#

I literally can't

frosty dock
#

G.GAME.blind.boss is converted to a boolean for some reason

#

you need the config object instead

#

that is G.GAME.blind.config.blind.boss

solid salmon
#

so put config.blind

frosty dock
#

and yes that's atrocious

#

but that's how it is

solid salmon
#

ok

#

it works

#

but

#

no money

frosty dock
zealous glen
#

How do I test if the round's current Boss is a Showdown Boss?

#

I thought the value of G.GAME.round_resets.blind_choices.Boss.showdown would tell but it didn't

solid salmon
#

is there a thing called G.C.MONEY?

#

what does this mean?

#

I know its a syntax error

#

but still

rough furnace
#

Probably your ide thinks the variable G is not defined

frosty dock
zealous glen
#

G is table that contains the table C that contains some value YELLOW that corresponds to a color defined by thunk or yourself

zealous glen
#

I want to reroll if it's not a Showdown Boss

frosty dock
#

G.GAME.round_resets.blind_choices.Boss.config.boss.showdown, probably

#

if I know anything about blind choices having a config which is the proto blind object

#

but I was just going to bed and won't bother confirming

solid salmon
#

bruh but what makes

zealous glen
#

I thought it would've been Boss.showdown because the return of get_new_boss() is stored there, which I thought would've been an object with that attribute

solid salmon
#

different from

zealous glen
solid salmon
#

how can i make it exist?

frosty dock
zealous glen
#

wait maybe it's Boss.boss.showdown

wintry solar
#

But also

#

Your return is broken

zealous glen
#

also neither of ours worked

solid salmon
wintry solar
#

you say return variable {table

#

also money isn't a thing

solid salmon
#

dollars

wintry solar
#

no

#

money_mod = money this is completely broken

solid salmon
#

saying that money isn't thing

solid salmon
wintry solar
#

no, like, you're just making up variable names randomly

#

the code can't read your mind

solid salmon
#

oh

wintry solar
#

you have to give it precise instructions

#

if you ask it to do something using something you haven't told it, it will break

#

if you give it instructions formatted in a different way to what it expects, it will break

solid salmon
#

is it possible to just

#

not have color?

wintry solar
#

the colour isn't the main problem

solid salmon
#

the _mod

wintry solar
#

the _mod, the money, the brackets, the return

#

almost everything else

#

the colour is fine

solid salmon
#

brb

zealous glen
# zealous glen also neither of ours worked

@frosty dock No config. It turns out G.GAME.round_resets.blind_choices.Boss is just a string and one needs to use that string as the key to G.P_BLINDS to manually retrieve the data

solid salmon
wintry solar
#

look at how the game already does similar effects

#

I mean, it won't complain at you using money_mod, it just won't do anything

zealous glen
solid salmon
wintry solar
#

why don't you try and figure it out yourself?

zealous glen
#

New Joker:

Lvl. ? Death
X3 Mult if level of played hand is a multiple of 3

#

@solemn coral's Joker reminded me of DotA 2's Doom's old ability which was a reference to a Final Fantasy ability

wintry solar
#

I'm sure these jokers are great but none of your videos load for me

tepid egret
#

newest steamodded alpha does this on startup, it worked with the version from like a couple weeks ago, is there any quick fix? (btw whats happening is that the main file tries to load a different file in the mod directory with require)

zealous glen
#

But sometimes I also have Discord video loading issues

#

especially on mobile

wintry solar
tepid egret
#

hm i guess thats new

#

thx for the answer tho, ill try it out

#

yup that fixed it

#

thanks a lot!

solemn coral
#

Funnily enough, TWEWY has a reference to that same ability with Minamimoto's Level i Flare, which hits all targets whose levels are divisible by i (which would be any number real or imaginary)

zealous glen
#

I thought the requirement of being level 2 was interesting though difficult, which quickly led me to think about Doom's old ability

solemn coral
#

Yeah I'm debating about changing my requirement to any level 2 or greater instead of exactly 2

#

Still different enough from your idea that I'd enjoy playing with both!

zealous glen
solemn coral
#

Multiple of 2 feels too similar to your idea. Maybe keep it at exactly 2, but scale it up to x2.5 Mult?

zealous glen
#

I mean I don’t mind it being similar if that’s what’s bothering you

solemn coral
#

Nah, I just want to jokers that force you to approach them in different ways

zealous glen
#

I think that making it exactly 2 is more interesting if you can reduce levels

#

For example

#

Anther Joker idea which I have to port to 1.0.0 grants 2 levels to a random hand and -1 level to another random hand

#

(IIRC Bidoof gets Moody)

solemn coral
#

Oooh, good idea about reducing levels. I'll try to throw in a joker or two that does that in my mod

zealous glen
#

Cryptid also had a way to reset levels

#

IIRC

solid salmon
#

so i tried this

zealous glen
solemn coral
#

Is there a way to use the create_card(_type, area, legendary, _rarity, skip_materialize, soulable, forced_key, key_append) to create a playing card of a specific rank, but still with a random suit?

#

If not, is there a way to make one with a specific rank and suit, and I'll just manually randomize the suit?

zealous glen
#

Do what the Numbers Spectral does but for ranks

#

I mean, the suits are already random, so actually

#

Just copy Grim

solemn coral
#

Oh duh why didn't I think of looking there

zealous glen
#

Balatro modders when they want to mod: “wait that’s already in-game”

#

It’s me I’m Balatro modders

#

Luckily I didn’t fall to that trap earlier today when I noticed I didn’t need to inject into the boss reroll function to make it free

solid salmon
#

I am going to lose my mind

solemn coral
#

Has anyone else had an issue where lovely patches would keep being active even when they shouldn't?

crisp coral
#

how so?

solemn coral
#

I wrote some lines in a patch, tested them and found they didn't work, deleted those lines (but not the whole patch), and when I'm reloading the game it's still giving me that error

crisp coral
#

did you save the patch??

solemn coral
#

Yes, it says it's all saved

crisp coral
#

weird

solemn coral
#

Maybe not?

#

Just reloaded the game again and it's working this time

#

Weird.

solid salmon
solemn coral
#

Okay, it's working for some definition of working

edgy reef
#

Blinds are starting to get on my nerves.

solemn coral
#

I'm trying to make a joker that sets all cards in Standard Packs to your last played high card value, and I think something went wrong.

edgy reef
#

How are you creating the effect?

solemn coral
#
pattern = '''card = create_card((pseudorandom(pseudoseed('stdset'..G.GAME.round_resets.ante)) > 0.6) and "Enhanced" or "Base", G.pack_cards, nil, nil, nil, true, nil, 'sta')'''
position = "at"
payload = '''
if G.GAME.twewy_playmate_beam > 0 then
    _suit = pseudorandom_element({'S','H','D','C'}, pseudoseed('playmate'))
    card = create_playing_card({
        front =  G.P_CARDS[_suit..'_'..6],
        center = G.P_CENTERS.c_base}, G.pack_cards, nil, nil, nil)
else
    card = create_card((pseudorandom(pseudoseed('stdset'..G.GAME.round_resets.ante)) > 0.6) and "Enhanced" or "Base", G.pack_cards, nil, nil, nil, true, nil, 'sta')
end
'''```
#

(Right now it only creates 6s, I'll get it to read the actual value soon)

crisp coral
edgy reef
#

Super thing? The 'k_na'?

#

That's in my en-us.lua file.

#

Also loaded with the same key in D6 Jokers so even if it failed it should show up anyways.

crisp coral
#

im not fucking joking

#

you have to do thos

#

lmao

edgy reef
#

???

#

HUH

crisp coral
#

it's stupid

#

but you have to do this

edgy reef
#

Uhm

#

Is there a issue with this on Steamodded yet?

#

This should probably be addressed xdd.

crisp coral
#

not that i'm aware of

solid salmon
#

hey myst

crisp coral
edgy reef
solid salmon
crisp coral
#

just. say what your issue is.

solid salmon
#

game crash when me want moneu

#

...

edgy reef
#

Card is capitalized, it should be card

solid salmon
#

i keep forgetting

#

it's case sensitive

crisp coral
#

post your entire code around line 29

solid salmon
crisp coral
#

is. is this

#

fucking outside

#

💀

#

put that in the loc_vars function

solid salmon
#

like this?

crisp coral
#

you don't seed to check for name

#

otherwise, looks fine

solid salmon
#

so remove the name?

solemn coral
#

You remove the if statement that checks for the name

solid salmon
#

IT FINALLY WORKS

#

🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉

#

i can sleep now

#

GN

sly forge
# crisp coral

Everyone- don't use self.super, it's actually wrong. use the explicit name of the class

#

self.super is the superclass of self, which could be a deep subclass of your object's class

crisp coral
#

if it works it works

#

:clueless:

abstract venture
#

chat how do i check rarity of cards

#

i thought it was this but it aint doing anything when i have a rare card

#

even taking out ability dont do it

edgy reef
#

Have you tried the card's center?

#

That should have the rarity.

#

G.jokers.cards[i].config.center.rarity

barren urchin
#

.

abstract venture
#

ohh ok i can try that

#

that makes more sense

#

it didnt wahhh

#

im using steamodded 0.9.8 btw idk if its different on that

edgy reef
#

Are you sure it's that line that's the problem?

#

It's basically how Baseball Card does it but context.other_joker would be the same as G.jokers.cards[i]

abstract venture
#

ah

edgy reef
#

So it should work unless something else is wrong

abstract venture
#

yea im making a baseball-esque joker

#

yea

edgy reef
#

What is the effect btw?

abstract venture
#

x2 for every rare but that might be too strong 😭 but im at least trying it

#

heres the full thing

#

last thing is just checking if its debuffed

#

when i didnt check for count > 0 it would display x1

#

so it still gave the mult it was just not getting any count

#

¯_(ツ)_/¯

#

ty tho capylove

rough furnace
#

ooh I just had a good idea

edgy reef
#

YOO

abstract venture
#

yo???

rough furnace
#

I'll probably not show the mass of steamodded stuff that happens before it can show, but then it shows all logs temporarily as it happens

#

Should I enable the log showing thing by default?

zealous glen
sly forge
#

you don't- the class of self is always constant. you'd write SMODS.Blind.super.process_loc_text(self)

#

or similar

zealous glen
sly forge
#

if it's not a subclass of Blind, then your function wouldn't be called in the first place

#

actually, it might not be SMODS.Blind depending on what Myst meant to do. if it was for an object of class Blind then it'd be SMODS.Blind.process_loc_text(self)

#

but, the main point I wanted to say is that self's class is whatever it is, so self.super is always wrong and can cause an infinite loop if you're not careful

frosty dock
#

It won't cause an infinite loop, since self.super is never the object's own class

#

however if you extend a class that uses self.super in a function, and you don't change that function in the subclass (as is the case with SMODS.Center.process_loc_text, for example), that function will be called twice

#

e.g. the method on SMODS.Joker is called, then self.super refers to SMODS.Center, which has the same exact method declared

sly forge
frosty dock
#

they aren't

#

it's all tables

sly forge
#

the way they are implemented means they are

frosty dock
#

but super doesn't change on objects

sly forge
#

I mean, super on an object isn't the object's class, it's the object's class's superclass

#

in javascript it's just a chain of prototypes

#

specifically the way Balatro's object code is implemented means the relationship between an object and a class ends up different from the relationship between a subclass and a class

frosty dock
#

use getmetatable and you get the same javascript relation

sly forge
#

there's differences in how underscore methods are handled in the two cases

#

bunch of subtle details

frosty dock
#

the metatable chain goes object -> class -> superclass, while super cuts directly to the superclass

sly forge
#

yes, that's what I mean

#

ok, we are maybe talking about the same thing, sorry

solemn coral
#

Question about data being saved between exiting and reloading the game - I was told that anything you write to G.GAME would be safe and stay there even if the game was closed and reopened. However, I'm looking at the Codex Arcanum mod to see how creating temporary cards works, and it looks like they're writing to G.deck.config. Is that also a safe place to write to?

crisp coral
#

cardareas are also safe

#

(jokers, consumeables, deck, etc.)

solemn coral
#

Aha, makes sense. Thank you!

zealous glen
#

AFAIK temporary cards need a variable to track that they’re temporary, and you can’t remember specific cards, but I haven’t looked at how Codex does it

#

I mean, not that they need it, it’s just that the obvious alternative doesn’t work very well since you can’t remember specific cards

#

I also wanted a shader for temporary cards

frosty dock
#

can't you just have some flag like card.ability.temporary?

zealous glen
#

That’s what I said

frosty dock
#

ah alright

solemn coral
#

Oh I would love that. Right now it looks like what CA is doing should be working, but definitely having a full API for it would be better.

frosty dock
#

I wasn't sure what you meant by not being able to remember specific cards

zealous glen
frosty dock
#

ah

#

doesn't that also have the issue of no longer being temporary if the other card is sold

zealous glen
#

That’s not an issue

#

That’s a feature

frosty dock
#

that's unintuitive at best

zealous glen
#

No?

#

When round starts, create CARD
When round ends, destroy CARD

#

It’s very intuitive it isn’t destroyed it the source of the effect isn’t present

frosty dock
#

if phrased like that, it is

solemn coral
#

The way CA makes its temp cards is with its Alchemic Cards, which don't really exist to be present at the end of the round since they're consumables.

#

So I wouldn't really find that intuitive

frosty dock
#

if cards are created with a temporary property, their source shouldn't matter

zealous glen
#

Create a temporary CARD
is different from the aforementioned effect

frosty dock
#

ik

zealous glen
#

But I don’t know a good way of implementing it

frosty dock
#

i mean it can be a sticker

zealous glen
#

And by good I mean O(1)

zealous glen
#

And make it not copiable by default

solemn coral
#

I was thinking if I needed to show the effect I could look at the badges that LobCorp uses for some jokers like the ||Wee Witch's Gifts||

frosty dock
#

by that I mean using the sticker API

#

it can't be O(1) if the source matters unless the card knows its own source

zealous glen
frosty dock
#

whatever

zealous glen
frosty dock
#

that is if the source destroys the card

#

not if the card destroys itself

zealous glen
#

Yeah

#

Why would the card destroy itself

frosty dock
#

because it may be wanted behavior to destroy the card even if the source is destroyed?

zealous glen
#

Then you don’t need to remember the source

#

And it doesn’t need to be the card, it can be the game rules destroying the card

frosty dock
#

by the card destroying itself, I mean an effect initialized by the existence of the card, not the source

#

if you take it too far, it's always the game rules doing something

zealous glen
#

I think saying that a card does something if its calculate function is ran it’s intuitive

#

And likewise for other functions like set_ability, etc.

#

But otherwise it’s another game object

frosty dock
#

in the same way there's calculate_rental called from end_round

#

this is sort of comparable

zealous glen
#

I wasn’t thinking of implementing calculate_temporary but maybe it makes sense

#

I figured more complex end of round behaviour could piggyback off Enhancement API

#

Like cards that are temporary but last multiple rounds

solid salmon
#

is there something like this

#

but for hand size?

tepid egret
#

any of you know where the code is that causes that little popup on the side to show up when you unlock a joker/deck?

crisp coral
#

create_UIBox_notify_alert

#

in UI_definitions.lua

solid salmon
tepid egret
crisp coral
#

or something like that

solid salmon
#

Ok

hallow forge
#

the manacle actually uses a function for changing hand size

tepid egret
#

wait i wanted to click that

hallow forge
#

that was fast

tepid egret
hallow forge
#

obv a scam of some sorts

solid salmon
#

le scamme

crisp coral
#

it's funny as shit though

tepid egret
#

nah im sure that person had my best interest in mind

solid salmon
#

Don't you remember yesterday

hallow forge
#

they had intrest in collecting intrest from your bank account

vivid eagle
#

please don't

tepid egret
#

i do remember yesterday

solid salmon
#

Ok painted jonkler works

surreal marsh
#

why adding consumable to joker slots can't work and why G.jokers.cards[5] isn't nil but G.jokers.cards[i] where i=5 is nil 😭 MAGIC

crisp coral
#

i love lua jank

hallow forge
surreal marsh
#

look at this, card5 outside loop isn't nil but car5 inside loop is nil

hallow forge
#

you cropped out part of the error

surreal marsh
oblique gust
#

guys feel free to ping myst on reply

crisp coral
surreal marsh
hallow forge
surreal marsh
#

this is from :calculate_joker because G.jokers.cards[5] is nil

hallow forge
#

okay

#

why is it supposed to not be nil

surreal marsh
#

card5 is not nil

hallow forge
#

how do you know?

surreal marsh
#

ohh 🤔 so cards[5] is gone when looping through i=1 to i=4

#

i'm soooooooo stupid 😭

hallow forge
#

what?

surreal marsh
#

card5=G.jokers.cards[5] is executed out of loop and its value is not nil

#

so jokers.cards[5] exists before loop

#

but when i=5 jokers.cards[5] becomes nil

hallow forge
#

variables are allowed to have nil values

#

the issue is trying to index them, since nil isn't a table

floral elk
#

you can do if card5 ~= nil then ... end

surreal marsh
#

😭

hallow forge
#

well

#

yeah idk

floral elk
#

then it could be another nil value

surreal marsh
floral elk
#

I mean it could be another expression in the loop that is nil

hallow forge
#

*btw

floral elk
#

the error only says line and that a nil value was indexed

#

not which expression held the nil value

#

so the assumption that card5 is nil is not the only possible meaning of that error

surreal marsh
#

dump file

floral elk
#

wait why is it i or 0?

hallow forge
#

if car is nil it prints i otherwise it prints 0

floral elk
#

yes but why

surreal marsh
#

im just testing if car5 is nil

floral elk
#

so somehow car ~= nil, but is chain of custody is from G.jokers.cards[i], and yet G.jokers.cards[i] is nil?

surreal marsh
#

and the result is this

surreal marsh
floral elk
#

the dump u just gave says the exact opposite

languid mirage
#

no

solid salmon
#

do i just remove the boss from this to just make it work for blinds

#

wait lemme check first

floral elk
#

because usually that's what you do with a cond and v or d expression

surreal marsh
frosty dock
#

a blind's boss table isn't a cardarea

floral elk
#

also I'd be sus of reference equality being used to classify things that could be cloned/proxied

languid mirage
#

(Idk lua just guessing from what I saw previously)

solid salmon
#

i need to adjust it

#

wait it works for yellow

surreal marsh
#

i use for i=1,#G.jokers.cards do because previously without my loop game crashed on line 501

#

so I added a loop to test

floral elk
languid mirage
#

I mean for debugging

surreal marsh
#

and just now I removed local effects line and car5 is not nil

floral elk
#

assuming the cards field is an array sort of thing then ipairs will work up to the first nil value

#

# can technically report any value

surreal marsh
#

so actually G.jokers.cards[4]:calculate_joker sets G.jokers.cards[5] to nil

floral elk
#

not necessarily the last non-nil contiguous index from 1

solid salmon
#

it works for yellow but not magic

#

this works

floral elk
#

surely that conditional never passes

frosty dock
floral elk
#

I'll trust what aure says, I have no idea about how the game's internal model works, I'm just general purpose lua

#

but generally reference equality is a bad idea

frosty dock
#

the game tends to use reference equality for cardareas

#

like context.cardarea == G.jokers

floral elk
#

it should use an enum/id system instead :(

crisp coral
solid salmon
#

why doesn't this work

frosty dock
#

but if one thing is a card area and the other one is a table that looks like { min = 1, max = 10 }

#

they will never be the same table

#

same thing

#

you have two objects

#

one is of the class Blind

#

one is of the class CardArea

#

they have different metatables, so they surely aren't the same thing

solid salmon
#

do i have to put the card name

floral elk
#

oh yeah?

local a = context.cardarea
for k,v in pairs(a)
  a[k] = nil
end
a.min = 1
a.max = 10
setmetatable(a,Blind)
#

how much would the game die

solid salmon
frosty dock
#

I'm telling you it didn't

frosty dock
solid salmon
#

IT DID

solid salmon
#

i tried it

surreal marsh
crisp coral
solid salmon
#

or did as it worked

floral elk
#

u will need some kind of concurrency policy

surreal marsh
#

i know and the fourth joker isn't mine

solid salmon
#

SUS

floral elk
#

<@&1133519078540185692>

solid salmon
#

<@&1133519078540185692>

crisp coral
#

okay you didn't need to ping them again

solid salmon
#

ok

frosty dock
#

kil

livid scroll
#

🔫

crisp coral
#

kil

solid salmon
#

🔫

frosty dock
grand violet
#

Thanks cool

#

very cool

solid salmon
#

anyways

livid scroll
#

yeah discord was wigging out in actually delteing message after ban

crisp coral
#

thank you discord very cool

grand violet
#

As it does

floral elk
frosty dock
#

very discord of it

floral elk
#

😈

grand violet
#

Did you know

floral elk
#

yes

grand violet
#

If you ping mods three times in a row really fast you unlock a secret sticker

#

you become Perishable

solid salmon
#

if context.cardarea doesn't work

grand violet
#

and will be sold within 5 seconds

crisp coral
#

no way

floral elk
#

perish the thought

solid salmon
#

then does self.ability.name work?

grand violet
#

Anyway, I'll leave so y'all can get back on topic

crisp coral
#

cya egg

grand violet
#

ping me if anyone manages to make a Joker with the word "tetrated" in its rules text balanced

frosty dock
solid salmon
#

🥚

surreal marsh
crisp coral
#

[lobcorp mod spoilers in case someone cares] how much do you bet this works first try

floral elk
frosty dock
#

I'll bet 2 jimballs

crisp coral
#

i'll take your two jimballs because it worked first try

frosty dock
#

⚾ ⚾

frosty dock
crisp coral
#

damn

#

i also kinda reimplemented the compat ui because the one thunk implemented is... really inefficient for some reason

hallow forge
#

ive created a blind which permanantly messes with your deck

frosty dock
#

🧩

surreal marsh
solid salmon
#

maybe i'm stupid, maybe i'm missing one thing, but somethings off

hallow forge
#

and note puzzled is compatible with editions, enhancements, and seals so you can't ever remove it from a card

shell timber
crisp coral
#

time to die

surreal marsh
#

tetrate your mult only if your mult equals 1

hallow forge
#

Tetrated Joker - +4 Mult

surreal marsh
floral elk
#

e.g. let's say a joker modifies other jokers

#

it should probably wait for some kind of event to do that

#

instead of immediately

#

btw I don't play this game, I'm just musing on like general lua mod API stuff

solid salmon
#

i changed it from self to card and it works

frosty dock
#

just putting it in an event should do

solid salmon
#

well

frosty dock
#

dagger works like this

solid salmon
#

it doesn't crash but no fool

floral elk
#

if it did it immediately then that can result in an infinite frametime

#

like recursive effects that don't cache eachother

#

game just crashes due to memory swell/hang

#

that kind of thing

frosty dock
#

yeah

#

using an event should solve that

floral elk
#

right so the idea is to have a standard for it

#

cus clearly that joker[4]

#

isn't doing a nice thing

crisp coral
#

dear god why does context.individual have a different return format

floral elk
#

(asssuming that was the correct conclusion to make)

crisp coral
#

killing myself

#

time to reimplement eval_this!!!!

frosty dock
#

||better_calc||

surreal marsh
#

i think

crisp coral
#

okay but that assumes everyone who plays my shit also switches to that branch

floral elk
#

well idk your debugging strats are not getting clear results

#

I would be putting a breakpoint there but supposedly that's evil or smth here

solid salmon
#

how do i make it give a specific tarot

frosty dock
#

just wait for it to get merged balatrojoker

solid salmon
#

then how do i make it work

#

for just a tarot

floral elk
#

I don't think trying things over and over is gonna get you very far

#

u should try to figure out how the data is structured

solid salmon
#

i am

crisp coral
#

oh okay better_calc is literally what i need rn

#

i'm going to die

solemn coral
crisp coral
#

LMAO

sonic mortar
#

legalised money printer

crisp coral
#

4 jimbos are worth $540

#

amazing

surreal marsh
#

I want to make the effect of when clicking play button, use consumable cards in joker slots on the hand first, and then play the hand. However after consumable cards are used the hand area pops up strangely. My expectation is after using the tarot the hand area pops up, and when the hand is played the area moves down again. So how to control the movement of hand area 🤔

solid salmon
#

how do i buff editions?

royal ridge
#

always there even if you don't need em 😌

fast badge
surreal marsh
floral elk
#

why nest event?

surreal marsh
#

i dont know

#

also vanilla game has nest event

floral elk
#

¯_(ツ)_/¯

surreal marsh
#

local thunk moment

solid salmon
surreal marsh
#

🪨

solid salmon
#

Betmma you legally have to help me with this

surreal marsh
#

really

solid salmon
#

Idk

surreal marsh
#

is this a deck

crisp coral
#

betmma doesn't have to do anything

solid salmon
#

yes

solid salmon
#

i wasn't seriously gonna force them to do it

surreal marsh
#

i know nothing about deck 😔

solid salmon
#

ok

hallow forge
#

decks, you say?

solid salmon
#

yes

solid salmon
# solid salmon

but instead of this being random im just gonna make diamond do that

#

i also don't know how to make decks

surreal marsh
solid salmon
#

huh

#

1776$!!!

#

that is very cursed

rough furnace
solid salmon
#

Money accelerator

#

Look at denvers deck ideas

edgy reef
#

F R E A K Y deck

solid salmon
#

Imma die

#

he also wants it to be compatible with betmma's vouchers

#

so how the hell do i make a deck?

surreal marsh
solid salmon
#

What the hell

languid mirage
#

That's cursed

solid salmon
#

Betmma decks confirmed?!?!

solid salmon
#

placeholder

rough furnace
#

Is that a song reference?

solid salmon
#

ye

#

kind of

#

i wasn't aware ngl

#

Now how do i make all (insert suit) into (insert enhancements)

fallen tendon
#

Just try to use your head

#

Where in the code might you find something that checks if a card is a certain suit?

#

Where would you find something that gives a card an enhancement?

fallen tendon
#

c?

#

p?

rough furnace
#

C is duplicate card

frosty dock
#

is L unused?

rough furnace
#

P is a built in thing idk what it does

#

L is unused

#

Also ` is open the full console

frosty dock
#

that works then, as in log

rough furnace
#

Maybe just a shift `

#

Or ctrl

#

Wait no L is load run

frosty dock
#

` is nonstandard on international keyboards

rough furnace
#

It's the default source one

frosty dock
#

whatever then

rough furnace
#

But unlike source I don't have remapping

#

Idk what would be best for the console

frosty dock
#

idk what's used

#

D as in debug?

surreal marsh
rough furnace
#

Maybe I get rid of the live test and make it space

#

(Cause live test doesn't seem useful to non thunk people)

#

I'll have to see how it feels too

frosty dock
#

maybe T

surreal marsh
rough furnace
#

T could be good

frosty dock
#

could stand for terminal, good enough imo

rough furnace
#

Yeah

#

But there's no command execution rn

#

So it's much more of a console

frosty dock
#

good enough

rough furnace
#

True

#

Maybe I just make it slash like slash commands and then I go and implement a command runner

frosty dock
#

also my 'restart game' shortcut of holding q should maybe get changed to not conflict with cycling editions

#

again, ideally working through lovely and not steam

rough furnace
#

I mean I've pretty much taken up the entire left side of the keyboard

#

Also the cycle editions isn't a hold action

frosty dock
#

ik but it's still the same key

rough furnace
#

Yeah

#

I guess that is a stock debug action too

frosty dock
#

not too important though

rough furnace
#

R would be good if it wasn't already restart run

frosty dock
#

I would have already liked to have R for reloading mods

rough furnace
#

I mean on title screen it could

frosty dock
#

which reminds me that reloading mods can break sometimes during a run and I need to fix that

frosty dock
#

it doesn't exit to menu before reloading because events

rough furnace
#

Also would people be interested if I made an api for mods to implement commands for the console?

#

Or should I just make it only eval lua code

#

I guess I could include a few commands like setting a few variables and such

frosty dock
#

command API is useful if there are commands at all, I guess

#

wait does that mean SMODS-independent APIs?

crisp coral
#

@royal ether what do you think of this

rough furnace
#

But I'll make sure it plays nice if debug plus isn't around

solid salmon
#

i made it not crash

#

now for the stones

royal ether
crisp coral
#

yippee

zealous glen
solid salmon
#

where do i find the tower within the game files

fallen tendon
#

Actually not sure

wild gyro
crisp coral
#

search for mod_conv

solid salmon
#

how the heck can i apply it to every initial heart suit card within the deck

solemn coral
#

Find where the deck is stored as a table of cards, then use a for loop to loop over each card in the deck.

#

If the card is a heart, make that card a stone card.

crisp coral
solid salmon
#

so copy all the cards but make hearts -> stone

#

i can't find the decks source code

crisp coral
#

back.lua

solid salmon
#

ok

solid salmon
#

i copied from checkered

rough furnace
#

I feel like your missing a function definition or smth there

solid salmon
#

so it works but i don't have the right thing to turn it into stone

#

imma search

fallen tendon
#

You could try to look at cryptid’s enhancement decks

solid salmon
#

ok

brisk pond
#

someone has these functions ready?

function createRandomPlanet()
function createPlanetForLastHandPlayed(normal or negative)

or do I need to search the base code?

frosty dock
#

vanilla code has these -> high priestess / blue seal

brisk pond
#

thanks

solid salmon
#

Am i allowed to steal borrow jellymods code?

royal ether
#

jellymod is the last mod you should learn from

#

its incompatible with every single mod

solid salmon
#

then just make it compatible

fallen tendon
#

Its the worst coded mod in existence

#

Dont even touch it

#

It crashes soooo much

solid salmon
#

ok

wintry solar
#

sound perfect for ai gen goku then (:

solid salmon
#

Anyways back to making enhancements

solid salmon
#

wait are editions made the same way as enhancements?

#

and if so where can i find it within the game files

brisk pond
#

how can I have my jokers' probabilities be changed by cards like Oops all Sixes?

fallen tendon
solid salmon
#

dude i'm the coder not the artist

brisk pond
#

Right now this is my Joker

SMODS.Joker { -- 01.1 Mercurius
    key = 'Mercurius',
    loc_txt = {
        ['default'] = {
            name = '{C:blue}Mercurius',
            text = {'Creates a {C:dark_edition}Negative','{C:blue}Planet{} card for','played {C:attention}poker hand','{C:green}1 in 3{} chance to create two'},
            unlock = {'{C:red}Evolve{} the previous','Joker to unlock','this one'},
        },
    },
fallen tendon
#

Oh wait are you applying an edition

solid salmon
#

ye

fallen tendon
#

Idk exact name

#

Just ctrl f for the edition set function

solid salmon
#

i think it was common events

brisk pond
rough furnace
#

There's a variable

#

Off the top of my head I think it's G.probabilities.normal

solid salmon
#

this is the best edition code that i saw so far

wintry solar
#

Why have you copied the set edition function into your calculate function

solid salmon
#

i was just testing it

wintry solar
#

Testing it for what

solid salmon
#

idk compatibility

#

and it doesn't crash

#

do you have a way to properly implement editions?

wintry solar
#

what are you trying to do

solid salmon
#

make an upgraded version of already existing editions

wintry solar
#

are they replacing default editions?

solid salmon
#

with a certain voucher yes

fallen tendon
#

Have fun making a shader

wintry solar
#

^

fallen tendon
#

I mean you could yoink the base game shaders…

wintry solar
#

but if you want the edition docs, here they are

rough furnace
#

Can you take ownership of editions?

wintry solar
#

yes

rough furnace
#

Then it's probably not that hard to change behaviour or whatever?

wintry solar
#

I'm not sure if you could trigger taking ownership off a voucher purchase

rough furnace
#

I mean you just take ownership and then in calculate, if voucher is acquired, then do new behaviour else do default

wintry solar
#

calculate with editions is still super jank

fallen tendon
#

Well it also needs to change the name

wintry solar
#

although I haven't looked into the better-calc branch yet, maybe that fixes it

#

I think having an alternate edition would be a better solution

#

and then you'd just need to do a simple swap to the new edition when you look at what poll_edition returns

#

if you have the voucher

#

but I would argue the first step to wanting to make an edition is to learn how to make a shader

rough furnace
wintry solar
#

yeah you cuold do that too

solid salmon
#

what's the shader key?

wintry solar
#

the key for your shader

solid salmon
#

like the color?

wintry solar
#

no

#

have you read the docs?

solid salmon
#

im reading them

wintry solar
#

then read them all

#

if you still have questions after that, fire away

rough furnace
#

Why do editions have an atlas?

wintry solar
#

for display in the collection

rough furnace
#

Oh

solid salmon
#

where shall i place the config?

#

i read some of the instructions and i think it should look like this

wintry solar
#

you see all those squiggly lines?

solid salmon
#

yes i do

#

i was just about to ask

wintry solar
#

that means you haven't read the instructions carefully enough

solid salmon
#

ok

#

almost got it

wintry solar
#

okay let's clear a few things up

#

any of the optional parameters that you aren't changing the value of you don't need

#

the loc_txt and configs and given an example Skeleton