#💻・modding-dev

1 messages · Page 352 of 1

zealous glen
#

just skin and bones

modern kindle
#

well that depends on the seasonings methinks

zealous glen
turbid maple
#

what you got so far

zealous glen
#

which I am

wild escarp
#

This code ends up giving x5 mult on all played cards if there is any wild card in the hand at all, what am I doing wrong?

calculate = function(self, card, context)
  if context.individual and context.cardarea == G.play then
    for k, v in ipairs(context.scoring_hand) do
      if v.config.center == G.P_CENTERS.m_wild then
        return{
          x_mult = card.ability.extra.Xmult,
          colour = G.C.MULT
        }
      end
    end
  end
end
modern kindle
daring fern
#

Hand should be the string of the hand.

gusty iron
zealous glen
modern kindle
daring fern
gusty iron
#

the keys or the names

brisk rose
#

it's not the undiscovered reverse zodiac or joker evolution?

daring fern
#

Get the strings by iterating through G.GAME.hands with pairs and getting the key.

brisk rose
willow plinth
#

i'll research smods history

gusty iron
#

oh hello

brisk rose
#

like this looks normal?

gusty iron
turbid maple
wild escarp
brisk rose
# gusty iron

ah I see, and your brain is rotted so you wanted it to be mercury or pluto :P

#

(I like calling the hands by their planet names)

gusty iron
#

no its just what i pulled first

brisk rose
#

ah ic ic

gusty iron
#

i got a lvl 4 flush my next run

willow plinth
brisk rose
#

i thought you were excited by the specific result, but nah just /a/ result

gusty iron
#

i dont exactly know if the locked hands have a chance to be leveled up but if it is that would be hilarious

turbid maple
daring fern
brisk rose
gusty iron
#

oh my god peak

sturdy compass
turbid maple
#

you're checking the entire hand in the code that should check a single card

brisk rose
#

what if spectrum was rolled?

#

unless there's an in_pool too

gusty iron
sturdy compass
#

Oh huh

gusty iron
#

i just tweaked it a bit

brisk rose
#

so yeah there's an issue

gusty iron
broken rivet
#

is it possible to return two separate tables from a joker calculate function, or force the game to get two separate tables from it somehow?

willow plinth
brisk rose
#

i need to look at my stats screen

broken rivet
#

trying to make a joker that behaves as both a left and right blueprint

sturdy compass
gusty iron
daring fern
brisk rose
gusty iron
#

the unlock condition is "Play a hand type 75 times in one run"

broken rivet
#

it somehow made sixth sense straight up do nothing

brisk rose
#

like doesn't even sound that complex if you can do a normal blueprint

sturdy compass
#

Yeah but it's gonna be hard

#

Cuz that's two effects you need to calc

daring fern
broken rivet
#

ah
i do need to be careful of jokers that already return extra tables though

daring fern
broken rivet
#

oh

#

so i just make sure the one with the extra table goes inside one without pretty much

#

my worry is nuking an extra table by accident

daring fern
broken rivet
#

though that'd only affect hiker and 8 ball in vanilla

brisk rose
#

it would probably be very very helpful

weary haven
#

hell yeah

brisk rose
#

well someone is remaking all jokers in smods now

#

so it will be

daring fern
broken rivet
#

ah fun

red flower
#

i have code for that extra table thing

broken rivet
#

oh?

#

where

red flower
zealous glen
#

SMODS has an utility function to merge tables, although you might want to nest returns into extras

gusty iron
#

how do i set the starting money of a challenge?

#

nvm i think i figured it out

brisk rose
brisk rose
gusty iron
#

added another modifier, tell me if i should change anything

brisk rose
onyx sonnet
gusty iron
onyx sonnet
#

I see

#

Ban Hermit and Temperance

gusty iron
#

ill allow those too

#

mainly because i dont know the keys

onyx sonnet
#

Pretty sure it's just

#

c_hermit

#

And c_temperance

gusty iron
#

also what are all of the money tags

onyx sonnet
#

I only remember economy and investment

gusty iron
#

im guessing those are t_economy and t_investment?

#

tag_economy i mean

onyx sonnet
#

There's another one but I don't remember it's name

#

Just check the collection

gusty iron
daring fern
onyx sonnet
#

That's the one I forgot

gusty iron
#

i dont think the id is the same as the name

chrome widget
#

Are you able to declare an object as a Center rather than as one of the specific center types?

gusty iron
flat sorrel
#

tag_skip

red flower
gusty iron
#

tyty

chrome widget
#

I'm working on dummy items that primarily exist for ease of display in Challenges, but I'm encountering some issues with them still existing in pools and being counter for the stake ticker tally

#

So I'm trying to find the most effective way to have a displayable item that is otherwise ignored

red flower
#

Yeah I think you can extend from SMODS.Center
Not sure exactly how tho. I know Aiko's mod has a lot of dummy objects for UI stuff

chrome widget
#

I probably just have to follow the given implementation in the SMODS code then

wintry solar
#

iirc no_collection stops the counter too

chrome widget
#

far as I'm aware, no

#

I have all of these set to no_collection and they're still counted for joker stickers

lucid owl
#

posting waaay later, but unfortunately that didn't seem to work

#

(posting again just in case) i have a card modifier that makes played cards return to the deck. while the card modifier works perfectly, the effect of returning them to the deck results in strange ghost cards on the deck ingame. what's going wrong with this? i'm simply lovely patching G.FUNCS.draw_from_play_to_discard() and draw_card()

chrome widget
#

For example, the usable joker count is 270, 18 full pages. Meaning we should have 2160 stickers, but it's adding an extra 16 for these two dummy items set to no_collection = true because they're still part of G.P_CENTERS

wintry solar
#

This seems unintentional

chrome widget
#

On our part or on SMODS's part?

wintry solar
#

On smods part

#

I feel like hidden items shouldn’t count towards the sticker count

chrome widget
#

Another reason I'm having to wiggle around with it is because of mod compatibility, so someone encountered one of these because of the Equilibrium Deck

wintry solar
#

I wouldn’t worry about how cryptid fucks with pools if I were you

chrome widget
#

Which I believe is a similar pool issue

#

Although I would normally agree, I have been tasked by higher powers to ry

wintry solar
#

If they completely ignore the results of an in_pool function, that’s on them, not you

zealous glen
#

Do a Cryptid PR

#

But yes, if a mod doesn't respect weights or in_pool then it's their fault

wintry solar
#

Whilst I’m not hugely familiar with the cryptid code base, it does seem like a lot of it has been designed in a way to work with itself and not play amazingly nicely with other mods

hasty mist
#

i think it's "no_doe" to prevent something from appearing in deck of equilibrium

#

unless i misunderstood

red flower
zealous glen
#

When they see that Talisman breaks other mods they uninstall Talisman, surely 🙂

gentle rain
# chrome widget

counterpoint is that the thesis of cryptid is getting silly game breaks such as this

#

personally i would find if very funny if i found this myself

zealous glen
#

Let her fix it then make a bug report about the "non CardSauce Jokers" not showing up in the shop

gentle rain
#

hehe

red flower
#

easy fix assert(not next(SMODS.find_mod("Cryptid")))

lucid owl
chrome widget
#

Oh wait

#

Hold on

#

I think they just fixed it -- nvm it was keku

zealous glen
chrome widget
#

It was

zealous glen
#

Also I was telling someone to report the fix as a bug ;P

sudden cave
#

How does pseudorandom work? I see in the game's code for misprint it's doing this:

if self.ability.name == 'Misprint' then
    local temp_Mult = pseudorandom('misprint', self.ability.extra.min, self.ability.extra.max)
    return {
        message = localize{type='variable',key='a_mult',vars={temp_Mult}},
        mult_mod = temp_Mult
    }
end

But why does this not always give the same result? I've tried to use pseudorandom in my own code and it seems to always give the same value

red flower
#

pseudorandom always gives the same value if you do the same actions on the same seed, that's the point
unless you're talking about something else

sudden cave
#

Like triggering it multiple times always results in the same value

#

for me

red flower
#

it shouldn't

azure stone
#

Ive been trying to figure out the problem for a while, anyone have an idea on what it is?

red flower
#

it's a syntax error

#

you wrote the code wrong

azure stone
#

I understand that, just not seeing where

red flower
#

It tells you that there's a missing } near line 10

#

can't tell you more without seeing the code

azure stone
red flower
#

you're missing a comma after config

azure stone
#

oh

#

Lua is very finicky

red flower
#

also the local Xmult = {...} won't do what you want

red flower
azure stone
#

Got it

red flower
paper zealot
azure stone
#

That is very very useful for me

#

Considering I am just doing this for the first time with little coding experience at all

#

Thought that modding a game would be a good place to start

#

getting visual studio set up

lunar hemlock
#

how would i do exponent mult

daring fern
paper zealot
chrome widget
#

Okay yep made my PR

brisk rose
#

maybe I should try to make a BetterStats mod that actually displays all this shit in game

azure stone
#

also, I was thinking about having it so that a multiplier goes up by .1 for each 25$ the player has, what would be the formula for that?

brisk rose
#

I've done many many rounds in one hand

daring fern
brisk rose
azure stone
brisk rose
azure stone
red flower
#

did you install the lua extension

azure stone
#

I did

red flower
#

does it show you the errors in red?

brisk rose
azure stone
#

Got it

#

And no

red flower
#

weird

#

can you paste the code here

azure stone
#

SMODS.Joker{
name = "Midas Prime",
key = "Midas",
pos = {x = 0, y = 0},
rarity = 4,
atlas = "Lead",
config = { extra = {Xmult = 1.25, xchips = 1.25} },
cost = 6,
loc_vars = function {self, info_queue, center},
return { vars = { center.ability.extra.Xmult, center.ability.extra.xchips } }
end,
calculate = function (self, card, context)
if context.individual and context.cardarea == G.hand and not context.end_of_round and SMODS.has_enhancement(context.other_card,'m_gold') then
return {Xmult = card.ability.extra.Xmult, xchips = card.ability.extra.xchips}
end
end,
}

#

loc_vars is where it says the error is

red flower
#

you're using brackets instead of parenthesis

azure stone
#

it was working before?

red flower
#

i can assure you it wasn't

azure stone
#

I meant like, the joker and game was loading. Or are you talking about that one specific place?

red flower
#

loc_vars definitely wasn't working, maybe because of the comma you were missing it thought it was part of the earlier config

azure stone
#

That makes sense

lunar hemlock
lucid owl
brisk rose
#

but there are emault implentations that don't use talisman

paper zealot
# red flower

I blame Lua's daft curly-brace function call syntactic sugar for making this less obvious to first-timers... my_function{ arg1, arg2 } is equivalent to my_function( { arg1, arg2 } ) for function calls, but not for function definitions

open aspen
#

having a lovely folder at all in my mod crashes my game instantly

#

like as in crashes love

#

doesnt even open

open aspen
brisk rose
rough furnace
#

Send lovely log

open aspen
#

no crash

brisk rose
#

but yeah that makes sense being empty might throw an error

open aspen
#

well

brisk rose
#

because having a lovely folder is telling it to look for lovely patches there

open aspen
#

that seems to be the issue

rough furnace
#

Wait your on mac

#

Can you open the folder in the terminal

open aspen
#

yes

#

also

#

im doxxing myself 😭

rough furnace
#

Then run ls -a

open aspen
#

which folder

rough furnace
#

The lovely folder

#

The one that causes the crash

brisk rose
#

luckily

open aspen
#

here (also i readded the patches i did have)

#

like it crashes

#

whatevers in the folder

#

just to be clear

brisk rose
#

file

rough furnace
#

Try rm .DS_Store

open aspen
#

no

#

sadly

brisk rose
#

but isk why the unix style hidden name then

brisk rose
#

maybe not

open aspen
#

for some reason the crash log aint showing

#

anymore

#

ig i restart computer

#

which i dont wanna do rn

#

so im nt

#

not

brisk rose
#

i mean plenty of types of crashes don't show logs

brisk rose
worthy stirrup
#

how can i replace the high contrast cards with my own?

open aspen
#

mac only shows one crash log at a time

#

and the window with the previous crash log

#

isnt showing

rough furnace
#

Try to CD into your mods directory and run find . -name ".DS_Store" -delete

sleek cliff
#

maybe this is because I'm a starter coder, but I'm not seeing what's wrong with the code like the game is saying

brisk rose
#

syntax stuff is silly and hard to debug

shut crater
#

what the documentation is actually telling you is what values the context table has

sleek cliff
shut crater
#

so when context.individual is true, and context.cardarea == G.play, then the context table has those values

sleek cliff
#

alrighty, so what parts do I change

brisk rose
rough furnace
#

Are you sure that lovelt folder is the one causing the issue?

#

Like if you disable that mod does it stop crashing?

open aspen
#

removing my mod stops crashing

#

removing the lovely folder in my mod

#

also stops the crashing

brisk rose
open aspen
#

but like the patches are required for a lot of stuff

rough furnace
#

Wait question is your lovely folder open in finder rn?

open aspen
#

ok to be clear the lovely folder for patches?

#

it is open

rough furnace
#

Yes

rough furnace
#

Can you make sure it'd not open in any then rerun the command sboce

shut crater
rough furnace
#

Then try

shut crater
open aspen
open aspen
sleek cliff
brisk rose
#

meant to self reply

rough furnace
brisk rose
#

and walk back what i said about return

open aspen
#

no ds store

rough furnace
#

Hmm

#

I can check more thourghly in like an hour msybe

open aspen
#

ty that would be MUCH appreciated

rough furnace
#

Can you send me the log again since it was deleted

#

I'll need that

#

I dont need the first few lines

shut crater
# sleek cliff for each Ace played, +10 mult

ok, so your if statement is correct which is good. Inside your if statement you want to check if other_card is an ace (which I don't remember off the top of my head but I think is something like other_card:get_id() == 14) and if it is, return { mult = 10 }

open aspen
#

lovely?

#

wait

#

i see a parse error now

shut crater
craggy pumice
#

Rlly wish there was caino example lol

brisk rose
flat sorrel
# craggy pumice Rlly wish there was caino example lol
if context.cards_destroyed and not context.blueprint then
    local faces = 0
    for _, card in ipairs(context.glass_shattered) do
        if card:is_face() then faces = faces + 1 end
    end
    if faces > 0 then
        card.ability.extra.Xmult = card.ability.extra.Xmult + faces * card.ability.extra.Xmult_mod
        return { message = localize(type = "variable", key = "a_xmult", vars = {card.ability.extra.Xmult}) }
    end

elseif context.cardarea == G.jokers and context.joker_main then
    return { xmult = card.ability.extra.Xmult }
end
red flower
#

recreating vanilla effects is fun

#

calculate_context should go at the end

flat sorrel
#

you can view any vanilla joker impl in card.lua + search for their display name (e.g. "Mr. Bones"). then you just have to translate it a little into SMODS context (so no prob)

oblique pond
sleek cliff
#

GYAHAHAHA IT WORKS

oblique pond
#

i thought this joker would be easy to make, i have been proven very wrong (yall see any issues with calculate? i'm not sure what's being done wrong)

sleek cliff
gusty iron
#

how would i define a new currency?

sleek cliff
#

I love ctrl+c, ctrl+v

#

omg two hearts
amaryllis i see you

brisk rose
#

thinking of actually combinging these tables and others like them

#

I kinda wanna write a sceipt that will take this file (unpacked profile.jkr) and two or more keys, and combine them, outputting the full file with the changed

#

taking the name and the order from the first table passed, which would be the one that's ip to date

scarlet thorn
#

were you able to unpack the .jkr files? I was trying to use cyberchef, but its deflate and love's deflate dont seem to work with eachother

brisk rose
#

there's already a utility online to pack and ipack these

edgy reef
#

You can also jsut have this done after leanching the game (which will have them unpacked for you).

brisk rose
brisk rose
#

i'm not much of a coder yet, lol

#

but because it is lua inside might be better

#

so i don't have to reimplement stuff in python or whatever

brisk rose
brisk rose
#

but the profile is what i need anyway

brisk rose
#

idk if true

#

easily could be badly misremembering

#

i just know i get garbage

#

yeah it's onlyu 18 k

#

nevermind

#

idk why it's weird

gusty iron
#

for some reason my ui isnt loading??

local ui = {n = G.UIT.ROOT, config = {r = 0, h = 8, w = 6, colour = G.C.MULT}, nodes = {
{n=G.UIT.C, config={align = "cm"}, nodes={
            {n=G.UIT.T, config={text = "Testing", colour = G.C.UI.TEXT_LIGHT, scale = 0.5}}
 }},
}}

  G.HUD_upgradetree = UIBox({
    definition = ui,
    config = {parent = G.ROOM_ATTACH, type = "cm", hover = true} 
  })
    print('added ui')
unkempt thicket
gusty iron
#

i dont think so, but shouldn parenting it just make it show?

unkempt thicket
#

The code is separate from everything else if it's never called or in a function that runs.

gusty iron
#

yeah i added in in a addevent function

unkempt thicket
#

You want to make your UI appear when the player starts a new run correct?

gusty iron
#

yeah

#

actually its in the apply function for a deck

unkempt thicket
#

So you want it on the deck?

gusty iron
#

no its ui that appears when you're using the deck

#

itll have an "upgrade tree" button at the top of the screen, which opens the ui for it

sleek cliff
#

here we go again

shut crater
#

comma at the end of line 85

#

you should install the lua extension in vscode

sleek cliff
#

shit youre right

unkempt thicket
#

Kind of like i did here

gusty iron
rough furnace
azure stone
#

Does anybody know how to make the display work?

#

For a joker, because the value I am putting in keeps coming up as nil

#

Even though it's fully functioning

red flower
azure stone
#

thank you

sonic cedar
#

does anyone know where wheel_of_fortune 's nope code is? wanna setup a variable that tracks each time it hits nope

gusty iron
#

HELLO UI

sonic cedar
#

why did i not send the code am i dumb

#

(ignore the findcard part obv that's the edit)

rough furnace
unkempt thicket
# gusty iron yeah im just testing to see how i would actually spawn ui in the first place

Buttons tend to be in their own functions and would call on your main function. G.FUNCS.insc_change_scribe = function(e) The place you are looking to make a patch is in the function G.UIDEF.view_deck in target = '=[SMODS _ "src/overrides.lua"]' to make UI appear in deck view. Though I'm sure there's other places you could patch to achieve a similar effect, that's just how I did it.

scarlet thorn
sonic cedar
#

hell yeah thanks

scarlet thorn
scarlet thorn
#

Oh shit yea I forgot. I mucked up my line numbers by formatting the files

#

Just search what I said

sonic cedar
#

oh ok ok

shut crater
#

lovely dump > vanilla source

#

it's a hill I'll die on

#

or at least fight for

#

dying is a bit extreme

sonic cedar
#

yeah but im slightly too lazy to do that

scarlet thorn
glad osprey
shut crater
glad osprey
#

code lines won't be shifted by patches

shut crater
#

oh you just mean for sharing where to look

glad osprey
#

yea

scarlet thorn
#

Ive got autoformat or smth, and at one point in the last 4 months I mustve ctrl+s'd card.lua

#

so all my stuff is mucked

rough furnace
# shut crater lovely dump > vanilla source

Nah I always use source because otherwise some random person desjded to change one line halfway through and then I do something that I shouldn't do because it only works when their mod is present

shut crater
#

yeah I guess that makes sense, I was operating under the assumption that only SMODS was in the mods folder but if you have other mods/patches then that would screw it up

rough furnace
#

Also it helped me fix an accidental dependency one time

scarlet thorn
#

if/when im making content in a mod, I like to use a simple cryptid modpack, so that I can quick reference vanilla and post-mod code

gusty iron
#
if context.end_of_round and not context.repetition and not context.game_over and not context.blueprint and context.main_eval then
  level_up_hand(self, G.braidedhand, true, 3)
end
``` this doesnt seem to be running
brisk rose
# brisk rose

I just realized that even if this is being stored as lua in game, it's definitely being unpacked to json

#

this is after tryign to trat it as a lua listin some onine lua running

brisk rose
#

lmfao

scarlet thorn
#

it could help you

gusty iron
#

context.main_eval seems to be false, any reason why??

brisk rose
lucid owl
#

(posting again just in case) i have a card modifier that makes played cards return to the deck. while the card modifier works perfectly, the effect of returning them to the deck results in strange ghost cards on the deck ingame. what's going wrong with this? i'm simply lovely patching G.FUNCS.draw_from_play_to_discard() and draw_card()

scarlet thorn
brisk rose
lucid owl
#

i use table.insert() at one point but it has basically the same function as :emplace()

scarlet thorn
#

Im saying like, after all calulations are done, whatever the context is for that idk, emplace the cards to the G.deck cardarea

#

Or loop over G.discard.cards and only those with the edition are replaced

gusty iron
lucid owl
brisk rose
rough furnace
#

Also can be pretty printerd

#

(The actual raw save would be entirely on one line I believe)

brisk rose
#

just a big ol lua table?

rough furnace
#

Yeah

#

Well it's actually just Lua code that returns a table

brisk rose
#

fair

brisk rose
rough furnace
#

I mean if you want you can use my tool to just concert to and from the lus

#

You'd just have to write a tiny amount of code

#

Also my json conversion isn't perfect

brisk rose
#

I mean... that's only better insomuch as I don't really wanna relearn python when i should be learning lua

scarlet thorn
#

smods bundles a json lib with it

brisk rose
#

which tbh is kidna a good reason

#

lol

scarlet thorn
#

you could look at that

paper trout
#

how can i get a card's enhancement in a way that will work as an input to set_ability? like i can see a couple different ways to get bonus card from this but which one would work as an input for that without me having to convert it to smth else first?

brisk rose
#

just formatted a bit nicer

scarlet thorn
scarlet thorn
brisk rose
#

from his own mouth

scarlet thorn
#

?

brisk rose
#

wilson made the site? I wouldn't like wanna convert it to json for the shit of it myseelf

#

so i'd rather work directly with the lua than possibly nonstandard json

rough furnace
#

My json is standard it just doesn't support everything

brisk rose
#

plus i don't know python or anything else any better than lua at this point

rough furnace
#

Like infinity

brisk rose
#

oh sorry

#

i misunderstood

gusty iron
rough furnace
#

But you could make a lua program to read the lua and then just write it to json using the json lib

scarlet thorn
#

i was just saying that the json lib existed, didnt know ur plans

brisk rose
rough furnace
#

The stats screen in game?

brisk rose
#

mods change keys and stuff sometimes

rough furnace
#

Why do you need to do anything out of the game then?

brisk rose
#

for the same joker

rough furnace
#

Oh wait

#

Sorry I think I understand

brisk rose
brisk rose
old bane
rough furnace
#

The game is probably easier to do stiff because all the data that's saved in the files is already loaded

scarlet thorn
#

My current project was gonna be out of game

#

until I just decided to make it ingame

#

better UX and easier development by miles

#

Also wanted to make it work without smods, but ........ not gonna happen 🙂

brisk rose
#

just to edit a text file with a script

#

essentially

gusty iron
#

good luck.

scarlet thorn
#

debug plus watch lua path function:

brisk rose
scarlet thorn
#

ye

brisk rose
#

as I said i know i could do that, but it'd suck for the above reasons

#

when it's a very simple task that should not involve all that nonsense in theory

#

the nonsense of starting and stopping a video game and debugging

scarlet thorn
#

you wouldnt have to start or stop ever

#

unless it crashes

#

you can just test the code instantly

brisk rose
scarlet thorn
#

Just copy it, and use that one

#

NFS.read / NFS.write to make a copy

brisk rose
#

ah, i see where you're getting

#

use the game like a terminal

scarlet thorn
#

yep

#

Ive got absolutely 0 idea how to run lua outside of a roblox project, or through lovely lmao

#

so its how I roll

#

unless I google "online lua compiler" lmao

brisk rose
#

took me way too long

brisk rose
brisk rose
#

which isn't a lot

#

but is a big text file

gusty iron
#

how do i stop a suit from spawning in naturally?

brisk rose
#

and would return true when you did want it to spawn

scarlet thorn
#

love.threads are a wild beast to tame

brisk rose
#

so the only real issue here is like.... idk how to develop inside of debugplus and not just lose everything if i press the wrong key and haven't caopied it to my clip board

#

i guess I'll have to be alt-tabbing

#

because i want to write it as something i can reuse

frigid blaze
#

Guys, can anyone advise want to make a dna joker but I was told vanilla doesn't make sense, where to start?

scarlet thorn
brisk rose
scarlet thorn
#

youd be able to get them from there

brisk rose
#

as I said i'll just have to be tabbing in and out of notepad

brisk rose
#

it'll go to the logs duh

scarlet thorn
#

yea

brisk rose
#

brain no worky sometimes

scarlet thorn
#

on god

naive raptor
#

is there a context for xmult?

scarlet thorn
brisk rose
#

wait maube not

naive raptor
scarlet thorn
#

Or maybe im thinking of exponentia

scarlet thorn
#

it would be cryptid/jens

brisk rose
naive raptor
#

i think cryptid has an exotic like it yeah

brisk rose
#

lmfaoo

naive raptor
#

lemmie check the wiki

#

i think theres a cryptid wiki

scarlet thorn
#

thats for contributing to cryptid afaik

#

but it doesnt hurt to check

faint yacht
naive raptor
scarlet thorn
naive raptor
#

alright ill check cryptid's code

#

which may be a bad idea but whatever

scarlet thorn
old bane
#

cause i tried looking at how joker display did it and it's too confusing

rough furnace
scarlet thorn
rough furnace
#

Unless you just mean like testing stuff quick

#

Otherwise remember the lovely log keeps it

scarlet thorn
#

I think only the bottom part would be relevant there

manic rune
#

how do i check if a consumable is a spectral card?

scarlet thorn
#

set == "Spectral"

manic rune
#

i remember having to check set or something, but can't remember where it is

scarlet thorn
#

self.set or card.config.center.set

manic rune
#

mm none worked

scarlet thorn
#

smth like that

manic rune
#

oh nevermind

#

the second one works, thanks

scarlet thorn
#

lesgo

#

Who wouldve thought crashing would be a bad thing and lead to bad results

#

(not a debug plus issue wilson dw)

manic rune
#

truly

scarlet thorn
#

gotta wipe my mods folder again woo

naive raptor
scarlet thorn
#

mmmmmm

naive raptor
scarlet thorn
#

Honestly, best way is just copy the implementation and credit cryptid

lethal belfry
#

totally, completely new to modding... what am i doing wrong here exactly

scarlet thorn
#

is JDJ ur mod?

lethal belfry
#

yes

#

very placeholder stuff

scarlet thorn
#

Show where you define SMODS.Atlas (if you do at all. if you dont, thats the problem)

lethal belfry
#

also yeah i'm using an example code for right now

scarlet thorn
#

show the joker your making

lethal belfry
scarlet thorn
#

is Jokers.png is assets/1x/Jokers.png and assets/2x/Jokers.png?

#

uhhuh

lethal belfry
#

yeah it's there

brisk rose
scarlet thorn
lethal belfry
#

and yeah same for 2x

scarlet thorn
lethal belfry
#

yup

scarlet thorn
#

then I have no idea

lethal belfry
naive raptor
scarlet thorn
naive raptor
#

the one in 2x should be 142x190

scarlet thorn
#

its 95 not 92 lmao i cant read

lethal belfry
naive raptor
#

try booting up the game again

lethal belfry
scarlet thorn
#

odd

lethal belfry
#

is it because of my dependecies maybe???

scarlet thorn
#

OH

#

i got it

manic rune
#

thats really old

scarlet thorn
#

you have assets/2x/Jokers/Jokers.png

#

remove the jokers folder in between

#

its just 2x/Jokers.png

naive raptor
#

oh lol

scarlet thorn
lethal belfry
naive raptor
#

how did we all miss that

scarlet thorn
#

You sure?

scarlet thorn
rough furnace
lethal belfry
#

what do you mean remove the jokers folder?

scarlet thorn
lethal belfry
#

isn't that how it usually is?

scarlet thorn
#

well

lethal belfry
#

what

rough furnace
#

The game uses it for writing save files

scarlet thorn
#

you need to specifiy its in the folder in your assets defintiong

naive raptor
rough furnace
#

also DebugPlus uses it for it's config

scarlet thorn
#

you could replace "Jokers.png" with "Jokers/Jokers.png"

lethal belfry
#

ahhh okay

scarlet thorn
#

tho that raises the question

#

why does talisman use nativefs then

lethal belfry
#

eyyyy it doesn't crash yippee

brisk rose
rough furnace
#

yes

#

why would you not just rely on the game to save your changes?

brisk rose
rough furnace
#

oh wait i see

brisk rose
#

I want to preserve all the data

scarlet thorn
brisk rose
scarlet thorn
#

local x = NFS.read("...profile.jkr")
NFS.write("path", x)

brisk rose
scarlet thorn
#

x is the string of the file

rough furnace
#

I think you can use compress_and_save("tmpprofile.jkr", G.PROFILES[1])

scarlet thorn
#

you could run love.data.decompress with deflate

#

and get the raw

split cairn
#

is there a way to make a joker spawn another card with the eternal sticker on it?

scarlet thorn
brisk rose
rough furnace
#

what is your end goal?

scarlet thorn
#

ive completely lost what you are trying to do

#

yea lmao^

#

smth about joker stats changing cause of a key change?

#

i think

brisk rose
# rough furnace what is your end goal?

So the problem I'm solving is duplicated joker entries in the table from modded jokers changing their keys over time. This means that the stats screen is all messed up and for me only currently shows vanillia objects despite some mod objects i still posess having better numbers in actuality. The solution is to give it the keys of the duplicate objects and combine the sibtitles in such a way that the key and order are kept for the current version, the the numbers for the same values are added, and any fields present on any version will now be there

#

I say jokers because that's goal one, but this is any objects shown on the stats screen

rough furnace
#

so why do you need to write your profile to a file at all?

brisk rose
#

i can just store it as a temp variable

rough furnace
#

the profile doesn't save by default

#

eval G.PROFILES[G.SETTINGS.profile].joker_usage.j_joker.count = 1000000
look at stats
close game
stats are reverted when you check again

split cairn
brisk rose
#

i wanna save time and not have to reload if i make a mistake which i will many times

scarlet thorn
faint yacht
#

...eternal is a sticker.
SMODS.add_card({ key = "j_mod_key", stickers = { "eternal" } })

scarlet thorn
#

yknow, youre right

frigid blaze
#

Can you tell me how to make a particular Joker appear in the store less often than others?

scarlet thorn
#

why am I thinking seals

scarlet thorn
#

Usually you should use a custom rarity for that type of stuff

brisk rose
#

G.PROFILES[1] contains exactly the sata strructure I feel like I should be working with

#

hence why I wanted to copy it somewhere (a file was maybe silly) to work on it

#

or am i misreading the compressed tables in the logs and it also has the other crap in meta.jkr?

frigid blaze
carmine burrow
#

maybe a weird question why do you want different jokers of the same rarity to appear with different frequencies

brisk rose
#

To eleborate @frigid blaze if 3 pollable rarities isn't enough, you can wlways add more

#

like a 'supercommon' or 'ultrarare' or 'demicommon' or whatever

rough furnace
split cairn
#

is there a way to bypass the Eternal sticker? i want to make a joker that can destroy consumables even if they are eternal

faint yacht
#

-# Just don't check if it's Eternal.

carmine burrow
#

i think a lot of code with eternals is just hardcoded? don't quote me on that

brisk rose
#

from printing it

rough furnace
#

yes

split cairn
rough furnace
#

a string isn't useful in game

brisk rose
# rough furnace a string isn't useful in game

I mean... hence why it isn't useful to me either, lol. I want it loaded in memory as a table to edit it, just in a different location not to have to reboot or reload a backup of the profole.jkr if i messs up

faint yacht
# split cairn how?

...quite literally, don't check for card.ability.eternal, just call :remove() or :start_dissolve().

scarlet thorn
brisk rose
#

you surely see why having it loaded as a table makes it easier to trat it like one and combine entries, right

scarlet thorn
#

me saying im pretty sure as if I havent done it loads of times

carmine burrow
split cairn
#

im trying to make it so that when a specific joker is sold, it also destroys an eternal consumable

#

like the ability cards in Polterworx

rough furnace
#

yeah etenral doesn't actually preveny anything

narrow iron
#

this joker should turn all played cards into glass when a 3 of a kind is played, before scoring, but for some reason the cards dont become glass until after they get removed once scoring finishes

the fliping animation still plays at the right time tho

faint yacht
#

Consumables support eternal_compat & perishable_compat too, fwiw.

scarlet thorn
split cairn
rough furnace
#

just get the card and call the method

faint yacht
#

Check for consumable existence and randomly select a consumable in the same way Perkeo does it, then just slay with :remove() or :start_dissolve().

rough furnace
#

or :explode() if you're feeling especially fancy today

split cairn
old bane
#

Would the effect "allow Stone Cards to stand in for any rank in a straight or X of a Kind" be a good Rare effect on its own?

basically a mini-shortcut

faint yacht
#

SMODS.add_card it via add_to_deck of said Joker.

scarlet thorn
old bane
#

okay cool

#

now to actually like code it in

old bane
scarlet thorn
#

Iwouldnt say that

#

^

scarlet thorn
#

set it to false

#

unless delay-sprites doesnt do what I think

narrow iron
scarlet thorn
#

cause midas mask and vampire use true...

scarlet thorn
#

yea try zombies

narrow iron
#

also didnt work

sage crater
#

if I'm trying to give the player a consumable, what function should I be using?

split cairn
faint yacht
#

Should, ye.

daring fern
#

How does one remake the old gold seal?

split cairn
faint yacht
#

...did it spawn at all?

split cairn
sage crater
# daring fern `SMODS.add_card`?

would that replace card:add_to_deck() in this code: ```lua
calculate = function(self, card, context)
if context.using_consumable then
G.E_Manager:add_event(Event({
func = function()

                local card = context.card

                card:set_edition('e_negative', true)
                card:add_to_deck()
                G.consumeables:emplace(card)
                return true
        }))
    end
end
daring fern
sage crater
#

oh lol

daring fern
# sage crater oh lol

Are you trying to make a negative copy of the used consumable when a consumable is used?

sage crater
#

yes

#

oh also I forgot it should be only when a consumable is used from a pack

#

that probably makes it harder, though

#

I'll deal with that later

sage crater
daring fern
manic rune
#

card:add_to_deck is actually only used to proc add_to_deck effects afaik

scarlet thorn
#

I dont mean to be a bother, but bepis or something, are either of you able to help me test a mod?

manic rune
#

mm sure :p

narrow iron
#

i'd also be fine with testing if you'd need it

sage crater
#

how do I make the first mult get recognized as the game's current mult instead of a bonus mult to the total sum?

daring fern
sage crater
#

yes

#

I don't know what talisman is, but if you recommend it, I'll check it out

sage crater
#

indubitably

#

ok, so how do I do emult with talisman

#

(I just downloaded talisman)

daring fern
sage crater
#

fantastic

#

and number is whatever I want the exponent to be?

sage crater
#

follow up question: if this joker gets procced twice for whatever reason, will it do (x^2)^2) or x^(2+2)

#

messed up the code somehow and it didn't work 😔
luckily no crash, but also no debug report, so I have no idea why it's not working

sage crater
#

god damn

daring fern
#

Or (x^^2)

daring fern
#

Also you spelled consumeable wrong (right)

sage crater
gilded blaze
#

yay, safe check oyes

sage crater
#

something's wrong with the event manager methinks

scarlet thorn
daring fern
sage crater
#

a h

#

muchas gracias

#

it works 🎉

brisk rose
# rough furnace a string isn't useful in game

So, I'm getting pretty tired, and this is just shitty psudocode only trying to be lya off my head, but it should give an ideal of the rough scope of what I'm doing. It's also not done, but as i said, riired


combine = func(temp_profile, key1, otherkeys}
    combined = temp-profile.joker_usage[key1]
    additions = {}
    for v, i in ipairs(otherkeys) do
        doners[i] = temp-profile.joker_usage[v][i]
        end
        for pairs in e, r in doners do
            for pairs n, m in combined
            if is_number(combined[n]) and not n[1] then n[m]=n[m]+e[m] 
        end
             end
        for v, i in pairs (diners) do
            if not combined[v] then combined[v] = v[i] end
        end
#

can anyone make any sense of this at all? lol

sage crater
daring fern
brisk rose
#

for anyone tuning in, this is a script to combine entries in my profile for jokers that are the same joker but had their key chanhed at some point

#

for the purposes of the stats screen

#

it's meant to be evauled directly with debugplus

sage crater
#

this is what I have currently

brisk rose
daring fern
daring fern
sage crater
#

while my game loads, is the booster_pack.REMOVED the check for if you skip the pack?

#

oh wait

#

ok good news and bad news

#

it's not working

#

but the copies are also not doing what they are supposed to do

#

like the copy gets consumed and then does nothing lmao

#

ok nvm it's just for planet cards

#

ok nvm I'm just wrong lol

sage crater
#
calculate = function(self, card, context)
        if context.using_consumeable and G.booster_pack and not G.booster_pack.REMOVED and SMODS.OPENED_BOOSTER then
            G.E_MANAGER:add_event(Event({
                func = function(self)
                    SMODS.add_card({
                        key = context.consumeable.config.center.key,
                        edition = "e_negative"
                    })
                    return true
                end
            }))
        end
    end
``` current code
brisk rose
daring fern
brisk rose
sage crater
#

ok new update: it stopped working and for some reason, that one pluto was cracked out of its mind lol

brisk rose
sage crater
#

I used a single pluto like 12 times and then the effect just entirely stopped working

sage crater
#

WAIT

brisk rose
# sage crater looks interesting

it's kinda a niche thing because i doibt many other people care if modded jokers (and planned for other objects) show up accurately on their stats screen

#

but i don't like seeing it just full of vanillia objects when that's not accurate

sage crater
#

fire

brisk rose
#

just so y'all can actually /see/ what the hell i'm on about

#

it's the count value that's used for these

scarlet thorn
#

I'm 100% against changing keys in a released mod cause people's current run might get borked

#

Tho when you update, you shouldn't really start an old run

#

But it's just that typa thing

brisk rose
# brisk rose

so morefluff's coupon catelog should be right behind abstract, but it doesn't even show up because the second one is the actual current entry

#

it shou;d actually be number 1 with both combined

#

and yes, my win/los ratio is abusmal, lol

brisk rose
#

overall tho....

#

164 wins to 1551 losses

#

but a lot of that is like... debugging my modpack

#

which are runs i never finish, and this losses

#

and the cine's used must be a real new value

lucid owl
#

i spend more time debugging than i do actually playing balatro

scarlet thorn
#

I have 500 hours in balatro

#

And 1 achievement

brisk rose
#

I used to play a lot more

#

so i got a lot of those

scarlet thorn
#

And maybe 20 finished runs

lucid owl
#

speaking of debugging, i fixed the source of an issue i was annoyed at for 3 days and i don't even know how i fixed it

brisk rose
#

I binged vanillia for a month or so when i first got it

#

aand used to play a lot more on mods casually before the modpack, lol

lucid owl
#

i play vanilla on mobile all the time but on PC, i have like 90 hours and maybe 6 achievements because i'm always fiddling with my mod

brisk rose
#

but also i just got back into the community like a month or 2 ago

#

i think i'mma get back to playing again once things settle down with the comeback

sleek cliff
#

is there a way to make a mult for one card type and chips for another? this code I wrote is giving me just chips all around

brisk rose
#

i'm modpilled af, lol

#

whenever i'm playing vaniliia i wish i had my mods

#

and i only play canillia on phone too

daring fern
brisk rose
#

am i missing something?

scarlet spire
#

you're returning chips = card.ability.extra.mult

regal ether
scarlet spire
#

instead of mult = card.ability.extra.mult

regal ether
#

so if the first case is true then the second case never does anything

brisk rose
#

and it won't both be true'

#

i don't think

sage crater
scarlet spire
#

these cases will never overlap, it's checking ranks

#

returning twice is fine here

brisk rose
scarlet spire
#

you'll be in a little trouble if quantum ranks are ever figured out, but this is pretty much fine

sleek cliff
#

test time

frigid blaze
#

What are the standard values of the:
Rare
Common
Uncommon
Legendary
?

brisk rose
sleek cliff
brisk rose
#

strings work now

scarlet spire
#

all of my jokers are 1-4 and it's still supported syntax so I keep using it for consistency, I am not going through every single one to fix them

brisk rose
scarlet spire
#

well, maybe i'll go fix that when I go through uprooting all my loc_txt to turn them into localization files

brisk rose
# frigid blaze Weight

so the way it works is they're given a number between 0 and 1 is rolled and depending on if it's higher than a cetain value that determies the rarity

#

of the joker being polled

frigid blaze
brisk rose
#

this has always ben used too, for polling afail

#

and legendaries can't be polled

plucky terrace
#

When i install Steammodded directly from github it still says that there are files missing. I am on Mac s othat could be what causes it. @ in reply please

brisk rose
#

they on;y happen if it's manually set to 1

regal ether
#

i still use the index system

#

¯_(ツ)_/¯

#

idgaf

#

its 0.3 seconds faster

brisk rose
#

haven't modded any of my own yet

scarlet spire
#

oh yeah I can see using it when you have custom rarities

sleek cliff
#

I'll probably set my rarities later, I don't need to set them in shops at the moment

scarlet spire
#

how to count: 1. 2. 3. epic. 4. exotic.

sleek cliff
#

I also need to figure out how to do secondary types, cause I need to seaprate in Classic, Revival, Hero, and Villain

#

I'm not going to do Alien and Human cause that'll get really annoying

brisk rose
#

this is what they're taling about @daring fern

brisk rose
frigid blaze
brisk rose
brisk rose
brisk rose
sleek cliff
#

I just gotta get a border and those fuck ass lines out of there

slow ocean
#

this is such an intimidating image

brisk rose
scarlet thorn
sleek cliff
#

I like the CRT :)

scarlet thorn
#

I've seen them before on other jokers with no border

sleek cliff
#

ohhh

#

yeah, the Jokers are the correct sizes in the code and separated, but they just kinda have those things there

frigid blaze
daring fern
sage crater
sage crater
# sage crater That worked!

Pranked. Turns out it did not, in fact, worked 😔
It gives you copies of cards that are already in your consumable slots if you have a booster pack open, and haven't selected a card yet

#

any way to fix this?

#

I assume I need to check if the context.card's area is not already in your consumable slots

sage crater
daring fern
sage crater
#

ah

#

that gives me a bit of resolve

sleek cliff
daring fern
daring fern
daring fern
sage crater
# sleek cliff yeagh,

mm that's unfortunate then. Idk why it's giving you the extra pixels.
If the software you're using has a grid system, maybe turn that on with a 71x95 grid view and see if any are overstepping their area?
Alternatively, make sure all sprites have at least 1 pixel space on all sides. That should probably help too.

dawn portal
#

HOW DID YOU FIGURE IT OUT @unkempt thicket
I'm having a similar issue
I have

discovered = false,
no_collection = true,
in_pool = false,
yes_pool_flag = 'uncompletable_condition'```
All set, but I keep finding the joker in the shop, is there something I'm missing?
daring fern
dawn portal
#

oh my god

#

thank you

spark pumice
#

How do I get it to delete only the non-scoring cards? I tried context.cardarea ~= G.play but that also deleted the cards in hand

spark pumice
#

Ohh I see ty

shut crater
#

Also goated reference

spark pumice
#

I low key made it a little too op, but it should be fine if I just don’t think about it

#

Also ty

scarlet thorn
#

You can make it rarer than other jokers with the pools options

#

As far as I know

spark pumice
#

Oh actually?

daring fern
#

How does one make a joker that copies all jokers?

scarlet thorn
daring fern
spark pumice
#

Oh like blueprint?

daring fern
scarlet thorn
#

There's an smods.blueprint function

#

Somewhere

#

Does exactly that

#

But

#

There's some limitations

daring fern
#

Yes, but how do I copy all joker's abilities?

scarlet thorn
#

You could try retriggers

scarlet thorn
#

A joker in my main mod is blueprint but left and right

#

And I've gone through hell making it work

#

Although smods 0500 might make it easier

#

There was something in the changelog I saw

sage crater
scarlet thorn
#

You would end up with 5 cards max if you used that joker....

#

Or sorry

#

Wait no yea 5

#

No.

#

It's highcard

spark pumice
#

1 card

scarlet thorn
#

Non scoring as in not held in hand yea?

sage crater
#

non-scoring as in played and weren't the high card

scarlet thorn
#

Yea

#

Okay I was just not reading right. 3am and shi

sage crater
#

right there with ya lol

spark pumice
#

Lol

#

But yeah, I thought it'd be mostly alright since it has like near zero practical scaling, not really sure how to balance it in a way that still feels satisfying though

sage crater
#

usable once per round would be a good start methinks

spark pumice
#

Ahhh yeah

#

How do I keep track of that though?

sage crater
#

you could also do smthn like "playing a pair destroys all non-scoring cards. Chips from destroyed cards are split between the scored cards" or smthn

sage crater
#

this is the first thing that comes to mind. There's probably a built in check, but I don't know it

#

oh, and then also you need a func that runs at the end of a round to set hasActivated = false again

spark pumice
#

Ahh yeah ok

#

Ty! I'll figure something out 👍

daring heron
#

how do i make lovers convert 3 cards instead of 1?

#

tried this but it didn't work