#💻・modding-dev

1 messages · Page 87 of 1

crisp coral
#

mhm

#

yeah that's an issue because there's only one overlay_menu

wintry solar
#

could maybe try playing with negative padding

tepid sky
#

is there a context like end_of_round that doesn't trigger like 11 times?

#

(this is context.end_of_round)

tepid sky
#

actually, let me see, u might be a genius

#

suprisingly it still is just context.end_of_round

crisp coral
#

if context.end_of_round and not context.repetition and not context.individual then

tepid sky
#

oh i tought u were giving me gros michel's context lemme try this

#

:o it works!

undone sapphire
#

Hi sorry to bother, i have a question i don’t where how to put it but are mods compatible with each other ?

shell timber
#

most of them are

undone sapphire
#

thanks i finally try the mods, and tbh im interested into creating one, y’all got me haha

nocturne garnet
hardy viper
#

talking jokers is kinda funny

#

sounds like a fun mod idea

#

sentient jokers

tepid sky
#

(i just don't know how to begin, i suppose think of what each joker is talking about)

nocturne garnet
#

personally i think only certain jokers should talk

#

the non special ones are BORING......

tepid sky
#

just little funny things

#

oops all 6 could just say a random number between 1-6

#

just those small things that make them stand out

weary jungle
#

chicot says f u to boss blind

#

or luchadfo

tepid sky
#

swashbuckler could say smth "piratey"

#

ofc

spare elk
weary jungle
#

that be hard

#

i thin

#

there should be a way to have support for other mods so other mods can take

#

talk

#

if you lose with hack it says tough crowd

tepid crow
#

sounds pretty cool, and mod compat would be preferred yeah

nocturne garnet
#

could just be a community mod

#

like cryptid where people can suggest or code things

tepid crow
#

and just let that mod handle all the mod compat? it's possible

tepid sky
weary jungle
#

or maybe even standalone

#

l;ike deckskins

tepid sky
#

man who do i want to be? 🤔

crisp coral
#

i'm just gonna manually add the text to the image now

#

don't wanna deal with ui anymore

vague island
# tepid sky ofc

whats wrong with my code (expected behavious: once for each J_fnj_gerald you own, x2 mult when playing a king)

    calculate = function(self, card, context)
        if context.individual then
            local geralds = SMODS.find_card("j_fnj_gerald")
            local geraldcount = #geralds
            if context.other_card:get_id() == 13 then
                if geraldcount then
                    Xmult_mod = card.ability.extra.Xmult
                    for i = 1, geraldcount do
                        message = '._.'
                        Xmult_mod = Xmult_mod + card.ability.extra.Xmult
                    end
                end     
            end
        end
    end,
}
#

bruh

#

holup

#

lol i cant use codeblocks anymore ;-;

tepid sky
vague island
#

OOP

#

im sorry i think i accidentally replied to you

crisp coral
tepid crow
crisp coral
#

the underscore in j_fnj_gerald broke it and idk why

vague island
#

fr

#
    calculate = function(self, card, context)
        if context.individual then
            local geralds = SMODS.find_card("j_fnj_gerald")
            local geraldcount = #geralds
            if context.other_card:get_id() == 13 then
                if geraldcount then
                    Xmult_mod = card.ability.extra.Xmult
                    for i = 1, geraldcount do
                        message = '._.'
                        Xmult_mod = Xmult_mod + card.ability.extra.Xmult
                    end
                end     
            end
        end
    end,
}
tepid crow
crisp coral
#

what the fuck

weary jungle
#

the deck is in my habd

#

what the freak

#

i fcant emplace from G.play to G.deck

timid parrot
weary jungle
#

that is the result of draw card

timid parrot
#

Ah

weary jungle
#
                        card_eval_status_text(v,"extra",nil,nil,nil,{message = "Cleaned!", colour = G.C.BLUE})
                        v:set_ability(G.P_CENTERS.c_base, nil, true)
                        v:set_edition(nil,true,false)
                        v:set_seal(nil,false,true)
                        v:juice_up()
                    return true end }))

                    G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.5,func = function()
                        if ClearCardArea.config.type == 'deck' then
                            draw_card(G.play,G.hand, 1, 'up', true, v, nil, true)
                            G.deck:emplace(v, nil, false)
                        else
                            draw_card(G.play,G.hand, 1, 'up', true, v, nil, true)
                        end
                        
                    return true end }))```
orchid thunder
#

we need rarity api documentation

#

idk how to make my consumables have raritys

stray warren
lethal stratus
#

trying to think of the easiest card concept from the v/s card pool

weary jungle
#

how do you deselect cards

#

with code

tepid sky
#

maybe look at what the game does when right clicking?

weary jungle
#

where would that be

weary jungle
#

why is there gaps in my cards

#

why is it sayin 12/8

#

there is 10 cards

#

what

#

when i played some cards some stayed in my hand flipped? i also cant select them????

#

what is happening???

#

i needf help bro 😭

#

my balatro is cursed

tribal umbra
weary jungle
#

yea

tribal umbra
#

what is happening dude

#

why is the 10 of clubs THERE

weary jungle
#

cuz its supposed to "clean" the cards

#

it picks 2 modified cards from the deck, and cleans them and its supposed to put them back into the deck

#

but that is not working

hallow forge
#

deck or hand

weary jungle
#

deck or hand

#

rn its only taking from deck

#
draw_card(G.play,G.hand, 1, 'up', true, v, nil, true)
G.hand:add_to_highlighted(v,true)
G.FUNCS.discard_cards_from_highlighted(nil, true)```
#

v is the card

primal robin
#

G.hand.highlighted = {} Trolge
area:unhighlight_all() exists

weary jungle
#

did not work

#

there are phantom cards

#

im scared

#
v:set_ability(G.P_CENTERS.c_base, nil, true)
v:set_edition(nil,true,false)
v:set_seal(nil,false,true)
v:juice_up()``` is something wrong here?
primal robin
#

I'll ask again. Are you trying to investigate game code at all?

You need to select/deselect card. If you don't know how to do it, first what should come to your mind is "how other joker/tarot/blind do this stuff?"
You searching for it, and investigate all methods they used

#

Or, find a class defines a card area, CardArea, and just take a look what methods this class have. What they do, what arguments they have

weary jungle
#

the crazy part is

#

i have the same exact code somewhere else, and it works

#

but when i put the code in the other place it doent worek

#

i did the whole draw cards after it didnt work

primal robin
#

You're do something with card without respecting events order, as a result desync happened and game think you dding cards twice

weary jungle
#

what is event order?

primal robin
#

When you use familiar, game add this steps in event queue

  • Move card from G.consumeables to G.play
  • Remove one card from hand
  • Add 2 cards to hand
  • Dissolve
#

All actions performed one after another

weary jungle
#

im hooking use consumable though

#
function Card:use_consumeable(args)
    stop_use()
...
    else    
    UseRef(self,args) 
    end

end```
#

the else doesnt happen when i use familiar in this case

#

(intended)

primal robin
#

Most likely you do smth like "if card is Familiar, execute consumeable effect and after that clear created cards"

#

If you just copy-paste familiar code then Trolge

weary jungle
#

i dont want familiar to do familiar

#

i want it to do other thinf

primal robin
#

Why are you breaking vanilla stuff?

weary jungle
#

wdym

#

if (G.GAME.TGTMCurseChance > 0) and (self.ability.set == 'Tarot') and (pseudorandom(pseudoseed("Curse")) < G.GAME.TGTMCurseChance) then the consumable is used normally, but when the spooky curse activates, it doesnt

primal robin
#

In this case fine

weary jungle
#
            if v.edition or v.config.center ~= G.P_CENTERS.c_base or v.seal then
                print(v.edition)
                print(v.config.center ~= G.P_CENTERS.c_base)
                print(v.seal)
                if cleared <= maxClear then
                    local ClearCardArea = v.area
                    if ClearCardArea.config.type == 'deck' then
                        draw_card(G.deck,G.hand, 1, 'up',true,v, nil, true)
                    end

                    
                    G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.3,func = function()
                        G.play:emplace(v)
                        print(v.facing)
                        print(ClearCardArea.config.type)
                    return true end }))

                    G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.5,func = function()
                        card_eval_status_text(v,"extra",nil,nil,nil,{message = "Cleaned!", colour = G.C.BLUE})
                        v:set_ability(G.P_CENTERS.c_base, nil, true)
                        v:set_edition(nil,true,false)
                        v:set_seal(nil,false,true)
                        v:juice_up()
                    return true end }))

                    G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.5,func = function()
                        if ClearCardArea.config.type == 'deck' then
                            --draw_card(G.play,G.hand, 1, 'up', true, v, nil, true)
                            --G.hand:add_to_highlighted(v,true)
                            G.deck:emplace(v,nil,false)
                        else
                            draw_card(G.play,G.hand, 1, 'up', true, v, nil, true)
                        end
                        
                    return true end }))
                    
                end
                cleared = cleared+1
                G.FUNCS.discard_cards_from_highlighted(nil, true)
            end
end```
#

this is the spectral code

#

also a G.hand:unhighlight_all() at the beggining

teal estuary
#

is it possible to half the amount of chips the hand currently has with just steammodded, or will that require talisman to piggyback off of Xchips?

#

i was thinking of grabbing the amount of chips currently played, halving it with chips_amount / chips, but i wasnt sure how to make that the new number

#

maybe doing something like:

chips_amount / chips = new_chips_amount,
return{
chips_amount = new_chips_amount
}```
but that might just add half to the value? idk
nocturne garnet
#

other than jokers, what's the most common thing people ask for help in creating for modding?

might make a tutorial out of it

#

like blinds? consumeables?

teal estuary
#

i'd say both, but consumeables more so

#

i wanna make some, but no clue

weary jungle
#

im making some and have no clue

nocturne garnet
#

consumables it is!

wintry swallow
#

What about the best ways to test efficiently? Beyond "Ehm install DebugPlus"?

nocturne garnet
#

erm

teal estuary
#

ehm

#

install debugplus

tepid sky
#

does this joker look good? in tern of code and if the random is set up properly?

teal estuary
#

gives you essenitally anything and everything you need

nocturne garnet
tepid sky
wintry swallow
#

Test-driven development really seems to be a design-centerpiece of LUA, hm?

tepid sky
#

just wanted to know if i made the randomness correctly, and if oops all 6's can manipulate it

maiden phoenix
#

I think you need a '' .. G.GAME... behind the G.GAME.probabilities.normal

tepid sky
#

or "1"?

maiden phoenix
#

Nah not for the 1

tepid sky
#

how do you mean?

maiden phoenix
#

''..G.GAME.probabilities.normal or 1

tepid sky
#

y?

maiden phoenix
#

Lua moment

tepid sky
stray warren
#

I really hate how loose Lua is as a programming language lol

#

Ofc, this comes from me only using C++ mainly

#

It's so wildly more forgiving

maiden phoenix
#

Using ' ' .. let's you turn an int variable into a string

#

Oh wait the 1 needs it too

#

So it goes ''..(G.GAME and G.GAME.probabilities.normal or 1)

#

It's written so in the og code

weary jungle
#

i dont know how to rmove these phantom cards

tepid sky
weary jungle
#

when i emplace to G.play, when i draw_card from G.play to G.hand, it creates ghost cards

tepid sky
stray warren
tepid sky
#

Thats litterally it

stray warren
#

Do you intend for those to both happen at the same time sometimes?

hardy viper
tepid sky
stray warren
stray warren
# tepid sky Ye, both happen when lucky card scores

The way you have it up there, it will first check the x2 mult, and if that succeeds, it will give the xmult and never even check for the money. If it fails, that's when it'll check the money. Both things can't happen at the same time with how it's written

tepid sky
#

Okey

#

I'll see if i can merge them together tmr

weak depot
#

i'm trying to make a joker that adds +4 chips (a la wee joker) per unscoring card played and it's not working. i'm not totally sure why. any help?

SMODS.Joker {
    name = 'Soaker Joker',
    key = 'j_spl',
    atlas = 'splashjokeratl',
    rarity = 3,
    cost = 8,
    unlocked = true,
    discovered = true,
    blueprint_compat = true,
    eternal_compat = true,
    perishable_compat = true,
    config = {extra = {chips = 0, chip_gain = 4}},
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.chips, card.ability.extra.chip_gain } }
      end,
    loc_txt = {
        name = 'Soaker Joker',
        text = {

          "{C:chips}+#2#{} Chips for each played",
          "card that is unscoring",
          "{C:inactive}(Currently {}{C:chips}+#1#{}{C:inactive} Chips){}"
        }
      },
    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play then
            for i = 1, #context.full_hand do
                local scoredandPlayed = false
                for i = 1, #context.scoring_hand do
                    if context.full_hand[i]:get_id() == context.scoring_hand[i]:get_id() then
                        scoredandPlayed = true
                    end

                if not scoredandPlayed then
                    card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chip_gain
                    context.full_hand[i]:juice_up()
                    return {
                        message = 'Upgraded!',
                        colour = G.C.CHIPS,
                        card = card
                    }
                end
            end
        end

        if context.joker_main then
            return {
              chip_mod = card.ability.extra.chips,
              colour = G.C.CHIPS,
              message = localize { type = 'variable', key = 'a_chips', vars = { card.ability.extra.chips } }

            }
        end
    end
end
}
stray warren
#

You have two i variables. The inner one needs to be named j, or something unique from i

weak depot
stray warren
#

Similar issue to above, it looks like you're trying to return multiple times from the same function call. You can only return once

weak depot
#

...huh.

#

i just don't know where the thing that gets the chips from unscoring cards would go if not in calculate

stray warren
#

Once it finds the first not scoredAndPlayed it returns the upgraded, and the calculate function finishes for that instance

weak depot
#

...okay...

#

an event, maybe?

stray warren
#

Let me try to word this right

#

A solution, I mean

#

Instead of returning a message, you can call the eval_card_status_text() function, and do the message that way. I think I did that with one of my jokers and it worked out good

#

Let me find an example

#

So for you, you would replace your return under context.individual with something like this:
card_eval_status_text(card, 'extra', nil, nil, nil, { message = 'Upgraded!', colour = G.C.CHIPS})

#

Try that

weak depot
#

okay! one moment

stray warren
#

btw, just so i'm clear, when I say return multiple times from the same function call, I don't mean that you can't have the return statement under context.individual and the return statement under context.joker_main. I mean that you expected the for loop to return a message for each iteration of the for loop, when in actuality the for loop will actually stop after the first return statement

wooden nexus
weak depot
#

i'm not even sure how it did that

#

-the scoring is... not acting how it should
-it's not actually giving the chips despite it being clearly stated
i have actually no idea what to do here

#

my life would be a lot easier if i could find an "is card scoring" function

stray warren
#

I think context.scoring_hand only includes cards that are scored, so the not scored card wouldn't be in that

#

I'll have to grab this code and take a look at it on my PC later when I have access to it

#

It's hard to debug on a phone lol

weak depot
#

yeah, currently i'm iterating to see if i card in context.full_hand is equal to a card in context.scoring hand

#

this being the current code:

calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play then
            for i = 1, #context.full_hand do
                local scoredandPlayed = false
                for j = 1, #context.scoring_hand do
                    if context.full_hand[i] == context.scoring_hand[j] then
                        scoredandPlayed = true
                    end

                if not scoredandPlayed then
                    card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chip_gain
                    context.full_hand[i]:juice_up()
                    card_eval_status_text(card, 'extra', nil, nil, nil, { message = 'Upgraded!', colour = G.C.CHIPS})
                end
            end
        end

        if context.joker_main then
            return {
              chip_mod = card.ability.extra.chips,
              colour = G.C.CHIPS,
              message = localize { type = 'variable', key = 'a_chips', vars = { card.ability.extra.chips } }

            }
        end
    end
end
stray warren
#

Try this real quick:

calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play then
            for i = 1, #context.full_hand do
                for j = 1, #context.scoring_hand do
                    if not context.full_hand[i] == context.scoring_hand[j] then
                      card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chip_gain
                    context.full_hand[i]:juice_up()
                    card_eval_status_text(card, 'extra', nil, nil, nil, { message = 'Upgraded!', colour = G.C.CHIPS})
                    end
                end
            end
        end

        if context.joker_main then
            return {
              chip_mod = card.ability.extra.chips,
              colour = G.C.CHIPS,
              message = localize { type = 'variable', key = 'a_chips', vars = { card.ability.extra.chips } }

            }
        end
    end
end
#

I haven't tested it, so be warned

#

can you send me the whole mod directory real quick so I can run it?

weak depot
weak depot
split creek
#

Does anyone know where you set this text for booster packs?

tepid crow
#

(you might need a localization file for it?)

royal seal
#

Replace with your specific names of course

#

Also mtg mod when 👀

split creek
#

right now!!!

#

if i can figure out how to get these packs to work that is

#

I don't know how to allow the player to take the consumable cards out of the pack without having to use them

tepid crow
split creek
#

Yeah, I've been trying to use that code but it just throws an error

#

Also, how does code outside of your main file work with steamodded? I can't figure out how to put things in other files

#

It just doesn't run

tepid crow
#

You need to import it

split creek
#

How do I do that?

tepid crow
cerulean rose
#

yes

split creek
tepid crow
#

I'm not sure man

#

never used it before

split creek
#

it's okay

#

I'll figure it out

weary jungle
#

im still trying to fix this drawing thing

stray warren
weary jungle
#

my cards have the deck back on both sides of the card

#

how do i put the normal face on them

#

i think its something to do with G.deck card area

elder vapor
#

card is either a joker/playing card

tepid crow
weary jungle
#

when i emplace something from G.hand to G.play it leaves a ghost card

elder vapor
weary jungle
elder vapor
weary jungle
#

what do i have to do

limpid wing
#

Hi

#

There is no a script or something for install lovely and steamodded with 1 click like a .bat with git or something

#

That will help a lot of people

weary jungle
#

i dont think so

#

i dont know why this happens

split creek
#

I'm trying to implement a seal that has an event when the played card scores, what context should I be checking for?

hardy viper
weary jungle
#

thats good? i dont have any frame of refrence is this a major acomplishment/

hardy viper
#

just a cool feature

weary jungle
#

awesome

mellow sable
#

Nice

hardy viper
#

not by any means done unfortunately

mellow sable
#

If you’re playing a hand that would normally cause the game to run out of memory, does this fix that?

hardy viper
#

only came up with it just a minute ago

mellow sable
elder vapor
#

how do i setup a localization file?

#

nvm i got it working

elder vapor
#

why doesn't the label show up?

tepid sky
stray warren
#

It looks like it'll work to me, just make sure you aren't adding money twice. I'm not sure if ease_dollars and the dollars in the return statement will add it twice

tepid sky
#

and all i did was remove the "dollars = card.ability.extra.money"

stray warren
#

Well, one thing you could try is something like this:

local give_money = pseudorandom('sandstone') < G.GAME.probabilities.normal / card.ability.extra.odds_money
local give_Xmult = pseudorandom('sandstone') < G.GAME.probabilities.normal / card.ability.extra.odds_Xmult

if give_money and not give_Xmult then
  return {
    dollars = card.ability.extra.money,
    card = card
  }
end
if not give_money and give_Xmult then
  return {
    x_mult = card.ability.extra.Xmult,
    card = card
  }
end
if give_money and give_Xmult then
  return {
    dollars = card.ability.extra.money,
    x_mult = card.ability.extra.Xmult,
    card = card
  }
end
#

It's kind of clunky, but it should get the job done

#

Although I haven't tested it

#

@tepid sky

tepid sky
#

wow, thanks!

timid parrot
#

I feel like there's a better way to do that to cover all the cases

stray warren
#

Yeah, there probably is, but I was just trying to whip up something real quick that would work

#

And I just found a better way:

local give_money = pseudorandom('sandstone') < G.GAME.probabilities.normal / card.ability.extra.odds_money
local give_Xmult = pseudorandom('sandstone') < G.GAME.probabilities.normal / card.ability.extra.odds_Xmult

local result = { card = card }

if give_money then
  result.dollars = card.ability.extra.money
end
if give_Xmult then
  result.x_mult = card.ability.extra.Xmult
end

return result
#

That should work

#

@tepid sky

tepid sky
#

imma test it

#

randomness doesn't seem to work?

stray warren
#

what do you mean?

tepid sky
#

lemme try smth rq

stray warren
#

Oh, I meant to put that stuff inside the context.individual etc... if statement

#

and inside the lucky card check

#

I just didn't feel like writing all that stuff out lol

tepid sky
#

just tell me how i needa fix it

#

then i'll write it lol

stray warren
#

Just take the code I provided you and place it inside the Lucky Card check, removing all the code you had in there

#

so your heirarchy will be
context.individual
lucky card?
my code

tepid sky
#

alr

#

then this is good?

stray warren
#

should be good

tepid sky
#

it, seems to be not random

#

it always triggers

stray warren
#

I believe you need a different seed for each one, so something like 'sandstone_mult' and 'sandstone_money' for the pseudorandom parameters. At least that's how lucky cards do it in the base game

tepid sky
#

hell ye

#

it works now

#

lol

#

nice!

#

thanks

tepid sky
#

next question. how do i make astronomer? (as a smods joker)

tepid sky
#

cuz i cannot get it working

wintry solar
#

Need to hook into set cost

tepid sky
#

smth like this?

wintry solar
#

If that’s how set cost works internally, it looks reasonable

tepid sky
#

it looks the same

#

also astro has this, whatever it may be

wintry solar
#

That’ll reset the values for when you pick it up

tepid sky
#

Hmm

#

Alr

wooden nexus
#

I got a simple question

#

So I have in the config of a card a thing called "planet_chips" and "planet_mult". Essentially, it's a way to make it easier to do mult and chips on a planet for an existing handtype

#

Only problem atm is trying to get the loc_txt to load the planet_chips/mult in the card

elder vapor
# wooden nexus

you need to add self.config.extra.planet_mult as the 3rd index and self.config.extra.planet_chips as the 4th index when returning the table under loc_vars function

wooden nexus
#

Ah that's where my problem was

#

I was putting ability not config

#

thanks

#

Lemme see if i put it in right

#

Thanks again!

elder vapor
#

playing card not giving x mult?

elder vapor
teal estuary
weary jungle
#

i can FINALLY work on the actual runes

elder vapor
teal estuary
#

yes, but dont all self’s need to be cards in SMODS? thats what i’ve seen and been doing, and it works fine for me

weary jungle
#

uh oh, somethings wrong

#

local card = create_card("Runes", G.consumeables, nil, nil, nil, nil, nil, "TGTM_runes") this is how to spawn a random rune right? does this remove the rune from the pool?

#
local card = create_card("Runes", G.consumeables, nil, nil, nil, nil, nil, "TGTM_runes")
print(card.ability.name)
card:add_to_deck()
G.consumeables:emplace(card)
end```This should spawn 2 runes, this is almost directly copied from the emperor
#

more like automoton from cryptid

mystic river
#

working on a Cement Seal that makes the sealed card act like a stone card
for balance purposes, should this include the +50 chips, or just leave it at always scores+resistant to debuffing?

elder vapor
#

what sprite creating software should i use?

hardy viper
#

anything works really

#

most people use aseprite

elder vapor
#

would be using it but its 20 bucks lol

mystic river
#

... i suspect the answer to this is going to make me feel very silly, but why is my seal's name and description showing blank

SMODS.Seal {
    object_type = "Seal",
    name = "cement_seal",
    key = "cement",
    badge_colour = HEX("545454"), --a cement-y grey, hopefully
  config = {extra = {chips = 50}},
  loc_txt = {
    label = 'Cement Seal',
    description = {
        name = 'Cement Seal',
        text = {
            'Acts like a {C:attention}Stone Card',
            '({C:chips}+#1# Chips{}, scores even if',
            'not part of played hand,',
            'resistant to debuffs)',
        }
    },
  },
  loc_vars = function(self, info_queue)
    return { vars = {self.config.extra.chips, } }
  end,
    atlas = "cementseal",
    pos = {x = 0, y = 0},
    calculate = function(self, card, context)
    if not context.repetition_only and context.cardarea == G.play then
      return {
        chips = self.config.chips
      }
    end
    end
}```
hardy viper
elder vapor
#

its

loc_txt = {
  name = "string",
  label = "string",
  text = {
    "string1",
    "string2"
  }
}
mystic river
#

i pulled that format straight out of the seal example mod included with steamodded
... but i haven't checked whether it works right in that mod, so one moment

#

yep, it's broken in the example mod too
lol

#

guess someone should update that

elder vapor
#

if i had a guess the example mods would be from 0.9.8

mystic river
#

that was my guess too, though it at least had its requirement updated to the current steamodded and apparently literally nothing else

mystic river
elder vapor
#

stickers not showing?

split creek
#

I'm trying to add a new joker that has the same static ability as smeared joker, but this doesn't seem to be doing anything?

elder vapor
#

try changing the position to at and payload to next(find_joker('Smeared Joker')) or next(find_joker('hel-smearflowerpot'))

tepid crow
#

patches.regex can be used for single words etc

hardy viper
#

ohhg

#

yeah no what lars said

#

mb i just woke up

split creek
mystic river
#

ThinkRingo i got the cement seal to give points, but i'm stuck on making the card always score or be immune to debuffing

#

okay amend that i think i just worked out debuff immunity

#

yep confirmed confirmed, debuff immunity in place
but why won't they splash...

split creek
#

Trying to program in the effect of flower pot, but only caring about two suits...

#
        if context.joker_main then
              local suits = {
                 ['Hearts'] = 0,
                 ['Spades'] = 0
             }
             for i = 1, #context.scoring_hand do
                 if context.scoring_hand[i].ability.name ~= 'Wild Card' then
                     if context.scoring_hand[i]:is_suit('Hearts', true) and suits["Hearts"] == 0 then suits["Hearts"] = suits["Hearts"] + 1
                     elseif context.scoring_hand[i]:is_suit('Spades', true) and suits["Spades"] == 0  then suits["Spades"] = suits["Spades"] + 1 end
                  end
              end
            for i = 1, #context.scoring_hand do
                if context.scoring_hand[i].ability.name == 'Wild Card' then
                     if context.scoring_hand[i]:is_suit('Hearts') and suits["Hearts"] == 0 then suits["Hearts"] = suits["Hearts"] + 1
                  elseif context.scoring_hand[i]:is_suit('Spades') and suits["Spades"] == 0  then suits["Spades"] = suits["Spades"] + 1 end
                 end
             end
              if suits["Hearts"] >= card.ability.extra.num_red and
              suits["Spades"] >= card.ability.extra.num_black then
                  return {
                      message = localize{type='variable',key='a_xmult',vars={card.ability.extra.Xmult}},
                      Xmult_mod = card.ability.extra.Xmult
                  }
              end
        end
    end```
#

It just isn't triggering

mystic river
#
[[patches]]
[patches.pattern]
target = "state_events.lua"
position = "at"
pattern = "            if G.play.cards[i].ability.effect == 'Stone Card' then"
payload = "            if G.play.cards[i].ability.effect == 'Stone Card' or G.play.cards[i].seal == 'minty_cement' then"
match_indent = true```
i cannot for the life of me work out what's wrong with this lovely.toml patch
it does seem to be patching, the log doesn't have a WARN that it found no matches
it just doesn't make the card always score
#

this could probably be done in the seal definition somehow rather than lovely.toml but idk how lel

elder vapor
#

functions/state_events.lua

mystic river
#

that was the problem??
the log didn't say anything about that!

#

bizarre
but it does work now

elder vapor
#

yeah if you're trying to patch something in a folder you have to put it in the target string

tepid sky
tepid sky
#

i know what line is wrong but idk what is wrong about it

tepid crow
tepid sky
#

aka the one with v.played >= ....

tepid sky
tepid crow
#

but you should probably just be doing a lot of prints

tepid sky
#

prints?

tepid crow
#

to console yes

#

e.g. sendDebugMessage

tepid sky
#

oh print like that

hardy viper
#

long ass print function

#

i would just make your own print wrapper

rough furnace
#

print my beloved

#

DebugPlus dev also has it's own print wrapper if you're silly like that

wintry solar
#

I am a print believer

hardy viper
#

i enjoy print

rough furnace
#

I use print for dev and other stuff for stuff that may be shown to a user

#

mostly handleLog becuase I'm in DebugPlus internal land

hardy viper
#

why does talisman just straight up inject itself straight into main.lua btw

#

straightly...

rough furnace
#

cause it needs to be run

primal robin
#

print enjoyer lumodance

hardy viper
rough furnace
#

how is it going to laod the file?

#

without running code

primal robin
#

lovely module/appending?

hardy viper
#

loadfile
dofile
read & loadstring
the one love2d loadfile function

#

ignore that dofile is just loadfile 🔥

rough furnace
#

and how are you going to run those without injecting code?

hardy viper
#

talisman injects the entire talisman.lua file into main.lua

rough furnace
#

it's more convient probably

hardy viper
#

it's quite inconvenient when there's an error and you have to trace it back by looking in the main.lua lovely dump for the appropriate like and then go find the corresponding line in talisman itself

#

is talisman an SMODS mod

#

if not that explains it

rough furnace
#

talisman is not an SMODS mod

#

it works without smods

hardy viper
#

okay then yeah it'd have no way to find itself

rough furnace
#

it just has a little SMODS compat

hardy viper
#

thats probably the reason i think

#

maybe

rough furnace
#

well it does load some modules dynamically

edgy reef
#

I do it for Flower Pot

rough furnace
#

I mean it's just more annoying

hardy viper
#

can you do it cleanly though

rough furnace
#

someone bribe meth to add paths to lovely

rough furnace
rough furnace
#

You can be a bit lazy and just make an educated guess on the file name

#

like if you just see if the folder name starts with talisman case insesntive

#

it will match most cases

#

but also if you had two mods starting with talisman then it kinda screws up

#

Unfortualtly, it's not simple to modify lovely to save metadata for patches

#

it requuires pretty much a rewrite of how lovely handles patches

lethal stratus
split creek
#

Is there any way to change the current round's chips without scoring?

rough furnace
#

Yes

#

But if you want it to also be able to handle you winning a bit more code is nessicary

split creek
#

Do you know of any mods that have done this that I could study?

rough furnace
split creek
#

awesome thanks

lethal stratus
#

having issues making this return the value of the mult, instead of the value of total hands played during the run

#

changing out the function in the return is something i am looking to do, but i dont know what to replace it with

foggy shard
#

can someone dm me a video on how to mod the game

lethal stratus
#

can someone please help me

lethal stratus
#

nevermind, i figured it out

zealous glen
#

what did you do

lethal stratus
#

new question
should this be the value that is actually played, or should it be 160(the value after playing a hand)

#

my movator the brokies

stray warren
#

How do you specify a custom joker order in the collection for modded jokers?

rough furnace
#

I think thye just use the order defined

#

there might be a way to change it

lethal stratus
#

how do i make blueprint interactivity with modded jokers?

stray warren
rough furnace
rough furnace
lethal stratus
#

like this one for example

stray warren
#

Weird. Here I have calling_card defined as the first joker in the CONFIG, but when the function that registers them runs, the first joker in-game is quick_fix

rough furnace
#

I think pairs doesn't has a defined order

stray warren
#

I should use an i-based for loop instead then probably?

rough furnace
#

yeah porbably

lethal stratus
rough furnace
#

what about it?

lethal stratus
#

blueprint doesnt work

#

on it

rough furnace
#

does it say incompatible?

#

if so you probably need to add blueprint_compat = true, to your joker definiton

lethal stratus
#

gotcha

rough furnace
#

I forget if it's true by default or not

lethal stratus
#

it WORKS but it doesnt DISPLAY

rough furnace
#

does it display on your card twice?

#

I think theres a bug where it sometimes behaves like a retrigget instead of a blueprint

lethal stratus
#

where do i put the compat?

rough furnace
#

something in steamodded

lethal stratus
#

no

#

it displays on the blueprint

rough furnace
#

what do you mean?

lethal stratus
#

blueprint copys, but it doesnt display compatible

#

it still works regardless

rough furnace
#

then you don't have the blueprint_compat = true, on your joker

weary jungle
#

how do i make it so that you can spawn more than 1 conumable of a type?

#

after i spawn 1 of each , it jimbos me :(

rough furnace
#

how are you spawning them?

weary jungle
#
print(card.ability.name)
card:add_to_deck()
G.consumeables:emplace(card)```
#

is it something with create_card?

#

let me check

rough furnace
#

yeah probably

#

should also probably use SMODS.create_card

#

or at least that is what I've been told

#

oh this is a custom set

weary jungle
#

function create_card(_type, area, legendary, _rarity, skip_materialize, soulable, forced_key, key_append) its probably with forced key, but i dont know how to use forced key

rough furnace
#

forced key just creates a card with the given key

#

chances are you need to setuip something so runes have a fallback card

#

I'm not familar with making new card types

weary jungle
#

is that default card?

#

wait what am i talking about

#

is there any way to get a random consumable of "runes" without using a pool?

lethal stratus
#

how much should a card that does dusk on the first hand insteado f the last cost?

weary jungle
#

im not sure

#

itd definitly be an uncommon or rare

lethal stratus
#

dusk is rarity 2

weary jungle
#

so base price around thjat

lethal stratus
#

aka uncommon

#

is it better or worse than dusk though

weary jungle
#

it has negative synergy with dna

lethal stratus
#

?

#

it retriggers all cards

elder vapor
#

is there a way to create something like this for a modded consumable?

lethal stratus
#

insane money while being duplicated

weary jungle
lethal stratus
#

dna is one card

weary jungle
#

if its baron i can see it

lethal stratus
#

which is for SETUP anyway

weary jungle
#

it kinda seems almost the same power as dusk

#

so id copy dusk prie

lethal stratus
#

ok

rough furnace
#

@weary jungle it doesn't seem documented but I think you can just set default = "key" on your consumeable type to set a default consumeable for when you have all of them

lethal stratus
#

what should i make loc_vars do

weary jungle
#

that definitly has been documented, i remember something like thatr

#

it might have been removed or smth

rough furnace
#

I found it in the code but I couldn't find where it was diocumented

weary jungle
#

but i want it to be random, no fallback or pools, just a random card, doesnt matter if you have it or not

rough furnace
#

so like if showman is around?

weary jungle
#

yea

rough furnace
#

the pool can have a allow_duplicates key

#

not sure how you get the pool to set it

lethal stratus
#

is this a fine loc_vars

weary jungle
#

id probably put "in the first hand of round"

lethal stratus
#

or do i need to do

#

yeah ill do that

#

do i need to do card.ability.extra.repeitions

weary jungle
#

also you have a loc_vars, so probably add "retriggers all played cards #1# time"

#

so the loc_vars is shown

lethal stratus
weary jungle
#

i think so yea

lethal stratus
#

how do i check for first hand of a round

weary jungle
#

if the hand currently played = max hands probably

lethal stratus
#

gotcha

#

max hands - 1 for that

#

cause logic issues

weary jungle
#

yea

lethal stratus
#

what color are retrigger text popups

weary jungle
weary jungle
crisp coral
weary jungle
#

oragn

lethal stratus
#

thank you!!!

weary jungle
#

how do you set a pool to allow duplicated!

lethal stratus
#

game tweaking

#

also let me know if i wrote this wrong

#

?!?!?!

#

this line keeps erroring out

lethal stratus
#

please help?

mystic river
#

remove the extra.
your config skips that step
(i'm really not clear on what that step does, but i know it changes the relevant variable name)

lethal stratus
#

still crashing

#

missed an extra

#

but still

#

@shell tangle i need helppp

shell tangle
#

Put the stuff back into an extra, since the game tries to read some stuff if it's not in extra and attempts to do various effects, which doesn't mix well with how steamodded loads jokers into the game, and I don't believe repetitions work like that, give me a second to find my code,

lethal stratus
#

i just don't know how to write repetitions

shell tangle
#

Yeah, you're using the joker_main context and attempting to use repetitions on the joker itself, rather than the playing cards.

lethal stratus
#

gotcha

#

how would i write it for the playing cards?

shell tangle
#

#1247703015222149120 message

Look for where it says that it checks for repetition effects in jokers in this message, and then check for the contexts that are provided during that step.

lethal stratus
#

sorry im kinda dumb

shell tangle
#

No worries, that's why you read resources to learn, I didn't know everything immediately once I decided to try modding Balatro either.

#

I think I explained it in the example mod, but just in case - the calculate function is called when you do most options, for every single joker you have. It checks their calculate code with contexts to see whether or not it should apply the effect, depending on what's inside of the context provided.

timid parrot
#

wait does the joker config automatically get copied into card.ability.extra?

#

or do you have to manually copy it?

shell tangle
#

Unless you know the source code well enough to know those terms and how they apply, it's generally just much easier to stay away from it so that you can have all your logic defined within your joker.

timid parrot
#

ah

lethal stratus
#

i might just need this written for me tbh

shell tangle
# lethal stratus sorry im kinda dumb

Also, you'll want to have card = context.other_card rather than your normal card = card, because how the return works, is that it's saying, the returned object card is the card object it receives from the calculate function, which is the joker itself - saying card = context.other_card means that it's saying, the returned object card is context.other_card.
This is usually a specific individual playing card, but if you try to call it during a context where it doesn't exist - say like you started a blind, a time where context is called for things like Ceremonial Dagger and Madness, then it'll return nil and cause a crash, because there's nothing to work with.
So, you usually want to have a context check to make sure it's a phase where context.other_card exists first, before working with context.other_card.

shell tangle
lethal stratus
#

understandable

#

have day

#

i don't actually want it written for me, I just don't understand what context is required for repetition, as the part of the post you posted just says "with context"

shell tangle
#

It's saying all the contexts within those blocks are contained within the table context, so you want to check to see if the values in context match the contexts that should be provided, otherwise, you don't want it to activate.

So, if you have something that applies an effect to Jokers, located in cardarea G.jokers, you want to check for if context.cardarea == G.jokers to see if it applies - but you don't want it to pass if context.cardarea contains G.hand and not the G.jokers you're looking for.

It's really just a giant if tree to make sure it's being activated at the correct time.

lethal stratus
#

gotcha

#

understood

#

and then add the hand req on top?

shell tangle
#

Are you talking about full_hand, or?

lethal stratus
#

first hand retrigger

#

this is mountain view

shell tangle
#

Yeah, you can do it wherever - before, in the same line, after, as long as it is being checked before the action is triggered.

lethal stratus
#

how do i call eval_card thoguh

#

is it just psuedonym for if statements?

shell tangle
#

Wait, should rephrase that,

#

eval_card evaluates any card, including jokers and such - when it's used on a joker, it'll call the calculate function in the joker, and when used on a playing card, like in this case, it evaluates how many chips and such to give.

elder vapor
shell tangle
elder vapor
shell tangle
#

Try adding your mod prefix into the key, so that it's p_gems_gemstone_normal. You might also need to add in the _1 as well, but I don't remember for sure.

elder vapor
#

awesome

#

added the 1 and it worked

shell tangle
#

Even if you can't fully read it, being able to pinpoint information can usually give you some ideas of some stuff to try doing.

elder vapor
#

ohh yeah i see it

#

is there a way to spawn a booster pack in using debugplus

shell tangle
#

3 in the collection menu should work.

#

Just do it in the shop.

mystic river
elder vapor
#

still confused why my stickers aren't showing

#

label also errors

#

@shell tangle you think you can help?

shell tangle
#

The sticker API was kind of finicky last I checked, and I haven't been watching it closely for any updates. Haven't touched it myself because of how finicky the API felt, so not sure.

#

Send the code you have for the sticker, and localization as well ideally, I can at least have a look.

elder vapor
wintry swallow
#

Can I just increase G.GAME.current_round.hands_left to give an additional hand or is there a function?

shell tangle
# elder vapor

What's the full path where the two descriptions are located? G.localization.description.Other, or?

#

Also, I think you need to maybe put it as loc_txt? Not completely sure.

elder vapor
#

G.localization.Other

#

and the labels in G.localization.misc.labels

#

everything in description table

edgy reef
# elder vapor

The sticker will never show up because you overrode the apply function to do nothing.

#

So even when you force the sticker to apply it'll just do nothing

elder vapor
#

ohh

edgy reef
#

Also removed doesn't exist as a sticker function.

elder vapor
#

i'll make that another function

#

those 2 are custom functions i use to remove/add values from a card

edgy reef
#

Unless this is used by the gemstone code

#

ah

elder vapor
#

ok that fixed the stuff showing up in stickers

#

but the labels are still bugged

shell tangle
#

I was completely off with what I was thinking if that did solve it, so I don't know how to properly work with stickers, apologies.

elder vapor
#

its fine, its not documented so its just a case of trial and error lol

elder vapor
weary jungle
earnest zealot
#

I'm having a strange bug where multiple Blueprints will increase the amount of activations on the leftward Blueprints
For instance,
BP + BP + BP + Joker
gives
3 + 2 + 1 + 1
instances of Mult

Only using DebugPlus, Steamodded, lovely, and my mod (which has not touched BP code)
Anyone know what's happening?

#

this happens for vanilla jokers too to be clear

rough furnace
#

Likely something with steamodded

#

I think it might change how blueprint behaves

#

seems like a bug though

nocturne garnet
#

yippee

lethal stratus
#

this is still breaking

#

idk why

hybrid iris
#

it looks like you need to set config to
config = {extra = {repetitions = 1}}

lethal stratus
#

you'd think that

#

oh

#

wait

maiden phoenix
#

You forgot the "extra" table

lethal stratus
#

youre so right

hybrid iris
#

yeah

lethal stratus
lethal stratus
lethal stratus
#

OHHHH

#

erm

#

yeah it doesnt work

#

but it doesnt crash now

hybrid iris
#

your loc_vars is wrong

lethal stratus
#

what should it be

#

idk

hybrid iris
#

vars = {card.ability.extra.repetitions}

lethal stratus
#

:(

maiden phoenix
#

I wonder if the loc_vars parameters are correct

#

Not sure why youd call "context"

lethal stratus
#

oh i need info_queue

#

dont it

#

i

hybrid iris
#

oh you're right

#

(self, info_queue, card)

lethal stratus
#

numbers right, still no retriggering

#

i know this if statement doesnt work because it will never work at 0, but idrk what to replace that last part with

hybrid iris
#

try looking at how dusk does it?

lethal stratus
#

dusk checks hands left

#

i need to do max hands - 1

hybrid iris
#

oh you're missing the context

#

context.repetition, context.cardarea,context.full_hand, etc,

lethal stratus
hybrid iris
#

look at how its structured up top

lethal stratus
hybrid iris
#

because of how balatro code is structured they're all checking if its in context.repetition and context.cardarea == G.play

#

you cant just write cardarea == G.play because that doesnt trigger it

lethal stratus
#

theres like 4 more checks there

#

lmao

hybrid iris
#

yeah thats like how it works

#

wait wdym by 4 more checks there

lethal stratus
#

these 4

hybrid iris
#

,

#

again

#

you need to put "context." beforehand

#

you cant just write the word itself

lethal stratus
#

ohn

hybrid iris
#

also you should prolly add a context.repetition check

lethal stratus
#

why

#

repetitions are the only thing it does

hybrid iris
#

because that's the stage of the game where it checks if cards are repeated

#

it isnt about what it does its about when it does it

#

and context.repetition is when it happens

lethal stratus
#

still not working

hybrid iris
#

,,,that checks for the second hand played

lethal stratus
#

well 0 doesnt work either

hybrid iris
#

i believe

#

really?

#

huh,,

lethal stratus
#

i changed it to 1 and it didnt work

#

still nothing

#

its retriggering on the second hand

hybrid iris
#

,

lethal stratus
#

regardless

hybrid iris
#

,,,really?

#

huh,,

#

are you sure you saved it correctly and restarted

#

that looks about right to me

lethal stratus
#

yeah hold on

#

yeah it was a "didnt save" L

#

lmao

hybrid iris
#

well nice

lethal stratus
#

I have 3 jokers now

#

if you'd like to test them lol

weary jungle
#

how would i make a consumable give 1.5X per face card for the whole round?, i have a global for it, how do i make it give 1.5x mult

#

how do i use lovely patches

#

ok im gonna be dumb for a sec

lethal stratus
#

getting an error on line 85 ??

#

i have no idea why

crisp coral
#

what line is line 85

lethal stratus
#

the last purple above the two ends

#

right below reset

crisp coral
#

aand what does the error say

lethal stratus
crisp coral
#

i've been staring at this for a bit and i cannot find any missing ends/closing brackets

hardy viper
#

is it possible at all you forgot to save the file or smth everything is correct there

wintry solar
#

there might also be some of that awful invisible white space that sometimes occurs for peolple

lethal stratus
#

uhhh

#

maybe?

#

I pulled this directly from github

tepid crow
lethal stratus
#

its my github lol

tepid crow
#

I can't test code from an image, I need text characters 🙃

elder vapor
#

trying to make it so there's a 1 in 3 chance for a scoring card to level the upgraded hand, but it triggers 3 times instead of once, am i doing it right?

crisp coral
#

add context.individual

tepid crow
lethal stratus
#

idk

#

it works on my desktop, not my laptop

#

regardless, i have a new issue

#

i want to make this

#

idk how to check duplicate hand type

faint yacht
#

Check hand type when played - if it does not exist, add to a temporary table and give +15 mult. If it does exist in the table, skip.

wintry solar
#

you can have it collect hand types and store them internally and then check whether it's seen it before to decide whether to give mult or not, then clear it's memory at the end of the round

lethal stratus
#

how does... that one boss blind work

#

might copy that code

crisp coral
#

The Eye? pretty much the same

weary jungle
#

sorry cape

tepid crow
weary jungle
#

im not juicing up anything

#
                    return {
                        x_mult = 1.5,
                        colour = G.C.RED,
                        card = self
                    }
                end```is it card = card?
wintry solar
#

can we normalise providing some context to crash reports and also line numbers on screenshots of code

weary jungle
#

or something

tepid crow
#

then you should show your code instead of making us guess based on your error 🙃

wintry solar
#

card = card

weary jungle
#

it was talking about common functions, not my code

#

i got confused

tepid crow
wintry solar
#

ehh, both are useful

#

screenshots are useful as long as they have line numbers for quickly pinning down where the error is happening

elder vapor
#

is there a list of every possible context?

tepid crow
#

I like being able to copy-paste the code

lethal stratus
#

where uh

tepid crow
#

as long as it's small enough for me to be able to reproduce the error

lethal stratus
#

where is the eye in code

#

having trouble finding it

wintry solar
#

^ this is missing retrigger api stuff though

lethal stratus
#

?

#

no its not

#

its where i got mine

#

do i just copy the hand list

wintry solar
#

it is 100% missing retrigger api

tepid crow
lethal stratus
#

my mod is meant to just go on top of basegame

tepid crow
#

but you can just have an empty list

lethal stratus
#

that works

#

where do i make the list?

#

or more specifically, how do i append the hands to handlist

weary jungle
#

how do i make sure chips never go negative if i give -50 chips?

lethal stratus
#

if chips - 50 <= 0
chips = 0

#

?

tepid crow
lethal stratus
#

yes

#

iono lua

tepid crow
#

lua doesn't have lists, only tables

lethal stratus
#

ah

#

gross

tepid crow
#

also known as dictionaries or (hash)maps in other languages

lethal stratus
#

hashmaps/dictionaries is what ive heard before

tepid crow
#

though you might want to use Thunk's method where the hand is the key instead

#

that way you don't have to iterate over the whole table

weary jungle
#

how do i get the chips currently scored?

elder vapor
lethal stratus
#

idk how to write the calculate for thid

#

i might need more help

wintry solar
#

you want to do something like this

if not table[hand] then
  table[hand] = true
  return {your return table}
end
#

if I've read what you've said correctly

lethal stratus
#

are "tables" made with [] or {}

elder vapor
#

{}

#

[] is used to get to a property in a table

tepid crow
weary jungle
#

i was wrong i mean chips before scoring, like chips X mult

wintry solar
weary jungle
split creek
#

Are there any mods that let you open a booster pack outside of the shop? Trying to get my code to work and want a reference

weary jungle
wintry solar
#

hand_chips is a global value of the chips scored so far in that hand

weary jungle
#

so, if i were to check if G.GAME.hand_chips is above 50, this would prevent negative chips?

#

or is it just hand_chips

#

ok i did ti

split creek
elder vapor
#

does this art look good?

weary jungle
#

I like it, but maybe it could be shiny

split creek
#

So is the card supposed to be the gemstone: if so, it looks great!

rough furnace
split creek
#

I'm running it from a consumable

torn grove
#

I'm new to modding, and I want to make a second joker in my mod (i'm going off a tutorial and an example mod). Which part do I copy?

rough furnace
split creek
#

lol the instant you said that I opened up the cryptid source

#

Thanks so much for your help

rough furnace
#

Yeah I also wrote the semicolon code

#

I've written like 3 different things that set the score and end the round now

split creek
#

Glad that i'm getting it straight from the expert

rough furnace
#

Yeah the game wasn't designed with endign the round early in mind

split creek
#

Works like a charm!

rough furnace
#

but if you ensure you're in the right state, nothing should break too bad

torn grove
#

but how do I make this spawn a spectral card instead of Jimbo?

rough furnace
#

Don't pass the key to force and change the set to Spectral

#

also consider using SMODS.create_card

#

it's a bit nicer to use

#

Someone needs to document it somewhere

torn grove
#

I kinda wanna move my jokers into a seperate .lua file, should I do that?

rough furnace
#

Up to personal opinion

#

you can load other lua files using SMODS.load_file

torn grove
#

ok

rough furnace
#

assert(SMODS.load_file("file.lua"))()

#

is the simplest way to load another file

#

and throws errors if it fails to load

torn grove
#

ok

#

and how do i change the name of my mod so it shows up as that instead of "Example Mod" in game?

rough furnace
#

In the header under name

lethal stratus
#

does anyone want to test my cards in runs, feedback is appreciatef

torn grove
rough furnace
#

top of your main file

torn grove
#

if I change anything in that the mod doesn't seem to load.

rough furnace
#

do you have a header in multiple lua files?

torn grove
#

there's only 1 lua file in my mod

rough furnace
#

what did you change it to?

#

Possibly you put something invalid in

torn grove
#

"Twelve Souls"

rough furnace
#

show the full header

torn grove
#

that is the full header isn't it?

#

if not then what is

rough furnace
#

after changing it

torn grove
#

Sorry I already undoed it ages ago

rough furnace
#

well if you change it now does it work?

torn grove
#

i will try

split creek
#

Shouldn't mods be using a json file for this stuff? That's what I read in the steamodded wiki

torn grove
rough furnace
#

that shouldn't be related to the name

#

Is your atlas path mispelt?

torn grove
#

I had a duplicate of my lua file in a different folder, maybe it should work now?

rough furnace
#

Yeah loading 2 versions of the same mod is UB

torn grove
#

yeah

#

okay, got the mod name working but how do I change the color of this label?

#

the one below the rarity

rough furnace
#

the badge colour in the header

torn grove
#

and also, how do I make this joker add joker slots?

rough furnace
#

you can modify the G.jokers.config.card_limit (iirc) in your add_to_deck and remove_from_deck methods

torn grove
#

so how do I make it not spawn a joker (am I doing it right btw)

rough furnace
#

Don't tell it to spawn a joker

torn grove
#

like this? also I just want it to be passive not activated when you select a blind, anyway did I do it right again?

rough furnace
#

I'm not sure what you are trying to do?

torn grove
#

string theory just gives 2 joker slots, does the context.setting_blind effect that?

tepid crow
#

why aren't you using add_to_deck and remove_from_deck like Wilson suggested?

#

oh you have no idea how

torn grove
#

remember I'm new to this kinda stuff

tepid crow
#

you should take a look at cryptid's negative joker

torn grove
#

cryptid doesn't use SMOD.Joker btw, would using what it uses be easier?

tepid crow
#

you can just use SMODS.Joker

torn grove
#

ok

tepid crow
#

the reason cryptid does it that way is to make importing files easier I think?

torn grove
#

oh ok

tepid crow
#

either that or it's easier when disabling sections of the mod through the config

#

in either case, not really relevant for you

torn grove
#

where do I change the amount of joker slots? I want it to be 2 instead of 4.

tepid crow
#

add_to_deck and remove_from_deck aren't part of calculate, they are their own functions

wintry solar
torn grove
#

oh

zealous glen
#

I thought Cryptid did use SMODS.Joker

#

But it separated the data into another file

#

It’s just that the separation is wonky

zealous glen
# torn grove

G.jokers is where the Jokers are stored, G.jokers.config.card_limit is how many you can have

#

Well, technically Jokers are in G.jokers.cards IIRC

#

G.jokers is the CardArea object

tepid crow
zealous glen
#

Does the indentation matter?

wintry solar
#

It does not

zealous glen
#

I thought so

tepid crow
rough furnace
#

It makes it more readable

torn grove
#

what happened here? looks fine to me.

rough furnace
wintry solar
#

You’ve put it in the wrong place

tepid crow
tepid eagle
#

here is my code /j

zealous glen
hardy viper
torn grove
#

I should add a comma?

hardy viper
#

oh nvm

#

that's not the next function

#

post full relevant code next time

rough furnace
#

Can someone tell me why my code don 't work 😢

tepid crow
torn grove
tepid eagle
hardy viper
#

you take it out of the calculate function

#

like everyone here has told you twice

rough furnace
#

I feel like this is a learn lua moment

tepid crow
#

Certified ™️

wintry solar
#

It could also be a learn to read moment

hardy viper
#

i feel like it's a common sense issue if you can't see the those 2 functions should be structured just like any other in the table

wintry solar
#

Why ask for help if you ignore the answer

rough furnace
torn grove
#

like this?

hardy viper
#

yeah

wintry solar
#

No

tepid crow
#

No

hardy viper
#

oh

wintry solar
#

There’s a missing end still

hardy viper
#

missing end

tepid crow
#

The indentation is correct, but the code doesnt follow the indentations

torn grove
rough furnace
#

well the if doesn't have an end

hardy viper
rough furnace
#

tbh I wish VSCode treated the if and end's liek the brackets where it matches them

elder vapor
rough furnace
#

kate does but it doesn't have a bunch of other nice features I like

hardy viper
#

lmao wtf is that

torn grove
tepid crow
#

Also something seems fucky with the SMODS.Joker

hardy viper
rough furnace
hardy viper
hardy viper
torn grove
#

what about this evil fellow at the end?

hardy viper
#

but no I don't know what kate is either

hardy viper
#

oh I suppose pool isn't self epxlanatory

#

that's whether it'll show up in the game

rough furnace
#

tbh I wonder if an extension could tell vscode to treat the if's and functions as brackets with the ends

tribal umbra
#

wawa 2

torn grove
#

it looks evil and I don't like it

rough furnace
#

red means unmatched

hardy viper
#

that's a syntax error

hardy viper
torn grove
rough furnace
torn grove
torn grove
hardy viper
#

are you genuinely trolling

rough furnace
#

It mean's it's unbalenced

torn grove
rough furnace
# tepid eagle

canendish isn't allowed in the pool until gros micheal dies