#💻・modding-dev

1 messages · Page 409 of 1

solid mesa
#

It's been working 3 times with me

normal crest
#

H_2 for 2 of hearts

long sun
#

i'll take a look

solid mesa
#

time to go for the 4

long sun
#

thanks ^^

wintry solar
#

N, I cba to look now, do you remember if your get_current_pool change for editions culled e_base?

red flower
#

yes

sonic cedar
red flower
#

it checks if the editions have in_shop

#

and i added it to the vanilla editions but not base

wintry solar
#

oh nice

#

as far as I can tell, e_base exists purely for the collection

sonic cedar
#

pretty e_based of them

#

tough crowd

red flower
midnight coyote
#

how do i see a playing card's suit

#

oh wait

#

nvm

#

ill just check vanilla remade my goat

red flower
#

card.base.suit

midnight coyote
red flower
#

why check vanillaremade when you have the vanillaremader

#

that doesn't sound good

midnight coyote
normal crest
#

hi vanillaremader

sonic cedar
#

reading the book with the author in front of you

long sun
#

mm, i don't exactly know what Grim is doing

gentle rain
#

whats the function that return's a joker's chips/mult/whatever without actually using return {}?

long sun
#

i see it's patching some stuff relating to added_menu_button, but that seems to just be making sure it's only there once

gentle rain
normal crest
#

SMODS.calculate_effect

long sun
#

ah i see, hmm

#

hold on

gentle rain
#

ahh ty

midnight coyote
#

hey is this debuff source a little much or are we good

red flower
#

:p

midnight coyote
sonic cedar
#

i know three guys who did that

unborn bay
#

what if

#

no :p

sonic cedar
#

what if

normal crest
#

i'm gonna start using that debuff source too

sonic cedar
#

q: on

midnight coyote
#

is it better now >:(

sonic cedar
#

yeah

red flower
#

yes

normal crest
#

that's a great mod prefix

sonic cedar
#

the N part is important

solid mesa
unborn bay
#

debuff sources are useful because it means your debuffs are guaranteed to always exist

long sun
#

isn't that a mod suffix

midnight coyote
unborn bay
#

instead of disappearing when you use death on completely different cards

midnight coyote
#

with blackjack and hookers

sonic cedar
#

so steamodded

hushed field
#

Retriggering jokers is still an optional feature, right? Or is it base Smods now?

sonic cedar
#

optional

red flower
#

it's optional

wild escarp
#

I must be doing something wrong, because with this code I just crash when trying to view the deck of the challenge.

deck = {
    cards = {
        { s = 'Clubs', r = '10' }
    }
}
normal crest
#

s = 'C', r = 'T'

sonic cedar
unborn bay
#

wtf!

#

bill cipher

north swallow
#

GYTS GIW HOW DO I MAKE IT SO IT REPEATS SMODS.BLUEPRINT_EFFECT 2 TIMES

sonic cedar
#

just do it again

#

smh

#

eyeroll

normal crest
#

using SMODS.calculate_effect if i had to guess

willow scroll
#

How would I physically move the title screen sprite a bit to the left? Trying by looking at others code but im failing

red flower
normal crest
#

right

north swallow
normal crest
#

that doesn't work with retriggers

red flower
#

you need to nest extra tables i think

sonic cedar
#

can you not use extra tab-ok yeah

normal crest
#

but what if the return table already has an extra

sonic cedar
#

i know someone who can answer that

normal crest
#

i guess you just find the one that doesn't by looping through them and putting it there

red flower
sonic cedar
#

you should pr NOW

normal crest
#

but what if it has infinite extra tables

sonic cedar
#

go beyond infinity

red flower
normal crest
#

trick question, just make space in the hotel

sonic cedar
#

is mario there

north swallow
normal crest
#

you have to store the return value of blueprint_effect

red flower
midnight coyote
#

would self.name for modded blinds be the key with prefix

red flower
#

like return SMODS.blueprint_effect(..)

normal crest
#

you'd just use self.key

red star
#

Okay, have to tag the jokers to a separate pool to account for the separate joker limit.

If I only want the Extra Deck (will rename as needed later) to appear for a certain deck, do I change the toggle for show.extra.deck from the number of extra deck jokers is more than 0 to something like requisite deck is in use ? Or do I just set the toggle switch in the deck event? Or do both need to occur for different reasons?

midnight coyote
#

but ill just use self.key

normal crest
#

uhh

normal crest
midnight coyote
#

I <3 function hooks

#

theres probably a far better way to do this but

#

oh well

north swallow
normal crest
normal crest
normal crest
#

to do what you want to do needs more work

north swallow
red flower
red flower
#

all in jest and bountiful do it incorrectly 😭

midnight coyote
#

okay so self.key does not exist in the context?

normal crest
#

local function to recursively search the effects table until it doesn't have extra?

glass crown
#

how would i go about making a joker turn itself into another joker?

normal crest
#

that's what i'd do

midnight coyote
north swallow
normal crest
wild escarp
#

What could I use to have a challenge deck start with one random card?

midnight coyote
red flower
#

yours is more simple but what you want to do is combine both returns using the function in the second link

normal crest
#

so what you're saying is that we need SMODS.combine_effects or smt

midnight coyote
red flower
glass crown
normal crest
#

:D

north swallow
glass crown
#

hmm, ill have to figure something out for that then

normal crest
glass crown
#

that would work yeah

red flower
normal crest
#

i'm scared of set_ability

#

weird stuff happens when you do stuff like that

red flower
#

i use it a lot and nothing wrong happened

normal crest
#

try making a wee joker into a bigger joker

#

i think that was an issue

red flower
#

i think that was fixed

normal crest
#

awesome

red star
#

Is there something I can call that tells me what deck is in use? Like an already defined "variable" (I'm sure I'm not using that word in the right context), or do I need to figure out how to go the long way?

normal crest
#

it changes size accordingly if you turn it into a vanilla one

red flower
#

damn

north swallow
normal crest
#

i think you might've copied code that wasn't relevant to your problem

#

but idk

north swallow
#

im just trying to figure out how to do it

#

cz i gen cant find anything on how to do this

red flower
#

I think you want

local ret1 = SMODS.blueprint_effect(...)
local ret2 = SMODS.blueprint_effect(...)
return Balaling.recursive_extra({ret1, ret2}, 1)
north swallow
#

that looks good

#

ill try

red flower
#

sorry sometimes my advise is less useful when im on my phone where i cant bother coding than when im on my pc haha

red star
#

Plus you're eating dinner, right? Something tasty I hope?

north swallow
red flower
#

i just set up the rice cooker actually

sonic cedar
red flower
#

im making that PR while i wait

red flower
sonic cedar
#

nvm

red flower
#

i might try them out and send them a pr

midnight coyote
#

how do i see the current level of the played hand?

north swallow
#

YESSSSS IT WORKS

#

THANKS

#

i can now do my homework

red flower
midnight coyote
#

thankies

scarlet imp
#

I'm trying to make a consumable that can sell a Joker, how to I make sure that it can't pick an eternal joker and it can't be used if all jokers are eternal

midnight coyote
red flower
#

oh yeah

normal crest
#

as for the selling part, idk

desert ore
#

I'm planning on making a joker based on the amount of prime cards in your deck, but I'm not sure how to theme it, can anybody think of a pun or fun wordplay for it? there's got to be something good there

scarlet imp
#

Make it look like a soda or something, like the Prime drink lol

desert ore
#

hm, but then it's a food joker that doesn't act like a food joker lol

long sun
#

hiya! i have a consumable type — two questions:

  1. is there a way to make each card of the type appear several times, showman-like? [i'm using SMODS.ConsumableType]
  2. i'd like to place one card of the type in the booster pack area, each shop — how can i do that?
normal crest
#

i don't think you can do #1 on your type, you'd have to do it on each consumable

red flower
normal crest
#

in your in_pool function of each consumable you'd do that ^

red flower
#

for the shop you would probably hook/patch create_card_for_shop? I'm not sure where boosters are created or what the booster area is called rn

desert ore
long sun
#

(oh ya, checking, does cost need to be defined for each, or can i define a default for the type?)

normal crest
#

you can't define one for the type, no

#

you need to define the cost for each consumable

long sun
#

gotcha ^^

normal crest
#

there is technically a way to help with that if your consumables have a lot of shared properties

#

for example, you can do

MyConsumable = SMODS.Consumable:extend {
  cost = 4
}

and then to create consumables you'd use MyConsumable { .. normal stuff here .. } without having to put the cost in each

#

not worth it if you only have 1 or 2 shared values imo

long sun
#

ah, gotcha :D

red flower
#

i think i should have done this at a time im more awake honestly

outer basalt
#

How would one make cards have a chance of breaking when triggered

#

i mean. like glass cards but on triggering i

#

(so if theyre retriggered a lot they have a bigger chance of breaking)

hushed field
#

The context for destroying a card is separate from the scoring trigger, so you could check in the scoring if the card should be destroyed, and just set a flag on the card

#

Then in the destroy context, check for that flag

outer basalt
#

Alright thank you

midnight coyote
#

how would i add a consumable to the shop pool, not too dissimilar to what ghost deck does for spectral cards?

#

damn

#

dead chat

red star
#

As I understand it, Ghost Deck just increases the Spectral Rate to a non-zero value.

#

If the consumable belongs to one set, but you don't want the whole set to be added, maybe you can temporarily override that individual consumable's set?

#

In total honesty, I am not the person who should be answering this, but maybe this will springboard you to a better answer.

midnight coyote
#


SMODS.Back {
    key = "ichor",
    atlas = CHAR.G.deckatlas.key,
    pos = { x =1 , y = 0},
    apply = function(self,back)
        G.GAME["ritual_rate"] = 2
        SMODS.add_card({key = 'c_charcuterie_phase'})
    end

}
#

@hushed field

hushed field
#

What's the crash?

midnight coyote
#

hold on

#

i copied this from my lovely log

#

so theres a certain part where it notices that main.lua is missing, this is false, i have a main.lua

#

but otherwise

#

functions/common_events.lua:2316: attempt to index local 'area' (a nil value)

#

oh

#

i need to give it an area

formal parrot
#

Hey so

#

My first time modding tarots

#

Can i

#

Use {c:attention} and others in tarot description ?

midnight coyote
#

always assume you can, objects not having text styling should be the exception

tawdry shale
#

anyone got an idea of how to change the joker used in the splash of the game?

scarlet imp
#

how can I check whether or not a card has an enhancement? right now I have:

if G.hand and #G.hand.highlighted == 2 then
    if G.hand.highlighted[1].config.mod_conv ~= nil and G.hand.highlighted[2].config.mod_conv ~= nil then
        flag = true
    end
end

but it doesn't work properly

vale glen
#

SMODS has a has_enhancement function

scarlet imp
#

W, thanks

wild escarp
#

How could I make a challenge deck start off with one random card?

scarlet imp
#

I'm guessing I just didn't access the card properly

vale glen
#

You can search the SMODS code to see how to call it

#

This can help too

outer basalt
#

what is happening to my card 😭

vale glen
#

Rank 0 :O

outer basalt
#

its 10 just the sprite is messed up 😭

#

its not. supposde to do that

#

oh waiy 💀 i fixed it. i had the pixel size messed up

solid mesa
#

why smods have a cat?

vale glen
#

Cats are fluffy

solid mesa
#

so the cat its responsible for when my mods crashes?

outer basalt
#

no

normal crest
#

it's john smods' cat

outer basalt
#

its responsiblke for when ur mods work

solid mesa
#

good to know

outer basalt
#

tis a beautiful kitty

worthy stirrup
#

i like cats

worthy stirrup
solid mesa
#

i cant read anything 🔥🔥🔥

worthy stirrup
#

wait

#

nvm

#

i didnt fix it

north lodge
#

Hey all, I am attempting to view into the future (like The Soul but as a mod). I am able to generate the next card from the shop, but no matter what I do, it always advances the actual game seed as well. I believe must be because when I am attempting to copy the seed, it copies by reference and not by value. I think my inexperience with Lua specifically is hurting me here. Any thoughts?

Showman.SEEK.GAME.pseudorandom.seed = G.GAME.pseudorandom.seed
worthy stirrup
#

i had one of the names as JNRR and then i changed it to JNAM, but that didnt fix it

wild escarp
#

I've got this so far to make a random suit and rank, but I can't use G.GAME for a challenge deck, what should I use instead?

local SMODS_calculate_context_ref = SMODS.calculate_context
function SMODS.calculate_context(context, return_table)
    local suit = pseudorandom('split', 1, 4)
    for i = 1, suit do
        if suit == 1 then
            G.GAME.willatro_split.suit = 'S'
        elseif suit == 2 then
            G.GAME.willatro_split.suit = 'H'
        elseif suit == 3 then
            G.GAME.willatro_split.suit = 'C'
        elseif suit == 4 then
            G.GAME.willatro_split.suit = 'D'
        end
    end

    local rank = pseudorandom('split', 2, 14)
    for i = 2, rank do
        if rank < 10 then
            G.GAME.willatro_split.rank = 'i'
        elseif rank == 10 then
            G.GAME.willatro_split.rank = '10'
        elseif rank == 11 then
            G.GAME.willatro_split.rank = '11'
        elseif rank == 12 then
            G.GAME.willatro_split.rank = '12'
        elseif rank == 13 then
            G.GAME.willatro_split.rank = '13'
        elseif rank == 14 then
            G.GAME.willatro_split.rank = '14'
        end
    end
    return SMODS_calculate_context_ref(context, return_table)
end
scarlet imp
#

is there a way I can remove the enhancement from something

scarlet imp
wild escarp
#

I guess that's better than what I did, but still doesn't fix my problem.

scarlet imp
#

what are you trying to change? make every card the same suit and rank at random from the start?

wild escarp
#

I have this all in a function, and I want to be able to use these values within a challenge deck.

broken tulip
#

hello modding dev people im having a weird thing goin on in my game that i can find a grand total of 0 info on would it be alright if i asked yall if you know anything or is that not a thing this channel is supposed to be used for

midnight coyote
wild escarp
broken tulip
#

i dont know whats up with the "X" above some cards. they just started showing up after i loaded the game during a run

#

if i remember correct i also saw a joker in the shop with an x above it

plucky terrace
#

anyone know?

midnight coyote
# tawdry shale anyone got an idea of how to change the joker used in the splash of the game?
 local SC = nil
            G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.2,func = (function()
                local SC_scale = 1.2
                SC = Card(G.ROOM.T.w/2 - SC_scale*G.CARD_W/2, 10. + G.ROOM.T.h/2 - SC_scale*G.CARD_H/2, SC_scale*G.CARD_W, SC_scale*G.CARD_H, G.P_CARDS.empty, G.P_CENTERS['j_joker'])
                SC.T.y = G.ROOM.T.h/2 - SC_scale*G.CARD_H/2
                SC.ambient_tilt = 1
                SC.states.drag.can = false
                SC.states.hover.can = false
                SC.no_ui = true
                G.VIBRATION = G.VIBRATION + 2
                play_sound('whoosh1', 0.7, 0.2)
                play_sound('introPad1', 0.704, 0.6)
            return true;end)}))

game.lua line 1445

#

i would patch that area and replace the card within G.P_CENTERS[] with whatever you like

#

do you need information on lovely patches?

glass crown
#

how would one go about pulling the level of the played poker hand? im trying to make a joker that gives chips based on the level of the played poker hand (+30 chips per level) and im just not sure how to start going about it

midnight coyote
glass crown
#

thank you 👍

plucky terrace
#

anyone that is smarter than me/Chatgpt know?

midnight coyote
#

this seems like an issue with brainstorm.

plucky terrace
#

yeah but i feel like im missing files cuz when i try to find the files from the error, there is just nothing there

midnight coyote
plucky terrace
#

i see, is there a way to view them all together or just deal with it? im on Mac unfortunately

midnight coyote
#

Though im pretty certain that Brainstorm does not play nice with later versions of steamodded but let me confirm that and if I am correct I'll attempt to give you a better option.

plucky terrace
#

like it launches and everything but as soon as I make any input whether keyboard or mouse it crashes

midnight coyote
#

yes, upon closer inspection brainstorm has not been updated in about half a year, which tells me it is likely not compatible with later versions of the API

plucky terrace
#

thats unfortunate, i loved brainstorm

midnight coyote
#

or, no

#

i am wrong

#

it doesnt even need steamodded

#

🤔

plucky terrace
midnight coyote
buoyant crag
#

how does context.blueprint work? i have a joker that works on its own but even with blueprint_compat = true it doesn't copy. figured i have to throw context.blueprint in somewhere

midnight coyote
plucky terrace
#

thanks anyways and keep being great

wild escarp
#

What can I even do in a challenge beyond the basic stuff?

midnight coyote
#

usually blueprint works by copying the return value of whatever your joker does, afaik

buoyant crag
#

oh well then that might be the problem, i do SMODS.calculate_effect since that worked on another joker that had multiple triggers

#

but i can just replace with returns if thats required

midnight coyote
#

usually the ideal method is returns

#

calculate effect is used if you want to do something before you return

buoyant crag
# midnight coyote can i see your joker's code?
        if context.cardarea == G.play and context.individual then
            if pseudorandom("bool") < G.GAME.probabilities.normal / card.ability.extra.odds then
                SMODS.calculate_effect({
                    card = card,
                    message = "BOOL",
                    Xmult_mod = card.ability.extra.Xmult,
                    colour = G.C.MULT
                })
            end
            if context.other_card:get_id() == 2 then
                if pseudorandom("bool") < G.GAME.probabilities.normal / card.ability.extra.odds2 then
                    return {
                        card = context.other_card,
                        message = "YEAH!!",
                        Xmult_mod = card.ability.extra.Xmult2,
                        colour = G.C.MULT
                    }
                    card.ability.extra.Xmult2 = card.ability.extra.Xmult2 + card.ability.extra.Xmult2_gain
                end
            end
        end
    end```
#

in this case, would it only copy the return in the 2nd if?

glass crown
#

what would be the best way to grab the string of the played poker hand?

buoyant crag
#

they were both calculate_effects at first, but if it only does the return{} then ig it wouldnt do the calculate effect in the first if

midnight coyote
#
calculate = function(self, card, context)
        if context.cardarea == G.play and context.individual then
            if pseudorandom("bool") < G.GAME.probabilities.normal / card.ability.extra.odds then
                return {
                    card = card
                    message = "BOOL",
                    Xmult_mod = card.ability.extra.Xmult,
                    colour = G.C.MULT
            end
            if context.other_card:get_id() == 2 then
                if pseudorandom("bool") < G.GAME.probabilities.normal / card.ability.extra.odds2 then
                    return {
                        card = context.other_card,
                        message = "YEAH!!",
                        Xmult_mod = card.ability.extra.Xmult2,
                        colour = G.C.MULT
                    }
                    card.ability.extra.Xmult2 = card.ability.extra.Xmult2 + card.ability.extra.Xmult2_gain
                end
            end
        end
    end
#

remember

#

once you return something, any code after cannot be executed

#

plan around this

buoyant crag
#

yeah fair, just didn't know that was a requirement for blueprint until now

#

thanks for the help

midnight coyote
#

yup yup

glass crown
midnight coyote
glass crown
#

thank you :3

#

i find modding this game fun, i just wish the documentation was more fleshed out

midnight coyote
#

np

outer basalt
midnight coyote
#

someone needs to add calculate to blinds

#

if you want something to document

wheat jewel
#

I'm trying to make a deck where all probabilities are guaranteed but idk what to add to make it work, it keeps saying "normal" for all probabilities when setting it to "v + 2" to test it

midnight coyote
#

if you're manipulating the game's probabilities

wheat jewel
#

yeah

midnight coyote
#

let me pull some code i made to help you out

wheat jewel
#

thanks

#

i have a joker that does something where all probabilities don't occur that sets all probabilities to v * 0

midnight coyote
#
add_to_deck = function(self, card, from_debuff)
        for k, v in pairs(G.GAME.probabilities) do
            G.GAME.probabilities[k] = v * 4
        end
        CHAR.FUNC.ease_risk(999)
        G.GAME.RISK_LOCK = true
    end,
    remove_from_deck = function(self, card, from_debuff)
        for k, v in pairs(G.GAME.probabilities) do
            G.GAME.probabilities[k] = v / 4
        end
        G.GAME.RISK_LOCK = false
        CHAR.FUNC.ease_risk(-100 + (G.GAME.round_resets.ante * 10))
    end,

this was for a joker, but im sure you can adapt it

wild escarp
#

Anyone know why steel cards made with this joker don't score?

calculate = function(self, card, context)
    if context.before and context.main_eval then
        local new_cards = {}
        for i = 1, 2 do
            for k, v in ipairs(context.scoring_hand) do
                if v.seal or v.edition or next(SMODS.get_enhancements(v)) then
                    G.playing_card = (G.playing_card and G.playing_card + 1) or 1
                    local copy_card = copy_card(v, nil, nil, G.playing_card)
                    copy_card:add_to_deck()
                    G.deck.config.card_limit = G.deck.config.card_limit + 1
                    table.insert(G.playing_cards, copy_card)
                    
                    copy_card.states.visible = nil
                    new_cards[#new_cards + 1] = copy_card
                    G.E_MANAGER:add_event(Event({
                        func = function()
                            G.hand:emplace(copy_card)
                        copy_card:start_materialize()
                            return true
                        end
                    }))
                end
            end
        end
        SMODS.calculate_context({ playing_card_added = true, cards = { new_cards } })
        return {
            message = localize('k_copied_ex'),
            colour = G.C.CHIPS
        }
    end
    if context.destroy_card and context.cardarea == G.play and 
    (context.destroy_card.seal or context.destroy_card.edition or next(SMODS.get_enhancements(context.destroy_card))) then
        return {
            remove = true
        }
    end
end
wheat jewel
midnight coyote
#

here let me kind of workshop something

#
apply = function(self,back)
  for k, v in pairs(G.GAME.probabilities) do
    G.GAME.probabilities[k] = v + 1000 -- Realistically makes everything happen all of the time
  end
end
wheat jewel
#

it gave an error??

midnight coyote
#

hm

#

show me

wheat jewel
#

hold on i think apply = function(self,back) will work

midnight coyote
#

yeah

#

i think i was going into autopilot there

wheat jewel
#

That’s ok ^^

wheat jewel
midnight coyote
#

hmm

#

OH!

#
apply = function(self,back)
  
    G.GAME.probabilities.normal = G.GAME.probabilities.normal + 1000 -- Realistically makes everything happen all of the time
  
end
#

try this?

wheat jewel
#

still crashes

#

idk if it is possible to make a deck change probabilities

keen totem
wheat jewel
#

Oops?

keen totem
#

oops has to have a check for removing it, but a deck wouldnt

wheat jewel
#

OH

keen totem
#

oa6

wheat jewel
#

oops all sixes

keen totem
#

yes

wheat jewel
#

Oh no i did for a joker i was making

#

i tried doing it for a deck but ig it doesn't work the same

keen totem
#

really?

wheat jewel
#

yeah

wheat jewel
#

i tried to do something like = v or smthn

#

set stuff to "normal" instead of a value

wild escarp
#

What should I do to reset this for every new run?

local SMODS_calculate_context_ref = SMODS.calculate_context
function SMODS.calculate_context(context, return_table)
    split_suit = pseudorandom_element({"S", "H", "C", "D"}, pseudoseed("split_1"))

    local _rank = math.random(2, 14)
    if _rank < 10 then
        split_rank = '' .. _rank
    elseif _rank == 10 then
        split_rank = 'T'
    elseif _rank == 11 then
        split_rank = 'J'
    elseif _rank == 12 then
        split_rank = 'Q'
    elseif _rank == 13 then
        split_rank = 'K'
    elseif _rank == 14 then
        split_rank = 'A'
    end
    return SMODS_calculate_context_ref(context, return_table)
end
keen totem
#

how do i set the rank of a card?

#

nvm i got it

#

SMODS.change_base(card, suit, rank)

normal crest
#

it does work

#

Rank has to be a string

keen totem
#

yea

#

i fixed it but i forgot to say that cause i had a bigger issue

normal crest
#

what is the bigger issue

keen totem
#

im fixing it rn

#

how does pseduorandom work if you dont specify a min and max

#

is a random float between 0 and 1?

wheat jewel
#

trying to make a deck change all cards to a random edition but my code isn't working

daring fern
wheat jewel
hushed grail
#

Can someone explain to me why context.card.set == 'Joker' is false here when buying a joker from the shop? I can't figure it out

daring fern
hushed grail
desert ore
#

Ok so I got this joker working, but the text only updates after it's used rather than fully dynamically like cloud 9/steel joker etc.

#

here's my code
calculate = function(self, card, context) if G.STAGE == G.STAGES.RUN then card:update_alert() card.ability.extra.prime_cards = 0 for k, v in pairs(G.playing_cards) do if (v:get_id() == 2 or v:get_id() == 3 or v:get_id() == 5 or v:get_id() == 7) then card.ability.extra.prime_cards = card.ability.extra.prime_cards+1 end end end if context.joker_main and card.ability.extra.prime_cards > 0 then card.ability.extra.mult = card.ability.extra.prime_cards*(card.ability.extra.mult_mod) return { mult = card.ability.extra.mult, card = card } end

#

do I need to hook where it does all the other global updated things or is there a simpler way

zenith sage
#

put 3 on each side instead of 1 on each side for a block

#
like


this
daring fern
zenith sage
#

all good :).

#

also

if (v:get_id() == (2 or 3 or 5 or 7)) then
  card.ability...
end

would probably be a more efficient way to write that

midnight coyote
#

hey @daring fern I know you told me how to do this before, but how should i go about actually implementing this?

daring fern
daring fern
zenith sage
#

too bad

midnight coyote
#

but first check if there i a card to the right, ofc

zenith sage
#

lua mid tier fodder

#

gets mercy points for not being javascript

midnight coyote
#

which 2 is always gonna be existent so its only gonna check it the ID is 2

zenith sage
#

does lua have match / switch

daring fern
midnight coyote
#

hm

daring fern
midnight coyote
#

is there any way i could get an example of how i could go about this? any mods, etc

#

well my idea isnt letting the card to the right repeat itself

#

its more blueprint-esque in how it works

daring fern
midnight coyote
#

it copies what the card to the right does 3 times on top of what the card does on it own

midnight coyote
#

ill look in to that

chrome widget
#

Oh that video is busted wiw

zenith sage
#

which is probably not possible in lua either

daring fern
zenith sage
#

yeah most likely

#

but it (lua) is made to have extremely basic interpreters so its good at what its designed for ig 🤷‍♂️

chrome widget
#

the closest equivalent would be:
if {[2] = true, [3] = true, [5] = true, [7] = true}[v:get_id()]

desert ore
zenith sage
#

or the rust alternative

#

match v:get_id(): 2,3,5,7:

desert ore
#

so like is what I did for my get id inefficient and I should do something more efficient or is it really not that big a deal at this small a scale

onyx sonnet
#

Again, ideally

#

If you don't feel like doing it, it won't be the end of the world

desert ore
#

aight, I thog

#

localthunk does it this way anyhow

onyx sonnet
#

Thunk also has misspellings in his code, i wouldn't treat the source code as a holy bible or anything

sleek cliff
#

is there a way to have a blueprint type card but for only a specific select of Jokers

sleek cliff
#

how so

daring fern
sleek cliff
#

yes

daring fern
# sleek cliff yes

Then you would get a random joker that matches a list of keys from the owne jokers.

desert ore
lucid owl
#

some of that code is a bit unneeded but eh

#

is there a reason this joker isn't doing anything with blueprint? i'm simply attempting to create a random card (of the Silly type) every 15 discards. it works for the base joker, but blueprint simply does nothing (updated screenshot)

north lodge
#

I'm working to implement a mod that works like The Soul, the seed analyzer.
I can successfully generate cards in the shop; however, whenever I do, it seems to either remove the joker(s)/item(s) from their respective pools, or just spin up something else with rng.
Example: With the seed ABC123, the first jokers in the shop are Foil Throwback and The Trio (*I have on steammodded which messes with rng slightly, meaning the results are different from The Soul online). If I play into the shop, I see it. If I generate the first joker, my console output says foil throwback, but then when I get to the first shop, it is a foil To The Moon. The second joker is still The Trio though
Any thoughts?

sleek cliff
#

how do I have it to flip the direction of blueprint

gray void
crisp coral
north lodge
#

I have what I hope is two parallel RNG seeds

gray void
crisp coral
#

the other culprit is that using the stock function marks the generated joker as used, so it cannot be generated again without showman

north lodge
#

Do you know where exactly it marks it as used?

#

That's what I've been trying to find

crisp coral
#

create_card

lucid owl
north lodge
crisp coral
#

something used_jokers

#

i'm not checking

crisp coral
#

try moving the reset inside the event

lucid owl
#

shoot, sorry for reply ping

lucid owl
#

which i do want it to do

crisp coral
#

then uh. just add a sanity check for that

lucid owl
#

wdym by that

crisp coral
#

if slots full then reset
else event + reset

plain gazelle
#

I don't understand how the gift card changing card sell values works. I want to equal a Joker/Consumable's sell value to a variable;
Equaling other_card.sell_cost does nothing to the card's sell value in game;
Equaling other_card.ability.extra_value adds to the card's sell value

lucid owl
#

now to figure out why the effect is onyl showing on the base card and not bp

#

not sure why that's happening

lucid owl
sleek cliff
#

basically

daring fern
# sleek cliff basically

Then you would do ```lua
local other_joker
for i=1, #G.jokers.cards do
if G.jokers.cards[i] == card and G.jokers.cards[i-1] then
other_joker = G.jokers.cards[i-1]
end
end
if other_joker then
return SMODS.blueprint_effect(card, other_joker, context)
end

lucid owl
sleek cliff
#

thamnk

#

its still doing to the right for some reason??

thorn furnace
#

How would I make a consumable not be destroyed after using it

thorn furnace
#

o
thanks

sleek cliff
plain gazelle
#

It got buried by other messages so I'll ask it again
I don't understand how the gift card changing card sell values works. I want to equal a Joker/Consumable's sell value to a variable;

Equaling other_card.sell_cost does nothing to the card's sell value in game;
Equaling other_card.ability.extra_value adds to the card's sell value

sleek cliff
#

hooooold on i think i got it

daring fern
plain gazelle
sleek cliff
north lodge
# crisp coral something used_jokers

The constructor for Card auto-set the "used_jokers" for the joker ability to true, thus why it would get skipped. So setting it back to (whatever it was before, to cover the corner case where you already had the one) solved it :D

#

And now that I can predict the shop, time to slap on a neat gui and maybe do some math and shit.

sleek cliff
#

somthing is fucking up and idk what

sleek cliff
#

ok, so its on a select few???

#

ALL of these are saying compatibility with Salamander

#

they don't actually copy, but they just say it

thorn furnace
#

Is there a way to set the price of a consumable in the shop

daring fern
plush stream
#

how do I make a joker text that shows how much chips it currently gives (a scaling chip joker)

primal terrace
hybrid shadow
#

does the game have something to track your current run's most used tarot card

plush stream
hybrid shadow
plush stream
#

in the description

#

like the place where it explains the joker ability

hybrid shadow
plush stream
#

(ignore the text its outdated)

hybrid shadow
plush stream
#

yeah

hybrid shadow
# plush stream this?

you wanna use loc_vars for your localization text (loc_vars makes it so anytime a variable in your card's config is modified, it'll change the number in the description)

plush stream
#

ohhh

hybrid shadow
# plush stream ohhh
loc_vars = function(self, info_queue, card)
 return {
  vars = {
   card.ability.extra.chip_mod, card.ability.extra.chips
  }
 }
end,```
#

and then in the localization text you can use #1# to refer to the chip gain, and #2# to refer to current chips

plush stream
#

woah

hybrid shadow
hybrid shadow
plush stream
#

thank you for help!

hybrid shadow
#

np, the localization is pretty much the only part of balatro coding that i know well enough to help others with lol

cursive sentinel
#

is there a way to get the list of cards held in hand? like context.scoring_hand?

cursive sentinel
#

does it need the context.cardarea = G.hands beforehands?

#

also does it react well (as in, is a strict context) for enhancements check with quantum on?

daring fern
cursive sentinel
#

but then that would prevent me from checking enhancement? I'm trying to do a similar check as flower pot but for cards held in hand

daring fern
#

context.check_enhancement only gets called when SMODS.has_enhancement is trying to check for quantum enhancements.

pure salmon
#

how do i force a card to be drawn from the deck during a blind?

cursive sentinel
#

wether i use discard or pre_discard, it prints me 8 (default hand size) on discard, and the accurate size (6 if i played two cards) on hand played

if (context.before or context.pre_discard) then
  print(#G.hand.cards)
end
summer furnace
#

Ok so I am trying to make a custom challenge and when I select my Challenge it just crashes :/

    key = 'Simon says: 32',
    loc_txt = 'Simon says: 32',
    jokers =        
    {
        {id = 'thirtytwo', eternal=true },  
        {id = 'simonsays', eternal = true},
    },
    vouchers = 
    {
         {id = 'v_magic_trick'},
    },

    unlocked = true
}``` That's the entire code I have about this challenge am I missing something or did I do something wrong?
daring fern
summer furnace
#

oooh, that makes sense thank you!

summer furnace
# daring fern Your joker keys need to be like `j_modprefix_key`

Hmmm still crashes with the same error :/ ```SMODS.Challenge {
key = 'j_Jokeful_simonsays32',
loc_txt = 'Simon says: 32',
jokers =
{
{id = 'thirtytwo', eternal=true },
{id = 'simonsays', eternal = true},
},
vouchers =
{
{id = 'v_magic_trick'},
},

unlocked = true

}``` Do I need a SMOS.Atlas or something like that for challenges?

daring fern
summer furnace
#

oh 😭

daring fern
#

Also the key can't have spaces.

summer furnace
#

Yea I fixed that also

daring fern
#

Also loc_txt should be a table.

summer furnace
#

now it works thank you!!!

floral narwhal
#

how can i call a enhancement from another mod?

daring fern
floral narwhal
#

oh thanks

summer furnace
#

How could you do a Xchip? Or is it just not possible?

daring fern
simple locust
#

This cool effect—I’d really love to add it to my enchantment right now, but I’m not sure how to do it. Has anyone made something like this before?

white forum
#

so i'm trying to create a rare consumable that has 1 in 4 chance of giving you a random tag, i am trying to use the P_TAGS but it returns length of 0, is there any way to get the entire tag list and iterate over it?

hushed field
molten musk
#

so i have been looking at this localization example and i tried following it
but still not working, dont know maybe i dont get C_exmp_spectral,
like is the name used somewhere else or what?

#

any advice?

unborn bay
#

iterate through it with pairs

#

ipairs reports nothing on dictionaries

white forum
plush stream
#

my stupid brain forgot what pos was for :P

molten musk
#

from what i was told, its the position of your sprite in the sprite sheet

white forum
# molten musk any advice?

maybe the comma in the closing entry }, some programming languages shit themselves if you have a comma but no object after

plush stream
#

ohhh yea

molten musk
molten musk
#

i just dont know if i need to change the name somewhere else or not

thorn furnace
#

If I access G.hand.cards while playing a hand, does that include the played hand or no?

cursive sentinel
#

printed this morning #G.hand.cards, and it takes the after played before drawn, held in hands

hushed field
#

.cards

thorn furnace
cursive sentinel
#

although it does seem to keep including cards discarded

thorn furnace
#

o

cursive sentinel
#

to my great despair

thorn furnace
#

ill hope it works out i guess

molten musk
#

this is hard YoiCry

#

or i just lack exp

hushed field
plush stream
#

How do I find the right coordinates in my sprite sheet?

molten musk
#

rows and columns?

plush stream
#

wait nvm I probably found the problem

molten musk
#

haaaaaaa RAZOR_ANGRY

#

any free coding coach? Xueyi_Helpless

somber pulsar
#

Why isnt my lovely injector working

#

it keeps crashing

#

can someone please help me 😭

molten musk
#

umm, send a photo of the crash

somber pulsar
#

i cant send photos but i can send the crash error

#

ERROR - [♥] lovely-injector has crashed:
panicked at crates/lovely-core/src/lib.rs:315:51:
called Option::unwrap() on a None value

#

asked gpt but it didnt really help me that much

molten musk
#

@daring fern can u help?

somber pulsar
#

balatro version: 1.0.1o

#

full

molten musk
#

now u wait for someone who know how to fix lovely "not me lol"

somber pulsar
#

0.7.1

red flower
molten musk
red flower
#

well, show it

red flower
somber pulsar
#

i downloaded the version on github

#

it was released in...

#

jan 22

red flower
#

well that's not what i asked

somber pulsar
#

yeah

#

it does

long sun
#

hi again ^^

red flower
somber pulsar
#

no

#

not yet

plush stream
red flower
somber pulsar
#

oh wait actually

molten musk
somber pulsar
#

whoops

#

its fixed now

#

okay thanks i guess

red flower
long sun
#

i've been looking at the code for booster spawning, and am trying to figure out how to put a Resource card in there, and i've found that the game uses G.shop_booster to store them

#

that's a start ^^"

long sun
#

aha, okay, that's called in update_shop, so i can probably hook that ^^

molten musk
#

it goes in "other" ....
now i feel like an idiot, had the vreamade in front of me and didnt think to check it

#

was on another example

thorn furnace
#

How do I check the sticker of a card

hushed field
#

Bool*

thorn furnace
#

o

unborn bay
#

pretty sure its also the same for modded stickers as well

#

including the mod prefix

thorn furnace
#

what bool might that be

hushed field
#

Depends on the sticker

#

For example, eternal stickers just set the card.ability.eternal value to true, iirc

thorn furnace
#

fair

hushed field
#

The vanilla implementation of stickers really means that they're just a visual indicator. There's not really much of a sticker framework, so they're a bit quirky compared to seals or enhancements

thorn furnace
#

fair

#

was hoping to test whether or not a specific consumable had a certain modded sticker or not

molten musk
red flower
#

show

molten musk
red flower
#

aren't you missing the +

#

also you don't need to add seal at the end if your key doesn't have it

molten musk
#

first Seals is the prefix right? then no im not missing +

red flower
#

there's no prefix for seals

#

it's modprefix_key

molten musk
#

this right?

red flower
#

oh then yeah

molten musk
#

same issue

red flower
#

what's your key for the seals

maiden phoenix
molten musk
red flower
#

yeah the keys should also be like "Seals_Jade"

molten musk
#

oh

#

ok

molten musk
molten musk
red flower
#

show the loc file again pls

maiden phoenix
#

the key should be self.key .. "_seal"

molten musk
#

i can stream if u are up to it

maiden phoenix
molten musk
#

alot easier

red flower
#

im off to work sorry

molten musk
#

its okay

red flower
#

but yeah append "_seal" at the end i was wrong on that lol

molten musk
maiden phoenix
#

Yea if your seal key is called "Jade" then it should be jade_seal

molten musk
#

oh

#

i see

#

om

red flower
molten musk
red flower
#

ok it is

#

i should have read that

unborn bay
#

hi n

maiden phoenix
#

haya.toml

red flower
#

hi hayaya

molten musk
#

hmm

#

no

maiden phoenix
#

Show your loc code and seal code

red flower
# unborn bay hi n

i was trying to find code on gh yesterday for doing multiple blueprint copies and yours was the only correct one i found thank you

molten musk
#

here

#

give the vid a min to upload

long sun
#

am struggling ;u; there's gotta be an easier way to add a card to the booster area, in the shop ;u;

molten musk
daring fern
long sun
#

i've hooked Game:update_shop, but i don't know what to do dfgkjndf

red flower
long sun
#

wait :O!! okay lemme try that

#

where do i add that?

red flower
#

i have a hook for SMODS.calculate_context that adds an extra booster in a similar way in context.starting_shop

molten musk
#

@maiden phoenix u can see the code in the vid

long sun
#

ah :D

molten musk
#

awaiting instructions ....

maiden phoenix
#

Oh your loc key should be seals_jade_seal

red flower
# long sun ah :D

idk if that will work automatically because you need to add the shop ui to the card too

long sun
#

i'll give it a go ^^ what arguments does calculate_context take?

red flower
daring fern
molten musk
#

isnt it already that?

#

or u mean j instead of J?

maiden phoenix
#

Don't put upper letters, it's all lowercase

#

in the key at least, not in name

molten musk
#

ok will try that

#

also change in the seals.lua or just in the loc

#

??

molten musk
#

not crashing

#

but seals not showing

#

it shows me this

maiden phoenix
#

You forgot to put your atlas in your Seal object

molten musk
#

this?
do i change something?

long sun
#
local context_ref = SMODS.calculate_context

function SMODS:calculate_context(context, return_table)
  if context and context.starting_shop then
    SMODS.add_card { key = pseudorandom_element(G.P_CENTER_POOLS.phanta_CatanResource, pseudoseed('monopolychosenresource')).key, area = G.shop_booster }
  end
  context_ref(context, return_table)
end```
#

ah wait ignore

#

forgot to return ^^

daring fern
maiden phoenix
#

Also I think your SMODS.Atlas should be defined above your seals

#

Not sure if it causes issues if it's below

long sun
#

yay perfect!! it does need the shop UI though, but i can add that :>

#

(also, first shop blueprint fkjgndfkjgfd)

#

wait, just checking, are there any SMODS functions that add card UI?

unborn bay
#

pretty sure shop card ui isssss a base game function

#

create_shop_card_ui

long sun
#

ah yeah ^u^

molten musk
#

worked but shows the same seal

#

do i give a diff key for every seal?

long sun
#

does SMODS.add_card return the added card?

maiden phoenix
#

yes

long sun
#

grand :D

maiden phoenix
#

So for example if you want the top left one it'd be {x = 0, y = 0}

molten musk
#

every seal is its own sprite

maiden phoenix
#

Oh they're individual? Then you must make a SMODS.Atlas object for each seal

long sun
#

yay :D

willow scroll
#
molten musk
#

spectrals issue?

#

i guess its the same as the seal issue

#

gonna review the code and see if i can fix it

molten musk
#

dont know what i did

#

it just happened

formal parrot
#

Me when

#

Modding

molten musk
#

deleted everything i did the last 10 mins and still the same

zenith sage
#

somewhere in your code you have #pool

#

pool is a variable that has no value nil

#

you cant take #nil

#

# is the length operator

red flower
#

it's in smods code

#

you probably have the wrong key when you create a card or something like that

formal parrot
#

🆙

molten musk
#

gonna go through it again 😩

#

found in which code the issue is

#

dont know what the issue is

thorn furnace
#

If I do card:get_id() of a King, will the response be 13 or 'King'?

crisp coral
#

13

thorn furnace
#

okii

#

thank u

summer furnace
#

How would I take ownership of a challenge?

    jokers = {
        {id = 'j_Jokeful_gold', eternal = true}
    }
}```this is what I tried to do, but it crashes with this crash log

(I fixed it below is the correct code for anyone asking on how to do it aswell)

```SMODS.Challenge:take_ownership('rich_1',
    {
        jokers = {
            {id = 'j_Jokeful_gold', eternal = true},
        },
    },
    true --makes it "silent"
)```
thorn furnace
#

the code in screenshot two appears to be the relevant snippet causing the crash
in case it's important, screenshot two precedes screenshot three code-wise

molten musk
#

would love to help but i have no clue

thorn furnace
violet oasis
#

Is there a "total hands" variable? Not in the round, but total for the current game

#

Total hands played, I mean

summer furnace
#

local card = create_card() How does this function work?

daring fern
summer furnace
#

ooh, How would that work?

daring fern
summer furnace
#

ooh, okay thank you!

plush stream
#

Is it possible to make something trigger every time the word joker appear in screen

red flower
#

everything is possible with the power of computers

#

but probably really complicated

plush stream
bold sleet
#

I mean.

broken cliff
red flower
bold sleet
#

It is possible.

plush stream
#

woah

broken cliff
#

you literally have

bold sleet
#

classic, GM or modern

broken cliff
#

a Turning machine or smth

#

Turien machine

#

Turnan machine

unborn bay
#

turing

broken cliff
#

tuning machine

red flower
#

Tolkien machine

unborn bay
#

toning machine

broken cliff
#

talking machines

unborn bay
#

tanning machine

bold sleet
#

tiring machine

broken cliff
zenith sage
#

couldnt get one of my cards working that iterates through the hand
and in an attempt to identify the problem i eventually just copied the entire calculate function from raised fist VR
and it doesnt do anything

red flower
#

i tested raised fist specifically so it should work

zenith sage
#

i believe you, i had mine working at one point too

#

just not sure how i could have messed that up

red flower
#

show code?

zenith sage
#

    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.hand and not context.end_of_round then
            local temp_Mult, temp_ID = 15, 15
            local raised_card = nil
            for i = 1, #G.hand.cards do
                if temp_ID >= G.hand.cards[i].base.id and not SMODS.has_no_rank(G.hand.cards[i]) then
                    temp_Mult = G.hand.cards[i].base.nominal
                    temp_ID = G.hand.cards[i].base.id
                    raised_card = G.hand.cards[i]
                end
            end
            if raised_card == context.other_card then
                if context.other_card.debuff then
                    return {
                        message = localize('k_debuffed'),
                        colour = G.C.RED
                    }
                else
                    return {
                        mult = 2 * temp_Mult
                    }
                end
            end
        end
    end
red flower
#

i mean that looks like raised fist

zenith sage
#

indeed

red flower
#

so it does nothing?

zenith sage
#

correct

#

wait

#

okay yeah nvm

#

thought it was because of loc vars

#

but there are none

#

wait part 2

#

might need a new copy of it cause i changed the code and loaded a save

#

that wasnt it 😔

zenith sage
#

oh

#

maybe you need to iterate through that list

#

like

#

for i in dead
smods.destroycard(i)

#

instead of passing dead as the argument

#

or

for i in #dead
  SMODS.destroy_cards(dead[i])
#
for i in dead
SMODS.destroy_cards(i)```
#

one of those

plush stream
#

balatro uses love2d right?

zenith sage
#

yes

daring fern
plush stream
#

This error appears for me

thorn furnace
daring fern
plush stream
#

oh

zenith sage
plush stream
daring fern
plush stream
#

make a image appear when blind is beaten and make it dissapear after a few seconds

daring fern
plush stream
#

oh ok

#

uhh

#

I have no idea if any other mods have done that but

#

Ill try to look for one

thorn furnace
#

I got a different error

#

apparently there is a difference between destroying a table all at once or individually

onyx sonnet
#

is this the best way to check if a card is rankless?

if context.other_card.config.center.no_rank then
  ...
end```
daring fern
thorn furnace
#

It crashed at the very end instead of in the middle

onyx sonnet
red flower
thorn furnace
#

after destroy_cards

red flower
#

then thats the problem

#

youre destroying the cards beforehand

thorn furnace
#

destroy_cards doesn't remove it from G.hand.cards?

red flower
#

it does but youre doing the loop before they get destroyed and executing the events after

thorn furnace
#

I feel like I require clarification as to what events we're referring to

red flower
thorn furnace
#

oh that

#

yeah those happen after

#

I figured if they were removed from G.hand.cards that G.hand.cards would just update to be a smaller table

#

I replaced it with the complement tho so now it works dance

red flower
#

it doesnt update until the destroy_cards event finishes

thorn furnace
#

well

#

now that it's a loop it's not technically but you get what I mean

#

as long as it works it's fine by me dance

gaunt phoenix
#

Hello guys, trying to make a booster, but I'm really not sure of what I'm doing rn... does someone have an example you could show me ?

#

did that for now

#

my main problem is idk how to say "take this type of card"

vale plinth
#

in metadata whats the difference between "name" and "display_name"?

daring fern
vale plinth
#

badge?

snow vale
vale plinth
#

ohhhh

daring fern
snow vale
#

this stuff

#

upper is rarity, mid is custom i made, and lower is display name

vale plinth
#

ahhh and you have badge color to change it

snow vale
#

yeah

daring fern
#

I think the name is what shows when you look at it in the mods menu.

snow vale
#

ig so

#

btw something

#

im still stuck on the fake joker thing

daring fern
snow vale
#

wait really-?

daring fern
vale plinth
#

whats a fake joker lol

snow vale
#

🤦

#

i hate my life

#

tysm

daring fern
snow vale
#

c a r d

vale plinth
#

ohh interesting

snow vale
#

it doesn't work

daring fern
snow vale
#

i mean it wont crash now

#

it simply does nothing

daring fern
snow vale
#

oh

zenith sage
#

is there a prerequisite to using card.ability.extra_value

#

is that a property all cards have

#

or all non-playing cards

snow vale
daring fern
daring fern
snow vale
daring fern
snow vale
#

ok

daring fern
#

Also do you want it be a loop and have the same order everytime or do you want it to be random?

snow vale
#

that order

#

i mean

#

it should go from det to perseverance

#

then back to det

#

and that does it

zenith sage
#

side note something that always bothered me about that

snow vale
#

the problem is that its still not working

zenith sage
#

det and perserverence are synonyms

daring fern
snow vale
snow vale
vale plinth
#

does it matter what i call the metadata file?

zenith sage
snow vale
#

yeah

zenith sage
#

lore problem

snow vale
#

fr

snow vale
#

not sure if it matters

vale plinth
#

okay thanks

snow vale
#

but just in case

vale plinth
#

and main.lua is necesairy?

daring fern
vale plinth
#

okay

daring fern
snow vale
vale plinth
#

does the priority of the json matter?

daring fern
daring fern
vale plinth
#

so the json at 0 is good?

daring fern
snow vale
#

this part

#

it crashes the game

vale plinth
#

ty

snow vale
daring fern
# snow vale

My mistake the inputs should be (key, context, card, false)

snow vale
#

oh

#

ok np

#

IT WORKS

#

TYSMMM

#

!!

#

also last question

#

how can i make these save?

#

the currentlies

#

do i add em at config extra?

daring fern
snow vale
#

yeah

daring fern
snow vale
#

oh but they dont show

daring fern
snow vale
#

well np then

long sun
#

is there a good way of changing just the purchase price of a card?

daring fern
long sun
#

okie doke ^^ thanks

plush stream
#

Um does anyone know why this is not working..?

#

This error shows up every time when the round ends

daring fern
plush stream
#

wat?

#

oh wait

daring fern
plush stream
#

oh

#

uhhhh

#

I have no idea what im doing

long sun
#

i can't see what i did wrong here -u-

local set_cost_ref = Card.set_cost()

function Card:set_cost()
  if not self.ability or self.ability.set ~= "phanta_CatanResource" or not G.GAME or not G.GAME.PhantaCatan or not G.GAME.PhantaCatan.free_resources then return set_cost_ref() end
  return 0
end```
#

wait no ignore -u-

#

dfkijngjdkfgnd

#

mm no, didn't work

#
local set_cost_ref = Card.set_cost()

function Card:set_cost()
  if not self.ability or self.ability.set ~= "phanta_CatanResource" or not G.GAME or not G.GAME.PhantaCatan or not G.GAME.PhantaCatan.free_resources then return
    set_cost_ref() end

  self.extra_cost = 0
  self.cost = 0
end```
#

the error happens on game startup

daring fern
#

Also a lot of ors without brackets is not good.

vale plinth
#

what goes in main.lua?

long sun
#

ah gotcha

daring fern
vale plinth
#

ohhh but i can also assert

#

this

daring fern
# vale plinth

No, you do SMODS.load_file the assert is not necessary.