#đŸ’»ăƒ»modding-dev

1 messages · Page 20 of 1

random sleet
#

(again just talking aloud)

frosty dock
#

actually that encourages gambling

random sleet
#

no gambling in my silly poker game

frosty dock
#

give me my slots oddity

random sleet
#

it is unlikely i could draw any such thing

maiden phoenix
#

Mini slot machine :))

frosty dock
#

X60 mult, this card is destroyed at end of round

#

or

#

Shop cost is tripled

#

use cost could even be changed be the effect

random sleet
#

this sounds like so much work to implement ong 😭

frosty dock
#

nvm

random sleet
#

it'd be something that definitely suffers from loc_txt annoyances

frosty dock
#

you'd need to set the loc_txt up as like #1#,#2#,#3#

random sleet
#

and cant use any variables or colors

frosty dock
#

then do localize calls on loc_def to populate

#

I think that would allow cars at least, but no colors

random sleet
#

oh yeah you could just put the variables in yourself

#

since you're already handling every line as a variable anyway

#

there's definitely potential to this idea i just do not want to be the one to do it lol

frosty dock
#

lmao

#

me neither, probably

random sleet
#

i wanna focus on getting the number of oddities up first

#

with a bunch of small, simpler things

frosty dock
#

Alternatively you could have some way to change the loc_txt being used dynamically

#

like, set up a bunch of different ones in advance and pass that as a key to localize

#

tbh I could support that

random sleet
#

that would be based

#

oh i could probably port that PermaBoosts mod huh

frosty dock
#

hm

#

does that mean loc_def gets more return values

maiden phoenix
frosty dock
#

there's already vars, main_end and main_start

random sleet
frosty dock
#

it's a separate effect, so should be multiplicative imo

bitter sand
#

why my cards are getting 2 of hearted ? (it happened since i added a new enhancement)

frosty dock
#

oh no

bitter sand
#

(well i added two but only when i add the second one it does that)

frosty dock
#

not the 2 of hearts bug

bitter sand
#

i heard that it was an enhanceapi bug

frosty dock
#

yeah

bitter sand
#

when i added the first enhancement every thing was okay but when i added the second one

#

well hearts everywhere

frosty dock
#

well I can't help with that I'm afraid, though I'll need to look at that mod's code sometime if I wanna port it

bitter sand
#

redempted

#

the 2 of heart bug happens when you have a second page on enhancements

crisp coral
#

ah so the goblin tinkerer

unkempt thicket
gilded narwhal
#

Gives 250$ of sell value every round

bitter sand
#

i want to make a tarot card that have a 3/4 chance to enhance a card or a 1/4 chance to apply another enhancement

#

but i don't know how to make that

maiden phoenix
#

Just do a check if the 3/4 occurs and if not does something else

#

Unless the 1/4 event is independant

gilded narwhal
#

If (3/4 chance)
stuff
else
other stuff

bitter sand
#

how i do the 3/4 ?

maiden phoenix
#

Check for jokers that has random events occurring

bitter sand
#

okay thx

gilded narwhal
#

Also how easy would you guys say it is to make a blueprint-esque joker

maiden phoenix
#

Pretty easy

#

Just look at the beginning of the calculate_joker function

night pagoda
#

base number is always 1 and it changed with oops all 6 and other things

maiden phoenix
#

Can't you increase the first number?

night pagoda
#

yeah but won't it be screwed by oops all six then?

maiden phoenix
#

Only way to find out is testing

night pagoda
#

I mean it will be screwed

#

because the value will be increased by 2 in this case, instead of 3/4 it'll be 4/4

maiden phoenix
#

If it's a problem he can always do 1 / 1,33 tho it won't be a true 3/4

#

And the math can be screwed too at moments

unkempt thicket
gilded narwhal
#

Couldn't you do something like pseudorandom('space') < G.GAME.probabilities.normal * 3/self.ability.extra.odds then

sleek notch
#

A 1/1.33 will just work fine with iips all sixes

night pagoda
#

yep 1/1.33 seems good

frosty dock
#

3*probabilites.normal isn't an issue

gilded narwhal
#

Also isn't there someone adding extra stakes

zealous glen
#

The way the game does probabilities is by sampling from an uniform distribution on [0,1], so that if you want a binary event with a certain probability p of happening you can just check if you sampled a number between 0 and p (or 1 and 1 - p)

#

The logic behind 1-of-n events is similar but you have to remember to account for dependency among events if you want the probability of a specific event to be a specific number

#

But an easy way to do it is with independent checks and a running sum, for example the first event has a probability p_1 and the second p_2, first you check if the sampled number is less than p_1 and if not you check if it’s less than p_1 + p_2

frosty dock
#

or you subtract the checked value from the polled number until it's in range

zealous glen
#

That’s equivalent

frosty dock
#

yeah, but it's a bit easier to implement

zealous glen
frosty dock
#

w/e

zealous glen
#

As dividing the unit interval into chunks

frosty dock
#

all good

zealous glen
crisp coral
#

oug

#

math

zealous glen
#

yay

#

math

#

At least it doesn’t need measure theory

shell timber
#

wouldn't it techncally be [0,1)

#

although it shouldn't really matter

zealous glen
shell timber
#

yeah

zealous glen
#

You do have correct representations of 0 and 1 in binary tho

#

Although more closer to 0

shell timber
#

it doesn't matter in theory but technically matters in practice

#

actually wait you just generate 23 random mantissa bits or whatever

frosty dock
#

well it barely matters in practice, just because precision isn't infinite

boreal tusk
#

having some issues getting my mod to even get recognized by the game itself

gilded narwhal
#

Hey I want to make modded jokers need to be unlocked instead of discovered, how do I do that?

maiden phoenix
boreal tusk
#

im modifying the blank joker template, (which that template and mod IS actually getting recognized in the mod and collection section when added to mods), but i cant even get it to show up anywhere unless i mess up some syntax somewhere

#

no the header is there

#

i made an error earlier in it and it gave me a crash screen over it

#

but i fix one typo and suddenly the game ignores the mod outright otherwise

maiden phoenix
#

Does your joker slug match the one you're registering?

boreal tusk
#

hmm

#

do i have to add the j_ to the slug name?

maiden phoenix
#

It's usually what's done

boreal tusk
#

no change

#

i think its less to do with the joker itself, since the mod isnt even coming up on the modlist

#

im thinking i trimmed some code someplace that maybe was necessary for the mod being "activated" in the game's eye

maiden phoenix
#

Can you show your code?

#

(header included)

boreal tusk
#

hmm

#

should i just drop the lua file?

maiden phoenix
#

Sure

boreal tusk
#

oh nice it shows it in disc

maiden phoenix
#

function SMODS.INIT.Cejai Mods()

#

This line causes an error

#

So your mod never gets init'd

boreal tusk
#

its not the space in the name, is it?

maiden phoenix
#

Yes it is

#

add a "_" instead of a space

#

I'm not sure if MOD_ID can have space in them too but I might be saying something wrong

boreal tusk
#

i removed the space to make it "CejaiMods" which is what caused the game to crash before

maiden phoenix
#

If it doesn't work try renaming MOD_ID to "CejaiMods" too

echo hatch
#

SMODS.findModByID("CejaiMods").path MOD_ID: Cejai Mods sus

boreal tusk
#

okay its registering now and im getting errors in that SMODS.INIT section

#

i gtg tho so ill comb through later

#

ty

frosty dock
#

a

maiden phoenix
#

Yea prob the findModByID that's breaking, also you should remove the "_REO" in Sprite:new

frosty dock
#

I hate 0.9.8

maiden phoenix
#

Do you deem the alpha stable enough so that I can start porting my mod toward 1.0.0?

frosty dock
#

the latest commit has a very, uhh... prominent crash, but that's a one-off

maiden phoenix
#

I can wait it's fine

unkempt thicket
#

im worried for when i have to port

frosty dock
#

the APIs are generally pretty stable at this point, so it's not a bad idea to start porting

maiden phoenix
#

Alright

frosty dock
#

consumables are still getting some features, I was just working on non-consumables (don't get destroyed on use) earlier

#

then I realized there's no way to display state in consumable descriptions, so I'm trying to add that

maiden phoenix
#

As long as the jokers, challenges and decks are stable enough I shouldn't have any problems

frosty dock
#

yeah they should be

mellow crag
#

Btw Aure, did you change how localization is added?

frosty dock
#

challenges are dead simple, they don't require any extra code apparently

frosty dock
#

steamodded has always just been ignoring that part of the game before

mellow crag
#

then how would you go about adding a new tooltip string?

#

cause this didn't work:

frosty dock
#

that's almost correct

#

you need it to be redone on every injection, so shove it in an SMODS.current_mod.process_loc_text() function and you should be good

mellow crag
#

interesting

#

oh wait im dumb

frosty dock
#

what

mellow crag
#

is this method SMODS.current_mod.process_loc_text() something i need to implement?

frosty dock
#

I phrased that poorly

#

you need to define that function with that content

mellow crag
#

do you by any chance have an example of it?

#

i am not sure i understand

frosty dock
#
function SMODS.current_mod.process_loc_text()
  -- the code in your screenshot goes right here
end
#

Alternatively you can put it in the process_loc_text of any other game object (this is what you had to do before I added this), which is kinda dumb if the text doesn't inherently belong to a single object

mellow crag
#

YESSSSSSSSSSSS

#

thanks a bunch!

frosty dock
#

np

mellow crag
#

porting to 1.0 is quite fun actually

#

(as long as i don't have to take care of booster packs XD)

frosty dock
#

I- uhhhh

#

yeah I'll try to add these

#

I don't think I'll be adding states though, there's too much to break there

mellow crag
#

you can use the method that Codex used

#

wait add it to 1.0?

frosty dock
#

yeah

#

well there's really only two kinds of packs right? the ones that draw playing cards and the ones that don't

mellow crag
#

true

#

one can take from tarot and the other from playing card / joker pack

frosty dock
#

yeah

worldly sapphire
#

i was exploring the card.lua file trying to find a way to make a card gain a xmult when a specific hand is played

#

and the only result i got was the mult message popping up

maiden phoenix
#

Check Cavendish

unkempt thicket
frosty dock
#

bad practice detected

#

what's supposed to be better about using individual files for each object?

unkempt thicket
#

I was more referring to that joker file in fusion jokers

frosty dock
#

ik, just wanted to point that out

worldly sapphire
maiden phoenix
worldly sapphire
#

but when i play the hand it gets buffed

maiden phoenix
#

Campfire?

unkempt thicket
crisp coral
mellow crag
unkempt thicket
#

at least i won't have to recode my website for 1.0.0

mellow crag
crisp coral
#

(im lazy to use spritesheets shh

worldly sapphire
#

its working a little bit

#

i just need a way to make the upgrade happen after the flush is played before activating the mult

unkempt thicket
crisp coral
#

the word chips should not be highlighted

frosty dock
worldly sapphire
#

btw, i tried to use the card mult text and its saying error lol

#

its saying error in the joker description

frosty dock
#

try #1#

#

lua is 1-indexed

worldly sapphire
#

i used it

#

and it says error :(

frosty dock
#

do you have a loc_def function?

worldly sapphire
#

idk

#

is it in the effect section?

worldly sapphire
wicked moth
#

what fucking abomination of a boss have I made

#

sorry if the music is loud btw 💀

#

it's too unique

frosty dock
maiden phoenix
#

"Chicot cannot help" 😹

frosty dock
wicked moth
#

imagine no cheese

worldly sapphire
#

i got an example from a code above

#

can i just edit it?

frosty dock
#

please read the wiki

worldly sapphire
worldly sapphire
worldly sapphire
wicked moth
#

it dies

#

first balatro boss to have 2 phases

#

💀

frosty dock
#

i just can't quite figure out why it refuses to let me add a card like this to the consumables area from a pack

#

kinda defeats the point of nonconsumables

remote coral
wicked moth
#

every single boss

#

in one

#

and it's 8x

#

the scaling is different because it's another stake

royal ridge
#

smod 1.0.0 alpha, "requires" seems to have been changed? second voucher no longer spawns if i use requires like this

frosty dock
#

that should work, what table is that in?

royal ridge
#

huh

#

this is gondola for ref i suppose

frosty dock
#

smods 1.0 does some magic with the keys to ensure there's no collisions

#

it prepends 'v_' automatically and also your mod's prefix

#

which is the first 4 letters of your mod ID in lower case if you don't specify otherwise

#

so the actual key of gondola might look something like v_abcd_v_gondola

royal ridge
#

alright i'll try a couple variations of that and see what gets it to work

#

thanks a ton

frosty dock
frosty dock
#

but I don't see how that works out here, since vouchers you require might be from any mod

night pagoda
#

I plan to remake my mod for 1.0 soon, are there any directions on what to do/what exactly changed?

#

I saw something about init not existing, what's instead of it now?

frosty dock
#

the basics are you just put everything that might have been in init before in the mod file directly

#

all constructors take a single table as an argument, including all functions you would want to define on that object

royal ridge
#

yep this gets it to work

#

tysm

night pagoda
#

tables instead of that list? huge

wicked moth
#

I'm still not used to lua for loops

frosty dock
#

new commit is up and unscuffed

wintry solar
#

is there any work on an edition api?

frosty dock
#

not from my side

night pagoda
#

What do I need to do with blind to make it trigger Matador? I assumed Matador checked triggered = true, but he doesn't?

frosty dock
#

it should check triggered iirc

#

it's like the whole reason that exists

night pagoda
#

I change self.triggered to true in Blind:press_play() and nothing really happens with Matador

maiden phoenix
#

It only works with debuffed card it seems

night pagoda
#

damn

bitter sand
#

i'm trying to make a tarot card and idk why but i have this error

frosty dock
#

how are you creating the Tarot?

edgy reef
#

They might be passing it all as a table in 0.9.8

bitter sand
edgy reef
#

name should never be a table

short surge
#

yo guys do you guys know how to force a save at any point in the game?

#

do i just save_progress()?

#

also it seems like game is not saved properly if i save any card in G.GAME.anything

night pagoda
#

I use G.GAME.anything to save stuff and it's working fine for me

short surge
#

have you tried saving a card?

#

abilities and stuff are gone when you reload

wintry swallow
#

functions aren't serializable im guessing

random sleet
#

is there something i'm doing wrong here? not quite sure whats up here

frosty dock
#

hm, it shouldn't be trying to serialize functions though

frosty dock
#

So this is actually odd_odd_modicon rn

random sleet
#

i dont think it was working without either but i can try again

#

yep same thing

frosty dock
#

pretty sure I didn't somehow leave it as mod_icon?

random sleet
#

looks like you didnt

frosty dock
#

wait are you putting '_modicon'

#

or 'modicon'

random sleet
#

modicon

#

should it have a leading underscore

frosty dock
#

it shouldn't

#

odd, literally

#

I don't think it matters, but try without calling register

#

actually that can't matter, I don't think

#

weird if it did, but possible

random sleet
#

oh it fixes it actually

#

maybe re-calling register prepends the prefix again

frosty dock
#

oh damn I guess I'm doing the key stuff in register unchecked

short surge
#

smarteyes if someone finds the way to properly save a card, let me know

frosty dock
#

alpha or 0.9.8?

random sleet
#

looks like discovered state of take_ownership'd vanilla jokers is still kept between profile switches

#

(it's fixed for proper modded jokers & other cards)

#

is this supposed to be being set somewhere? it's currently not, as far as i can tell

#

oh, nvm, i see

frosty dock
#

init_item_prototypes sets these values immediately, so this might require a lovely patch to capture the default values in _d and _u

short surge
frosty dock
#

well the way things are stored has moved around a bit, so it might be a non-issue on 1.0

#

I'll test it though

random sleet
#

having this issue trying to use SMODS.ConsumableType.inject_card

frosty dock
#

take ownership discovery looks fixed

frosty dock
#

are you still doing that negative number rarity thing

zealous glen
random sleet
#

yeah

frosty dock
#

i should failsafe it to not crash if the rarity pool doesn't exist, but that's what's happening

random sleet
#

i see

frosty dock
#

like the actual rarity is -1, but the pool expects 1?

random sleet
#

ohhhhhh i'm calling it before i adjust the rarity

#

i see

#

(i have it set up so Oddities can be registered with positive or negative numbers, it just adjusts positive numbers to the negative ones)

short surge
random sleet
#

ok that solves it

zealous glen
random sleet
#

i'd like for the negative number thing to not be a thing at all but if i have to change them from being 1,2,3,4 it'll be unintuitive anyway

zealous glen
#

Maybe try storing a card inside an object, since the game already saves your Jokers, the shop, the deck, etc. I can test what my Joker that saves a pointer to a specific card does

random sleet
#

Baseball Card

#

and similar effects in modded stuff

frosty dock
#

alright new commit, discovery should be all good now, rarity pools are failsafed and i also fixed another random crash

random sleet
#

looks good (jimbo is supposed to be auto-discovered, right?)

frosty dock
#

yeah

random sleet
#

then sick

zealous glen
#

Let there be synergy

random sleet
#

the issue is that baseball card explicitly says "Jokers"

zealous glen
#

Can’t it be lovely patched to fix it?

random sleet
#

yeah but then modded cards built on the same principles (unaware if any exist atm) will still have the same jank

zealous glen
#

Alternatively, the synergy is how it should work and the text is wrong

zealous glen
#

Misspoke because in my mod I specifically check if you create common Jokers

#

I check both rarity and set

random sleet
#

the context in question is context.other_joker

#

so it's not unreasonable that people might assume it only happens on jokers

zealous glen
#

I mean if the base game looks at other objects despite the variable being named “other_joker” that’s thunk’s fault

random sleet
#

¯_(ツ)_/¯

zealous glen
#

Mods can have arbitrary behaviour, if a mod doesn’t double check what it’s doing it’s kind of on the mod that doesn’t check

#

Compare and contrast with other mods that assume rarity keys in different objects follow the same logic as vanilla

random sleet
#

and my mod is having the arbitrary behavior of setting rarity to negative numbers

zealous glen
#

You either make it an issue for players or for programmers

#

If the code expects a positive number and you pass a negative (or vice-versa) it also breaks

#

Except the result is a crash instead of a confused but happy player

random sleet
#

then people should read the code they're using

zealous glen
#

Except they aren’t reading your code, the interaction happens when an user installs two mods

random sleet
#

i'd rather be able to have someone crash and say "go tell [other mod author]" than have a million people pestering me about "hey baseball card is triggering on oddities fix it"

zealous glen
#

And again can’t it be patched with a lovely patch?

#

If other mods break then they should complain to those mods

#

Not oddities

random sleet
#

except everyone will complain to me

#

this has been proven

zealous glen
#

Proven where

random sleet
#

by the fact that it has happened

zealous glen
#

If it happened once doesn’t mean it will happen again

#

I think if negative rarities lead to crashes people will complain to you anyways

random sleet
#

why do you think negative rarities will lead to crashes

zealous glen
#

And that seems more likely to be an issue (philosophically, not statistically) than uncommon oddities trigger Baseball IMO

#

I’m just saying it could lead to unintended behavior

#

Lua seems flexible enough it wouldn’t crash

#

Unless maybe it returned nil

random sleet
#

if it's not a Joker, people shouldn't assume the rarities work like Jokers

zealous glen
#

But it’s probably a fallback

#

I think people should assume rarities are positive

#

Or at most a string

random sleet
#

rarities can be strings or tables or functions

#

because it's just a key value

zealous glen
#

I know a rarity can be any key, but I’m saying I think they should be positive numbers or strings

#

I think as good code practice they should be unless you don’t want people to use your code in any way

#

In that case you’re intentionally making it inaccessible

#

For example, by using a mod name as a key

#

So it’s specific to your mod

random sleet
frosty dock
#

I'll have to check if I missed any functions that need hooking for that

#

set_sprites and load i guess?

random sleet
#

based on my previous implementation, it's Card:set_ability(...), Card:load(...), and Card:set_sprites(...)

frosty dock
#

set_ability is already a thing

#

so yeah I'll add the two of those and it should be fine

random sleet
#

though this implementation had the issue of cards resizing themselves to full size on run reload

frosty dock
#

Card:load() should take care of that?

random sleet
#

for some reason it doesnt

#

i never quite cracked why

#

i'm also not sure how wee joker works differently from photograph/half joker in this regard

#

since wee joker scales down the sprite

zealous glen
#

I remember Balatrotale tweaking the offset so a tall card would align from the top rather than the bottom

#

Or maybe they tweaked something else, but I’m giving an example of what I think could be useful

frosty dock
#

either way I'd just provide hooks to these functions

zealous glen
#

I had some ideas for centers(?) with different sizes but I suppose it could be done by upscaling with transparent pixels and an appropriate offset

maiden phoenix
#

Need opinions on this, should it be won at Ante 10 or 11?

zealous glen
#

I had a sketch for reference

zealous glen
#

This would be a (downside) enhancement(-like effect), but I think it might look better if I used a soul_sprite

#

In this particular case, it could either be a small offset sprite or a large sprite with some extra invisible space

unkempt thicket
#

Cool Egg is Done😎

random sleet
#

oh thats sick actually

#

trying to implement tags now, i think SMODS.insert_pool might just be scuffed?

#

oh, nvm, it's just that SMODS.Tag doesn't have a default set

#

Tags also don't get mod tracking badges, bit of an odd inconsistency

#

but we are ingame now

maiden phoenix
#

Epic

zealous glen
#

Autumn's mods are the coolest

frosty dock
#

tags are in the odd spot of not being centers

worldly sapphire
#

how do i fix this? i tried alot and i still did not found a way

#

idk if its my code structure

random sleet
#

is there something i'm doing wrong here? i'm not quite sure, but it looks like this apply isn't being called at all

frosty dock
#

doesn't look wrong to me?

random sleet
#

yeah it's not called at all, not getting the print output

frosty dock
#

oh i see

#

i messed up on the regex

#

wait no

#

idk

#

you need to set config.type

random sleet
#

yeah, lovely dump is reflecting the patch

frosty dock
#

it's inside this check, that why

hallow forge
random sleet
maiden phoenix
#

Jimbos for free???

frosty dock
random sleet
#

functional tags 🎉

boreal tusk
#

nice!!!

#

hmm

#

need help scanning for code in the base game

#

is there any jokers that proc effects if a card is played, but not necessarily scored?

maiden phoenix
#

Square Joker iirc?

boreal tusk
#

hmm

worldly sapphire
boreal tusk
#

#context.fullhand == 4
is used, so maybe i can futz that

worldly sapphire
boreal tusk
#

maybe a

#context.hand ==
to read just whats in the hand specifically?

edgy reef
#

on wait nvm

#

scoring_hand should be only the scoring cards, full_hand is all the cards in played hand iirc

short surge
#

i suspect deck is handled somewhat differently

queen scroll
boreal tusk
#

ah sorry

#

im trying to check for specific ranks of cards in a played hand, regardless of scoring or not

queen scroll
#

wait i read it wrong sorry

#

yeah you do check context.full_hand

#

mb

zealous glen
short surge
#

exactly

#

the card is not nil, but attributes are

zealous glen
#

Maybe it doesn’t recursively save attributes because it’s not a table, but also the game does store deck information somehow

#

In my case I’d just need a pointer to the correct card, but otherwise I wonder how cards in CardAreas are saved

#

IIRC there was a specific save function for it

edgy reef
#

I know that the game doesn't like objects being saved, but this specifically is odd.

#

I'd assume you'd be flashed a error screen for attempting to index a string

zealous glen
#

But the card itself wasn’t

#

Its fields were nil tho

boreal tusk
#

...im guessing this is a syntax error, but i never futzed with any {}'s on edit

zealous glen
#

Maybe a manager CardArea to store cards could help, but idk it doesn’t address the underlying issue

boreal tusk
#

nvm it was a leftover end function

#

card still wont proc at all, and now my mults arent registering on my card's description

#

okay before i really start fine toothing potential variables

#

am i missing anything here in terms of calling variables for the fucntion?

random sleet
#

@frosty dock looks like the get_current_pool() hook may be malfunctioning when i attempt to supply a rarity to create_card() with the negative numbers; seemingly this will also cause issues with non-numerical rarities, making this change in center.toml fixes it as far as i can tell

#

(the if not _rarity check)

#
# get_current_pool()
[[patches]]
[patches.pattern]
target = 'functions/common_events.lua'
pattern = "else _starting_pool, _pool_key = G.P_CENTER_POOLS[_type], _type..(_append or '')"
match_indent = true
overwrite = false
position = 'before'
payload = '''
elseif SMODS.ConsumableTypes[_type] and SMODS.ConsumableTypes[_type].rarities then
    local rarities = SMODS.ConsumableTypes[_type].rarities
    local rarity 
    if not _rarity then
        rarity = pseudorandom('rarity_'.._type..G.GAME.round_resets.ante..(_append or ''))
        for _, v in ipairs(rarities) do
            if rarity <= v.rate then
                rarity = v.key
                break
            else
                rarity = rarity - v.rate
            end
        end
    else
        rarity = _rarity
    end
    _starting_pool, _pool_key = SMODS.ConsumableTypes[_type].rarity_pools[rarity], _type..rarity..(_append or '')
'''```
#

copiable form

autumn berry
random sleet
#

oh wait i think im just misinterpreting the functino

zealous glen
random sleet
#

ok so there's no way to set a rarity pool as "legendary" i think?

boreal tusk
#

you mean before context.fullhand?

zealous glen
random sleet
#

not for consumabletypes

zealous glen
#

There’s the if that contains context.full_hand

#

Oh you meant before as in. Reading order immediately before

#

Yes

boreal tusk
#

gotcha

#

uh

maiden phoenix
#

Crazy

random sleet
#

i dont have any numbers that would make sense to do that to

zealous glen
#

Maybe some delay somewhere

boreal tusk
#

the first if/then is there to encapsulate the prerequisite conditions before the card can even proc

#

that part is, admittedly in need of work

zealous glen
#

Which is supposed to be what?

zealous glen
boreal tusk
#

mm

#

i was asking before about that, and im scouring

#

unfortunately i havent found a context type that counts cards in hand that arent scored

maiden phoenix
#

context.full_hand does iirc

zealous glen
#

You can look at cards in the full hand that aren’t in the scoring hand

boreal tusk
#

okay

#

so im guessing the == (all that) is the wrong notation to use for "if this context has these things specifically"

maiden phoenix
#

No you loop through it

boreal tusk
#

more likely i just set up a "if full hand is only those two

zealous glen
#

== is asking if both ends are equal

#

So you wrote “if ‘full_hand’ is equal to ‘boolean’ then”

#

At least I think the and evaluates to a boolean instead of working as a ternary operator

#

Either way full_hand is an array so it won’t ever be equal to either a boolean or an id

#

Actually you never pass an id since you have inner equalities

#

So you’re comparing apples (arrays) to oranges (booleans), which means the first if is always false

boreal tusk
#

okay

#

actually hold on

#

full_hand == only calls for really the hand number in the base game code

#

but there is a bit of code on it for sixth sense

zealous glen
#

No hand number, it’s the array with the cards in play

boreal tusk
#

context.full_hand[1]:get_id() == 6
so maybe a
context.full_hand[2]:get_id() == (11 and 13)

zealous glen
#

Not quite

#

If you just want it to proc from the second card played, scored or not, that’s what you’re doing

#

But

#

It would never proc

#

I think

boreal tusk
#

oh

zealous glen
#

Because I think 11 and 13 evaluated to true

boreal tusk
#

so the number in the () is the number in the hand

zealous glen
#

But it could be a ternary

#

Even if it is

boreal tusk
#

prob for photograph and acrobat stuff

zealous glen
#

It’s not what you want anyways

boreal tusk
#

mm

zealous glen
#

Note that Sixth Sense uses #

#

As do other Jokers

boreal tusk
#

sorry, mistyped for the []

zealous glen
#

Which you’ll want to use

boreal tusk
#

well i gave up on the issue of figuring out lua arrays for the moment

#

swapped out the function for something easier to just make working

#

just gonna focus on making a card work for now, cause something obviously broke the last time i meddled with it

random sleet
#

🎉 heirloom tag works (create a legendary oddity)

#

🎉 relic and collector's tags work (shop has a free rare oddity; create oddities until your consumable slots are full)

#

however im running into weird CTD's now so

#

as far as i can tell it's not something relating to my tags at least since i'm able to view and use them with no issues

#

setting a default oddity based on the first registered works! :)

#

(this is 3 of the common oddity, 1 uncommon, 1 rare)

mellow crag
#

gooooooooooooooooooooooood morning

unkempt thicket
#

yes

mellow crag
#

what are you guys doing?

mellow crag
stray warren
#

Is there a simple way to make a custom Joker go extinct? I see that 'Gros Michel' sets a custom flag for that card specifically.

#

Or I guess not extinct specifically, but just not let it show up again

unkempt thicket
mellow crag
#

ooh

#

that's cool

slow ocean
#

been doing nothing on my days off

#

too eepy

#

wait i did update jankjonklers

unkempt thicket
#

not much else, got exams this week. but i already released cool egg

mellow crag
quasi jetty
gaunt thistle
#

all is well?

mellow crag
gaunt thistle
#

you know what it is

random sleet
#

particles seem hard to hook to

#

but the bg and ui color changes are hooked

random sleet
mellow crag
#

these look amazing

#

i am guessing the locked stuff is not really locked?

random sleet
#

correct

#

it's just the sprite i had on-hand for the test oddities

mellow crag
#

cool cool

#

thanks to you, porting the packs was so easy

random sleet
#

yea

#

setting a shitload of colors for pack particles...

#

i dont think there's a good way to do this that doesn't screw up other mods tho

#

unless i do regex i guess

#

but idk how to regex

mellow crag
random sleet
#

it's an at position patch

mellow crag
#

oh i see

random sleet
#

i could do a less elegant solution entirely

#

rainbow particles are so pretty tho

#

alternatively i could just leave them as the standard pack ones

worthy depot
random sleet
#

now, to the player at least, it's indistinguishable from a proper whole new pack
before it had the same bg/particles as standard packs

#

technically the implementation is still a hacky interjection of standard packs, but to the user it appears normal

wild gyro
random sleet
#

so true jestie

#

đŸ„„ 🟩 đŸŸ„ 🟹 🟧 đŸŸȘ đŸŸ© 🍮

golden lake
#

i thought that said shitting an eatload of colors for a second

random sleet
#

tooltip :3

slow ocean
#

gonna open up 5 narwhal horns

random sleet
#

hell yeah

#

@frosty dock loc_def on tags doesn't work, this elseif is injected at the wrong point for it (if i'm counting my logical structures correctly, this elseif closes the elseif _c.set == 'Tag' then, meaning it never happens if the subject is a Tag; not sure if this is intended or not but it leads to needing to inject for tooltips such as the Oddity Tag above)

lyric sparrow
#

Ayo where is Steammodded file located

#

I forgor

last fractal
#

Hello, does anyone know if it is possible to have a joker's text description text change? I can't use the #1# notation since I want to change text / text color, for example, if self.ability.extra.dollars == 1 I want the text in green, if it's == 2 I would need it in red, etc...
If I can't choose colors using variables, I guess just changing the text would work too maybe? Like if it's == 1 show a text, if it's 2 show a different text, etc...

nimble sequoia
royal ether
#

iirc blizzow(?) has a joker that changes text

#

its all static black text tho

last fractal
#

yeah but what I need is more like

if self.ability.extra.dollars == 1 then
{C:green}something{}
else if self.ability.extra.dollars == 2 then
{C:red}something{}
end

last fractal
random sleet
#

you can't have {C:...} or similar constructs in text that's placed in via loc variables

royal ether
#

what you can do is have {C:green}#1#{}{C:red}#2#{}

#

then have 1 empty when you display red text

#

and vice versa

random sleet
#

there's also some form of variable color that you can set but idk if anyone's messed with it?

last fractal
#

ok, not ideal but definetely usable, thanks a lot! <3

royal ether
#

oh yea i forgot

#

we do have the colour var

random sleet
#

yeah i just do not know how it works to try to help anyone with it haha

royal ether
#

basically you put a colours dictionary into your loc_vars/defs then put {V:n} in the text, where n is which index of colour you wanna use

#

then you can change what colour is passed in the loc_vars/defs based on conditions

last fractal
#

seems perfect then!

royal ether
#

youre wandering into unknown territory with that one, good luck đŸ«Ą

last fractal
#

I started modding balatro a few days ago and I've never done Lua before so everything is unknown territory :(

royal ether
#

youll be fine, its nothing gamebreaking

#

for reference the colours loc vars is how planets change the level colour

random sleet
#

ohhhh that makes sense actually lol

#

i was wondering what in vanilla used it haha

royal ether
#

yea im pretty sure its only planets

golden lake
#

watch this riight

random sleet
#

you are like little baby watch this

golden lake
#
  loc_txt = {
    ['name'] = 'Chungus Gaming',
    ['text'] = {'big big chungus {V:1}#1#{}'}
  },
  loc_def = function(card, info_queue)
    return {
      big_chungus,
      colours = {big_chungus==1 and G.C.BIG or G.C.CHUNGUS}
    }
  end
crisp coral
#

squint

golden lake
#

you can set up dynamic/non-standard coloring using V:x parameter

#

the x refers to nth element of the colours table

#

so in this case V:1 calls the first color in colours

slow ocean
#

the last thing before i close my eyes is this code block

#

today is going to be a good day, this is a good fortune, thank you for blessing my slumber akai

golden lake
#

youre welcome lyman

random sleet
#

oh that's what i was talking about actually

#

i just didn't know what the variable was called

crisp coral
#

good night lyman

random sleet
#

gn lyman đŸ«Ą

crisp coral
#

may the code blocks haunt you in your sleep

slow ocean
#

jankjonklers smods 1.0 porting may start soon i guess

crisp coral
slow ocean
#

depends on my spoons

golden lake
crisp coral
#

coolio

slow ocean
#

i come back and see amazing things y'all are cooking up and keeps the juices flowing just a bit when i normally get burn out for these types of fixations

#

so đŸ«Ą to all of y'all

#

keep being outstanding

golden lake
#

lyman i can help you port

slow ocean
#

autumn has been giving me some tips but i do not mind the whole village coming to help

random sleet
#

can i be instanding instead

crisp coral
#

i can use that for the keywords in the eventual graveyard jokers pack ig

#

wait lyman have you seen the graveyard

slow ocean
#

i have not

golden lake
crisp coral
#

at lyman

#

and this

slow ocean
#

WHY IS IT ALWAYS WEEZER

crisp coral
#

LMAO

slow ocean
#

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

golden lake
#

i made the weezer joker

crisp coral
#

I HAVE MY DEFAULT JOKER SPRITE BE WEEZER

golden lake
#

the art for it

slow ocean
#

THE FUCKING BUDDY HOLLY LICK

#

IS INGRAINED IN MY HEAD

crisp coral
#

gn lyman

golden lake
#

buddy chungus

slow ocean
#

we mtg now

unkempt thicket
#

đŸ« 

slow ocean
#

itay remind me at some point this week to draw roland joker

slow ocean
#

myst remind itay at some point this week to remind me of that

#

đŸ«Ą

random sleet
#

anyone versed in SMODS 1.0 know if there's a replacement for what used to be SMODS.Card.SUIT_LIST?

golden lake
#

its just SMODS.Suits

golden lake
#

lmaodab

random sleet
#

(a numerically indexed array of suits)

golden lake
#

@random sleet

random sleet
#

yeah but that's not numerically indexed is it

mellow crag
#

Autumn could you remind myst to remind me to remind lyman to make a roland joker?

golden lake
#

its an ipairs table

random sleet
#

oh

#

ok

golden lake
#

you just get the key as a string

#

and thats all there is to it

crisp coral
#

akai could you remind autumn to remind me to remind feder to remind lyman some point this week to make a roland joker

golden lake
#

i'll just hit lyman on the head

#

with my big chungus yaoi paddle

remote coral
golden lake
#

im old enough to remember the paddles

random sleet
#

Myst are you on 1.0 yet

golden lake
#

ancient artifacts of a civilization bygone

remote coral
golden lake
#

they had to ban yaoi paddles from all conventions

#

because people would hit cosplayers with them

#

nonconsensually

crisp coral
short surge
#

any state expert here

crisp coral
#

also bye chat first day of finals now

remote coral
random sleet
#

have you touched blinds for 1.0

golden lake
#

half of todays youth wouldnt surivive one second in the asylum i was raised in

random sleet
#

are variables in descriptions still scuffed

golden lake
#

blinds have smods api now

#

SMODS.Blind

random sleet
#

blinds had smods api

short surge
#

does anyone know what happens after i press play button in terms of states?

random sleet
#

it didnt stop loc vars from being scuffed

golden lake
mellow crag
#

I love source modding

random sleet
#

akai pls

#

bites you

crisp coral
#

lewd

random sleet
#

LMAO RIP VOUCHERS

golden lake
random sleet
#

feder what did you do

mellow crag
short surge
mellow crag
#

i disabled all of the other vouchers

random sleet
#

oh lmao

#

someone should port DebugPlus

crisp coral
mellow crag
#

i wrote a tiny script to patch the source game with

golden lake
crisp coral
#

debugplus doesn't need porting

mellow crag
#

it is a pretty lovely mod

random sleet
#

it has some SMODS-compat code iirc

#

which would need porting

#

i think

short surge
#

I was asking because if i do nothing in play_cards_from_highlighted then the play button is broken

crisp coral
#

na

random sleet
#

ok im stupid

short surge
#

i wonder if i should go through some states properly

random sleet
#

oh based i dont need to steal Myst's code anymore for blind modify_hand

crisp coral
random sleet
#

based

crisp coral
#

im not at home now please wait 4.5 hours

mellow crag
#

Started to port vouchers

unkempt thicket
random sleet
#

you say that as feder is like late to the party lmao

mellow crag
#

true XD

#

Akai and Autumn's work is better to look at for 1.0

unkempt thicket
#

i havn't start porting yet just dreading about it for a few weeks

mellow crag
#

I practically just follow them now

random sleet
#

im working on Thac now

mellow crag
#

i love the new systems

golden lake
#

^

slow ocean
#

We must all make the leap to build a better community foundation

mellow crag
#

trueeeeeeeeee

slow ocean
#

Myself included

golden lake
#

and to leave jellymod in the dust

slow ocean
mellow crag
#

im trying to squeeze as much work as i can rn, since im leaving in like 15 mins to something

unkempt thicket
slow ocean
#

Gl mate

random sleet
#

when does it ever stop being exam week i swear yall been taking exams for the past month

slow ocean
#

May is just hell

mellow crag
#

me signing up to an academy in october, while also being at work

slow ocean
#

I just kind of assume this regardless of anyone I talk to

unkempt thicket
#

T_T my birthday is in two days, and so is an exam

slow ocean
#

Happy early birthday!!

mellow crag
random sleet
#

oh god i have so many overridden functions in Thac that i could definitely convert to lovely patches

golden lake
#

i went to a uni and realized i was being scammed so i dropped out đŸ€·â€â™€ïž

short surge
#

happy birthday snow!

mellow crag
#

is that a new enhancement?

golden lake
#

its a deck

mellow crag
#

ohhhhhhhhhhhhhhh

short surge
#

hey feder

#

well it is not enhancement nor edition nor seal

mellow crag
#

?

golden lake
#

each card in that deck

#

can be transformed into a joker

#

if its played as a high card

short surge
short surge
mellow crag
#

oh that's sick

golden lake
#

its a really cool concept

#

btw itay would you be interested in helping out with a thing? i need to add contexts to playing cards

golden lake
#

well, i need to hook into evaluate_play to set up both Aspects and Zodiacs

#

and uhh thats easier said than done

#

especially because I have no idea where to start

mellow crag
#

you wanna go over each playing card?

golden lake
#

p much

mellow crag
#

in hand or in deck?

golden lake
#

in hand and played

#

G.hand and G.play both affected

mellow crag
#

i think you can go over G.play pretty easily, there are some contexts that do that

golden lake
#

yeah but problem is

#

its not on the base of a joker

#

or the base of a consumable

#

its on the base of the card itself

#

that's the main issue, is that the card is evaluated on its own

royal ridge
#

lovely doesn't seem to like this particular patch (i don't either but i at least wanna see it run)

#

gives an "expected newline" error

random sleet
#

you need to make sure that the string doesn't get interrupted by the quotes in the pattern

#

use triple apostrophe for best luck

short surge
royal ridge
#

tysm

short surge
#

I thought of doing that, but my mod ended up not wrapping it at all

frosty dock
random sleet
#

yeah sorry about that

golden lake
random sleet
#

a related issue, though: there's no way to set a "Legendary" rarity via get_current_pool()/create_card()

#

i did this patch to set up legendaries for Oddities, but it's not inherently expandable

frosty dock
short surge
golden lake
#

autumn youre the lovely expert how do i add a thing

random sleet
#

why am i the lovely expert

#

i dont even know regex

golden lake
#

i dont need regex

frosty dock
random sleet
#

look at how smods tomls work

golden lake
#

that wont tell me anything

mellow crag
#

oh BTW i don't think voucher requirements work

#

they just block the voucher from appearing completely

random sleet
#

you supply the basegame line you're matching against with pattern, specify a position of "before" "at" or "after", then put the code to inject in payload

golden lake
#

autumn this doesnt tell me anything at all

random sleet
#

feder are you accounting for mod prefixes

golden lake
#

can you run through this withg me

random sleet
#

so

#

do you know what file you're patching

golden lake
#

yes

random sleet
#

that's the target of the patch

mellow crag
frosty dock
random sleet
#

actually lemme dm you

frosty dock
#

I can't just stick it on automatically in that case

#

otherwise you can't require vanilla vouchers or vouchers from other mods

mellow crag
#

good Cauldron also works now

random sleet
#

@frosty dock another odd thing: there's no safeguard against undiscovered cards trying to run set_badges and typically failing since undiscovered cards will lack badges

#

Getting There

#

uh oh :( process_loc_text is exploding on poker hands....

#

oh it's loc_txt.description not loc_txt.text

#

@golden lake bites you

#

SMODS.Suits isn't numerically indexed

golden lake
#

wdym

random sleet
#

its indexed by the names

frosty dock
#

there's a suit list that is, it just doesn't have a direct name

random sleet
#

yeah but now there's no SMODS.Card.SUIT_LIST

frosty dock
#

SMODS.Suit.obj_buffer

random sleet
#

o

#

im also not sure how to actually score cards in my poker hands

#

like if i play that skeet it doesn't score anything

frosty dock
#

there's atomic_part and composite, at least I think that's what I named them

random sleet
#

granted this is converted from feder's hand code

#

yeah i changed my can_play function from feder's version to atomic_part

#

i understand composite has to do with like.... reusing code more intelligently?

maiden phoenix
#

That's a badass name

frosty dock
#

yeah, it gives you access to the parts that have been calculated so you can reuse them, say for spectrum five

random sleet
#

was this tested with hands that aren't ore of a kind

frosty dock
#

I tested with spectrum and it seemed to work fine

random sleet
#

well maybe i'm just returning the wrong thing

#

should i return hand or {hand}

frosty dock
#

{hand}

random sleet
#

i seeeeeee

#

ok

#

is there an example of composite in action that i might be able to observe

frosty dock
#

I'll try and drop you one later, but should be fairly similar to like straight flushes

random sleet
#

see the problem with that is that it's not set up as a SMODS object so i do not in any way know how to do that lol

frosty dock
#

yeah I'll make an example, I have to anyways

random sleet
#

make an example out of me

#

everyone point and laugh

frosty dock
#

no

#

I refuse

random sleet
#

seal jank

frosty dock
#

huh

random sleet
#

ref_value = "nil_thac_jimbo_seal"

#

also im pretty sure vanilla code dies if seals have more than one underscore in their name

#

name/key/label whatever it's called

wicked moth
#

best art known to man

random sleet
#

mult pow...

random sleet
#

yeah :(

frosty dock
#

thacjimbo_seal

#

ew

random sleet
#

yep

#

uhhhh anything special about deck atlases?

#

oh the thing that's special is that they're no longer special

#

got it

frosty dock
#

nothing special unless you want to use the vanilla one

random sleet
#

used to be config.atlas now it's just atlas

#

đŸ«Ą unity

#

this is still unimplemented lol

frosty dock
random sleet
#

just not setting one seemed to pull the vanilla one

frosty dock
#

not sure if it tries to do thac_centers and just Falls back because that doesn't exist

random sleet
#

oh, maybe. this is (0,0) in pos after all, it'd look the same

#

good to know anyway

wicked moth
#

level 6 flush and wrathful joker is like

#

20k

wicked moth
random sleet
#

:)

random sleet
#

ok seems mostly functional, not sure why the 1 isn't showing up

#

ok nvm trying to enter the blind breaks the universe

frosty dock
#

oops

random sleet
#

"minor arcana"

#

mousing over any of them gives this error

golden lake
#

chat is this too much detail

wicked moth
#

have you looked at supernova

#

i don't think it's too much detail but maybe

golden lake
#

oh im being sarcastic

random sleet
#

... huh?

frosty dock
random sleet
#

tbf my code is a mess

#

oh im hella dumb

#

nvm

#

well maybe the crash is still happening but the visual stuff

golden lake
#

yippeee

random sleet
#

ok nvm removing the mod prefix from the atlases didn't work

#

vouch....

frosty dock
random sleet
#

on my end or yours lmao because i know my code is a MESS

frosty dock
#

uh

#

both?

random sleet
#

sick

#

sometimes i just be sayin stuff

frosty dock
#

I mean with the stuff I've been changing around for atlases, I sort of forgot about playing cards

golden lake
#

aure thoughts on the Collide joker

frosty dock
#

sick

golden lake
#

based on this

random sleet
#

pogress

frosty dock
#

pog ress

wicked moth
random sleet
#

ok

#

ignore that it's a touhou reference and that i'm cringe it's definitely funny because butt

wicked moth
#

me when no camel case

random sleet
#

:)))))

#

oh this deck is actually kinda hard lolll

#

but that's probably more to do with Oddities not having a lot going for them yet lol

maiden phoenix
#

1$ bill is game changer what do you mean???

random sleet
#

not having tarot cards SUCKS

mellow crag
#

Oddities looking good

random sleet
#

that is an Arcana Pack

#

(the deck effect now exists)

mellow crag
#

What does the deck do?

random sleet
#

+2 consumable slots but all consumables are oddities

mellow crag
#

Oh XD

random sleet
#

not having Tarot cards SUCKS

mellow crag
#

Catalyst win

random sleet
#

so true jestie

#

this fella is un-undiscoverable

mellow crag
#

Why?

#

Oh wait nine

#

Unun

random sleet
#

yeah for some reason he resists being undiscovered

#

i have no idea why

mellow crag
#

Determination

random sleet
#

oh good this is still happening