#💻・modding-dev

1 messages · Page 401 of 1

thorn furnace
#

seems fine to me

shut crater
#

I mean it's worse ice cream

wind steppe
shut crater
#

ice cream loses its value far before it runs out

#

imo

#

is that even true?

#

oh ice cream is per hand isn't it

rapid stag
#

anyone know how to use the deckskin crediting from the steamodded PR merge? cirBox

shut crater
wind steppe
#

oh i have a bad idea
what if painted deck but more extreme

#

like this

keen loom
#

ok, but now i'm trying to do this, and it doesn't trigger at all

elfin stratus
wind steppe
#

i see no problem with this it's just 5 painted decks

normal crest
#

they won't magically appear in the context

shut crater
shut crater
#

it's context.other_joker

solid mesa
shut crater
wind steppe
solid mesa
#

mmm

wind steppe
#

this is jokerless with a cluttered shop and +10 handsize

shut crater
#

this is just worse because in theory they'll still show up in the shop

wind steppe
#

i feel like the handsize makes up for it though

shut crater
#

simply take ethereal voucher

normal crest
sonic cedar
#

can someone tell me why the mult gain doesnt trigger?

shut crater
#

^

wind steppe
solid mesa
wind steppe
#

negative tag goes crazy though

keen loom
solid mesa
wind steppe
sonic cedar
solid mesa
wind steppe
tawdry shale
#

trying to check if a scored card is a queen, and if it has no edition or isn't polychrome it's turned into a polychrome queen but i'm getting an error for the second if statement

shut crater
keen loom
normal crest
shut crater
sonic cedar
#

is it better to do separate instances of take ownership when it comes to the same card
or just use the same one (what im doing now)

normal crest
#

the joker's mult, the hand mult or smt else?

keen loom
shut crater
normal crest
#

so your joker increases the amount of mult some certain other jokers give after they score?

normal crest
#

is it meant to be a permanent upgrade to that other joker

scarlet imp
#

do scored cards/cards in your deck have a field where they store the amount of chips they give?

normal crest
#

that's just the chips from the rank

scarlet imp
#

awesome, thanks

normal crest
#

otherwise card:get_chip_bonus()

scarlet imp
normal crest
#

that one should

scarlet imp
wintry basin
#

Which music track gets replaced?

normal crest
#

i think...

#

the variable names might be a bit different, it's been a while

scarlet imp
keen loom
wintry basin
#

What music can I replace?

wild escarp
#

What can I use to debuff a joker?

scarlet imp
#

card.debuff = true

#

i think

wintry basin
scarlet imp
normal crest
# keen loom so, is there a way to do this?

Try adding a check for if context.other_joker in addition to filtering only the jokers you want to modify, then you'd have to modify the ability table of that other joker to upgrade it

#

I'm not 100% sure that will work as it's not very clear what other_joker does specifically

sonic cedar
#

better look at my code. im 99% sure that the ownership and hook work fine, since the eval returned 1 , but what can i do to get the joker to actually use that variable chudhit, because apparently using the G.GAME method doesn't work?

1: joker's calculate function (where i think the issue is)
2: hook into igo (note chudhit)
3/4: ownership of WOF (inverse of my previous wheel failcheck, which is used for a joker's unlock condition rather than an effect)

if anyone has any ideas/solutions, ping me just in case i miss it

normal crest
#

it needs to contain the word music in its key and you have to add a select_music_track function that will return a number, the higher the number the higher the priority it will have over other music tracks

wintry basin
#

Yes yes but what tracks?

normal crest
#

can you explain what you want in detail

wintry basin
#

Music 1 through music 5

normal crest
#

you want to replace the original music files with custom ones?

wind steppe
#

update on my x5 painted deck:
lost to ante 5 fish

normal crest
#

I'm actually not too sure, my guess reading the wiki would be to use the select_music_track function in your Sound object to replace the music when the result of SMODS.Sound:get_current_music() is one of the ones you want to replace

#

just a guess btw

keen loom
#

now that i think about it, the extra effect is useless for mult-only jokers

normal crest
#

never done that

wind steppe
#

chat what do we think

normal crest
#

isn't there a stake that removes 1 hand

#

so you would start at 0 with that deck in that difficulty

wind steppe
#

blue stake removes one discard though

normal crest
#

ah right, it was a discard

keen loom
limber obsidian
#

chat ok so i got a joker and everytime i hover over it i get the error [Smods bruh "HarmfulJokers.lua":37: bad argument #1 to 'ipairs' table expectes, got nil, i based it off of the cloud 9 code so idk what the problem is. here is the jokers code ```SMODS.Atlas {
key = "HarmfullJokes",
path = "HarmfullJokes.png",
px = 71,
py = 95
}

SMODS.Joker {
key = 'GraffJ',
loc_txt = {
name = 'Street Art',
text = {
"{C:mult}+#1#{} Mult for each Seal in your deck"
}
},
config = { extra = { mult = 4 } },
loc_vars = function(self, info_queue, card)
-- Count sealed cards in the player's deck
local seal_count = 0
for _, c in ipairs(G.playing_cards) do
if c.ability and c.ability.seal and c.ability.seal ~= 'None' then
seal_count = seal_count + 1
end
end
-- Calculate total Mult gain
local total_mult = seal_count * card.ability.extra.mult
return { vars = { total_mult } }
end,
rarity = 1,
atlas = 'HarmfullJokes',
pos = { x = 0, y = 0 },
cost = 6,
calculate = function(self, card, context)
if context.joker_main then
local seal_count = 0
for _, c in ipairs(G.playing_cards) do
if c.ability and c.ability.seal and c.ability.seal ~= 'None' then
seal_count = seal_count + 1
end
end
local total_mult = seal_count * card.ability.extra.mult
return {
mult_mod = total_mult,
message = localize { type = 'variable', key = 'a_mult', vars = { total_mult } }
}
end
end
}```

normal crest
# wind steppe chat what do we think

honestly this is incredibly difficult, you have only 1 hand to work with, no money cus no hands left at end of round, and there's no point to the joker slots if you can't fill them cus no money

limber obsidian
#

oh thats the entire .lua file mb

#

works ig for this tho

scarlet imp
normal crest
limber obsidian
wind steppe
scarlet imp
#

feel free to use it 🙂

wind steppe
#

no mine is funnier

scarlet imp
#

lmaoo

#

true

#

impossible deck on ante 1

wind steppe
#

balance is my second consideration when it comes to modding

#

the bit is first

normal crest
scarlet imp
#

is there a function that scored cards call to be scored? like a card:score or something like that

limber obsidian
normal crest
#

oh, in that case try replacing this line for _, c in ipairs(G.playing_cards) do in the loc vars function with for _, c in ipairs(G.playing_cards or {}) do

limber obsidian
wild escarp
#

How do I make this debuff stick? Currently it gets wiped at the end of the round.

use = function(self, card, area, copier)
    local debuffed_joker = pseudorandom('bomb', 1, #G.jokers.cards)
    G.jokers.cards[debuffed_joker].debuff = true
    delay(0.5)
    ease_dollars(card.ability.extra.money)
    delay(0.3)
end,

can_use = function(self, card)
    return G.jokers.cards
end
wind steppe
#

i've fused my two bad deck ideas to create an even worse deck idea

#

behold:

normal crest
limber obsidian
scarlet imp
limber obsidian
wind steppe
#

jokers still appear and you have 1 hand

scarlet imp
limber obsidian
#

also @normal crest is there a way to make it show how many cards it finds?

wind steppe
limber obsidian
#

also also @normal crest it still crashes

#

same error

scarlet imp
#

jk even I'm not that greedy

wind steppe
#

invisible joker goes hard though

#

duplicate my air

scarlet imp
#

waittttt

#

you're so right tbh

wind steppe
#

i kinda want to get rid of consumable slots

normal crest
wind steppe
#

how would i double nebula deck's effect

#

for context

keen totem
#

what rarity would unconditional X2 Mult be?

limber obsidian
#

ill check again but :I

wind steppe
scarlet imp
#

you can just straight up mess with consumable slots mid-run, I tried it with a joker but it gets really buggy if you sell the joker while holding 3 consumables

keen totem
limber obsidian
scarlet imp
keen totem
#

ah

wind steppe
#

photograph is also pretty much unconditional though

keen totem
#

alr

scarlet imp
keen totem
normal crest
#

just to be sure you changed the right thing

wind steppe
keen totem
#

balancing jokers off of the best jokers is bound to become power creep

wind steppe
#

might be less of a "x2 mult is common" thing and more of a "photograph should be uncommon/rare" thing

limber obsidian
# normal crest can you show your current code, after the modification i said
    key = 'GraffJ',
    loc_txt = {
        name = 'Street Art',
        text = {
            "{C:mult}+#1#{} Mult for each Seal in your deck"
        }
    },
    config = { extra = { mult = 4 } },
    loc_vars = function(self, info_queue, card)
        -- Count sealed cards in the player's deck
        local seal_count = 0
        for _, c in ipairs(G.playing_cards) do
            if c.ability and c.ability.seal and c.ability.seal ~= 'None' then
                seal_count = seal_count + 1
            end
        end
        -- Calculate total Mult gain
        local total_mult = seal_count * card.ability.extra.mult
        return { vars = { total_mult } }
    end,
    rarity = 1,
    atlas = 'HarmfullJokes',
    pos = { x = 0, y = 0 },
    cost = 6,
    calculate = function(self, card, context)
        if context.joker_main then
            local seal_count = 0
            for _, c in ipairs(G.playing_cards or {}) do
                if c.ability and c.ability.seal and c.ability.seal ~= 'None' then
                    seal_count = seal_count + 1
                end
            end
            local total_mult = seal_count * card.ability.extra.mult
            return {
                mult_mod = total_mult,
                message = localize { type = 'variable', key = 'a_mult', vars = { total_mult } }
            }
        end
    end
}```
wind steppe
scarlet imp
#

S&B + Smiley > Photo + Chad, don't @ me

normal crest
keen totem
#

ima do the math

normal crest
keen totem
limber obsidian
scarlet imp
thorn furnace
#

how would I tell if a sold card is a joker

scarlet imp
#

if context.selling_self in the Joker's calculate

#

or are you doing like a "each joker sold" situation

keen totem
#

dont think thats what they meant

thorn furnace
limber obsidian
#

@normal crest it works perfectly, time to add the other 4 jokers. mind if i ping you again if i need help?

normal crest
thorn furnace
#

thank u :3

thorn furnace
#

does context.remove_playing_cards count discarded cards or just destroyed cards

#

nvm I can't read

#

How would I target specifically destroyed cards tho

limber obsidian
keen totem
#

how do i stop a joker from selling itself until its done doing the effects on sell?

#

nvm

snow kindle
#

hiiii

#

my joker doesnt joker

normal crest
snow kindle
normal crest
keen totem
#

and whats the actual effect

snow kindle
# normal crest what is the joker's code?

SMODS.Joker{
key = "Yuu",
loc_txt = {
name = "Yuuri",
text = {
"A girl who aclaims being a God.",
"To prove it, she gives {X:mult,C:white}6{} and",
"{X:chips,C:white}160{} Chips to you!."
}
},
atlas = "Yuu",
pos = {x = 0, y = 0},
rarity = 4,
soul_pos = { x = 0, y = 1},
cost = 6,
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_comat = true,
perishable_compat = true,
config = { extra = { chips = 120, mult = 6 }, },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.chips, card.ability.extra.mult } }
end,
calculate = function(self, card, context)
if context.joker_main then
return {
mult = card.ability.extra.mult,
chips = card.ability.extra.chips
}
end
end
}

keen totem
#

is it X6 mult?

keen totem
snow kindle
#

where

keen totem
#

itll actually embed like that if i say it

#

1 sec

#

put your code inside that

normal crest
#

they mean it's discord, so it's shown like this

SMODS.Joker{
    key = "Yuu",
    loc_txt = {
        name = "Yuuri",
        text = {
            "A girl who aclaims being a God.",
            "To prove it, she gives {X:mult,C:white}6{} and",
            "{X:chips,C:white}160{} Chips to you!."
        }
    },
    atlas = "Yuu",
    pos = {x = 0, y = 0},
    rarity = 4,
    soul_pos = { x = 0, y = 1},
    cost = 6,
    unlocked = true,
    discovered = true,
    blueprint_compat = true,
    eternal_comat = true,
    perishable_compat = true,
    config = { extra = { chips = 120, mult = 6 }, },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.chips, card.ability.extra.mult } }
    end,
    calculate = function(self, card, context)
        if context.joker_main then
            return {
                mult = card.ability.extra.mult,
                chips = card.ability.extra.chips
            }
        end
    end
}
snow kindle
#

oh

snow kindle
#

got it

#

but what i have to do

keen totem
#

i dont actually see anything wrong here

normal crest
#

I don't see any obvious problems, make sure to start a new run and get a new copy of your joker

snow kindle
#

my joker doesnt joker

keen totem
#

+6 mult and +120 chips is incredibly weak by the way

#

for a legendary at least

#

unless its meant to be X6 mult?

snow kindle
#

and test it faster

keen totem
#

ok

#

1 sec

#

download debugPlus

normal crest
#

and other tools for developing mods

keen totem
#

and you can click 3 on a joker in collection to spawn it

snow kindle
#

oh

wind steppe
#

is this a good way of doubling the nebula deck effects

#

(note: "good" as in makes sense not "good" as in good game design)

sonic cedar
normal crest
#

not my code but returning both like that should still work

sonic cedar
#

oh ok

keen totem
#

what rarity should this be?

#

steel cards are very good, so i feel like this should be pretty high rarity right?

wind steppe
#

whats the cost

keen totem
#

idk

normal crest
#

I'd make it Rare

keen totem
#

i have all of my uncommon at 6

wind steppe
#

maybe 7 or 8 bucks

sonic cedar
keen totem
#

can you not use gifs?

#

or is that just tenor gifs

normal crest
#

you can use gifs

wind steppe
#

do yall think this is a good (as in makes sense) way to double nebula deck effects

limber obsidian
keen totem
#

but not tenor gifs?

limber obsidian
normal crest
#

wdym no tenor gifs, all should work

keen totem
#

anyways is unconditional X2 mult fine as uncommon?

normal crest
#

imo yes

snow kindle
#

idk whats wrong with my balatro

sonic cedar
normal crest
keen totem
#

that sets item cost

limber obsidian
normal crest
#

G.shop_jokers, G.shop_vouchers and G.shop_boosters, looping through all of those and having a 1 in 5 chance to set card.ability.couponed = true on each

keen totem
#

using other mods and vremade to find stuff is very useful

normal crest
#

Probably in the entering_shop context

#

or whatever the name is

sonic cedar
thorn furnace
#

How would I go about copying a specific card
I'm looking at DNA but I don't quite understand the parameters of the copy_card function

wind steppe
#

why does this crash when i try to play with this deck?

SMODS.Back{
    key = "cosmicdeck",
    unlocked = true,
    config = {extra = {
        consumable_slots = -2,
        vouchers = {'v_telescope', 'v_observatory'}
    }},
    atlas = 'Backs',
    pos = {x = 0, y = 0},
    loc_vars = function(self,info_queue,card)
         return {vars = {localize{type = 'name_text', key = self.config.extra.vouchers[1], set = 'Voucher'}, localize{type = 'name_text', key = self.config.extra.vouchers[2], set = 'Voucher'}, self.config.extra.consumable_slots}}
    end,
    apply = function(self, back)
        G.GAME.starting_params.consumable_slots = G.GAME.starting_params.consumable_slots + self.config.extra.consumable_slots
        for k, v in pairs(self.config.extra.vouchers) do
            G.GAME.used_vouchers[v] = true
            G.GAME.starting_voucher_count = (G.GAME.starting_voucher_count or 0) + 1
            G.E_MANAGER:add_event(Event({
                func = function()
                    back.apply_to_run(nil, G.P_CENTERS[v])
                    return true
                end
            }))
        end
    end
}
normal crest
#

what's the crash

wind steppe
normal crest
#

ah

#

the error is caused by back.apply_to_run it should be back:apply_to_run

#

Either way

#

I don't think your code is ideal

wind steppe
normal crest
#

I am pretty sure Backs can start with vouchers from just their config

carmine burrow
wind steppe
#

not as bad as this though

normal crest
# wind steppe how

Remove your apply function for now, then in the config just do

config = {
  consumable_slot = -2,
  vouchers = { 'v_telescope', 'v_observatory' }
}
#

no extra

sonic cedar
thorn furnace
scarlet imp
thorn furnace
#

I hope it's that because that's what I'm going for

normal crest
#

I think there is one called modify_scoring_hand

scarlet imp
#

it's in context.before, same as Midas Mask

normal crest
#

yeah that's not early enough for what you're trying to do unfortunately

scarlet imp
#

I see

normal crest
#

let me look it up for oyu

sonic cedar
scarlet imp
normal crest
#

oh wait it is

#

that's small, anyway that's the info you have in that context

#

it happens for each card individually it seems

thorn furnace
scarlet imp
#
calculate = function(self, card, context)
      if context.modify_scoring_hand then
          local debuffed = 0
          for _, scored_card in ipairs(context.scoring_hand) do
              if scored_card.debuff then
                  debuffed = debuffed + 1
                  G.E_MANAGER:add_event(Event({
                      func = function()
                          scored_card:set_debuff(false)
                          scored_card:juice_up()
                          return true
                      end
                  }))
              end
          end
          if debuffed > 0 then
              return {
                  message = localize('k_buffed'),
                  colour = G.C.PURPLE
              }
          end
      end
  end

this is what I got
the thing is, I can get the card to work but visuallly it looks terrible. I want the un-debuff to happen at the same time as the juice-up but I can never get them to line up without using a ton of delay, but then the player has to wait for the delay which is obviously bad

#

I can show what I mean if you want

normal crest
#

I know what you mean

#

I don't think there's an elegant solution to that

scarlet imp
#

😭

#

thanks anyway

sonic cedar
north lodge
#

Hey all, I am trying to read through the game's source code to understand how randomness is implemented. I essentially am trying to generate similar information to "The Soul", or rather understand how it is done. I've been trying to analyze it myself, but I am really struggling to see how pseudorandom, pseudoseed, pseudohash, etc. interact with one another to create values. Any help in my quest to understand this is greatly appreciated.

thorn furnace
sonic cedar
#

let me see if i can whip something up

thorn furnace
#

thank uuu dance

normal crest
#

cus it's just using the math library of lua

north lodge
#

Nono - just how the game takes it and turns it into generating tags and bosses and shop order, etc.

rapid stag
#

also bump

sonic cedar
# thorn furnace thank uuu <a:dance:993517994305130506>
G.playing_card = (G.playing_card and G.playing_card + 1) or 1
local copy_card = copy_card(context.removed[1], 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)
G.hand:emplace(copy_card)
copy_card.states.visible = nil

G.E_MANAGER:add_event(Event({
    func = function()
        copy_card:start_materialize()
        return true
    end
}))

try this maybe

thorn furnace
#

ooo

#

thank uuu

wind steppe
#

chat what do we think

limber obsidian
#

@normal crest super strange idea, what if i used the stuff from the free shop skip tag? I wouldnt know how to make it work with a joker so i might need a lot of help with this one but :P

#

Also how would i even find that

normal crest
north lodge
#

then using those numbers it decides what to spawn ingame
This is the part I am trying to find/understand

sonic cedar
#

/lh

wind steppe
#

but i'm not making the textbox even taller so

normal crest
thorn furnace
sonic cedar
normal crest
wind steppe
#

so you have awful income

sonic cedar
wind steppe
#

once i get it done ill put it in here

thorn furnace
normal crest
north lodge
#

I gotcha. I appreciate the direction. I'll see what I can do!

normal crest
#

good luck soldier o7

frigid blaze
#

Can you tell me how to make text animation like in the misprint joker?

normal crest
#

tag codes is in tag.lua

#

and you'd just ctrl + f for "coupon tag"

#

you should get a pretty good idea of what to do with that

sonic cedar
thorn furnace
#

oh

thorn furnace
wind steppe
#

question

#

does adding plasma deck make this better or worse

limber obsidian
wind steppe
wind steppe
solid mesa
# wind steppe funny

dude decking decks with decks to make more deck, that surely will be used to deck another types of decks

rapid stag
#

does a deck of all decks contain itself

wind steppe
#

thats the wrong set

solid mesa
#

do decks^deck

thorn furnace
#

just replace the xmult with duplicating and get rid of the "glass" requirement I thought

sonic cedar
#

ok but glass joker doesnt look for specific cards

#

it's literally just whenever a glass is destroyed

thorn furnace
#

yea
the joker I'm going for duplicates a card whenever it's destroyed

sonic cedar
#

for something like dna where it copies

#

you dont need a for loop

thorn furnace
#

oki

sonic cedar
#

like dna does it like
local copy_card = copy_card(context.full_hand[1], nil, nil, G.playing_card) (thanks n)
but you don't want it to be about your hand, you want it to be about your destroyed cards
so i changed it to
local copy_card = copy_card(context.removed[1], nil, nil, G.playing_card)

thorn furnace
#

does that still work if there are multiple destroyed cards at the same time

sonic cedar
#

i do not believe so

#

but im sure there's a way to

thorn furnace
#

o

#

i just realized something
im gonna test something rq

limber obsidian
#

@normal crest ok this is what i have, but when i load up a run i get 3 errors saying stuff considering the shop spots are not instantiated: ```SMODS.Joker {
key = 'jshatt',
loc_txt = {
name = 'Its free... :3',
text = {
"{C:attention}1 in #1#{} chance for all shop items to be free"
}
},
config = { extra = { chance = 5 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.chance } }
end,
rarity = 2,
atlas = 'HarmfullJokes',
pos = { x = 1, y = 0 },
cost = 7,

calculate = function(self, card, context)
    if context.type == 'shop_final_pass' and not G.GAME.shop_free then
        local chance = 1 / (card.ability.extra.chance or 5)
        if pseudorandom('jshatt' .. G.GAME.round_resets.shop_uses) < chance then
            G.GAME.shop_free = true

            if G.shop_jokers then
                for _, v in pairs(G.shop_jokers.cards) do
                    v.ability.couponed = true
                    v:set_cost()
                end
            end
            if G.shop_booster then
                for _, v in pairs(G.shop_booster.cards) do
                    v.ability.couponed = true
                    v:set_cost()
                end
            end
            if G.shop_vouchers then
                for _, v in pairs(G.shop_vouchers.cards) do
                    v.ability.couponed = true
                    v:set_cost()
                end
            end

            card:yep('+', G.C.GREEN, function()
                return true
            end)

            return {
                message = localize{type='variable', key='a_mult', vars={0}},
                extra = { card.ability.extra.chance }
            }
        end
    end
end

}```

thorn furnace
#

nvm

sonic cedar
#

oh wait lmao

#

ok 2 things

#
  1. get the for loop back
thorn furnace
sonic cedar
#

oh no

thorn furnace
sonic cedar
thorn furnace
#

local copy_card = copy_card(removed_card, nil, nil, G.playing_card)

limber obsidian
limber obsidian
#

ping me if ya got any

thorn furnace
sonic cedar
#

hell yeahhhh

thorn furnace
#

yeeee

sonic cedar
#

glad i caught myself before i overthought it

thorn furnace
#

I am now almost 1/4 done with all the Jokers for my mod dance

#

aside from the art

keen totem
#

how do i directly set the player's mult

thorn furnace
#

mult is a global variable
Tho I think it has to be done in certain contexts

scarlet imp
#

mult = global

normal crest
keen totem
#

so just do mult = 1

scarlet imp
#

ye

normal crest
keen totem
#

ah

#

how do i update that?

#

event?

scarlet imp
#

I found that if you set it directly it doesn't update, so return { mult = 0 }

#

there's probably nicer ways though

normal crest
keen totem
#

whats the first table

normal crest
#

i think settings, like playing a sound or adding a delay

#

should be fine to leave empty iirc

limber obsidian
#

Im afk rn and on my phone

wind steppe
#

what starting parameter would i change to alter the number of shop slots?

normal crest
#

if so they're a warning and not an error

#

and unrelated to your code

limber obsidian
normal crest
#

ah

#

I think it's still unrelated to your code

limber obsidian
#

And it specifically states error

limber obsidian
normal crest
#

your code was never triggering cus the context check was wrong

#

and it was never true

limber obsidian
#

And didnt happen before

normal crest
#

G.GAME.shop.joker_max for jokers, G.GAME.starting_params.boosters_in_shop for boosters

scarlet imp
#

trying to use this to retrigger Jokers in the BI.POISONOUS table:

calculate = function(self, card, context)
    if context.repetition and context.cardarea == G.jokers then
        if not BI.POISONOUS[context.other_card.config.center_key] == nil then
            return {
                repetitions = card.ability.extra.repetitions
            }
        end
    end
end

I put Jimbo in there to test:
j_joker = true,
but he doesn't retrigger

analog spoke
#

⚰️ why does the voucher have to work this way bsdjbhsg waaaaah I wanna make a joker that increases edition rate but if it doesn't stack with hone what's the point lmao dbnfhbsjd

#

wait, isn't there a way to, like, override this? is that a good idea here maybe? replace the set to with multiply? :333

normal crest
#

you can take_ownership of it and modify the redeem function

analog spoke
#

hmmmm, I am not yet sure how to do this lol hmm

#

how would I take_ownership of the hone and glow up vouchers? :3

normal crest
#
SMODS.Voucher:take_ownership('v_hone', {
  redeem = function(self, card)
    -- your replacement
  end
})

I believe

analog spoke
#

ok, I will try this out, thanku :3

limber obsidian
#

@normal crest whenever i reroll i now get this error

limber obsidian
#

And when i entered the shop it didnt crash

normal crest
limber obsidian
limber obsidian
north lodge
keen totem
#

windows shift s

#

i dont mean this in a mean way

#

but im pretty sure i already said how to

limber obsidian
# normal crest can you show the code again
    key = 'jshatt',
    loc_txt = {
        name = 'Its free... :3',
        text = {
            "{C:attention}1 in #1#{} chance for all shop items to be free"
        }
    },
    config = { extra = { chance = 1 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.chance } }
    end,
    rarity = 2,
    atlas = 'HarmfullJokes',
    pos = { x = 1, y = 0 },
    cost = 7,

    calculate = function(self, card, context)
        if context.starting_shop then
            local chance = 1 / (card.ability.extra.chance or 1)
            if pseudorandom('jshatt' .. G.GAME.round_resets.shop_uses) < chance then
                G.GAME.shop_free = true

                if G.shop_jokers then
                    for _, v in pairs(G.shop_jokers.cards) do
                        v.ability.couponed = true
                        v:set_cost()
                    end
                end
                if G.shop_booster then
                    for _, v in pairs(G.shop_booster.cards) do
                        v.ability.couponed = true
                        v:set_cost()
                    end
                end
                if G.shop_vouchers then
                    for _, v in pairs(G.shop_vouchers.cards) do
                        v.ability.couponed = true
                        v:set_cost()
                    end
                end

                card:yep('+', G.C.GREEN, function()
                    return true
                end)

                return {
                    message = localize{type='variable', key='a_mult', vars={0}},
                    extra = { card.ability.extra.chance }
                }
            end
        end
    end
}
#

Im using 1 out of 1 chance for just testing perpose btw

stiff quiver
#

how can i check the number of discards for calculation?

limber obsidian
#

Purpose*

normal crest
#

And remove the G.GAME.shop_free = true thing too

keen totem
#

what do yall think about the balance of these

#

also dont question "Sets Mult to 1"

limber obsidian
#

if its both then what one for what

normal crest
#

for the card:yep all 3 lines, for the shop_free the entire line, for concatenation just the part i sent

normal crest
#

so that without any other effects the edition_rate is the same as it would be in vanilla

#

but that's not really an error just a good practice

normal crest
limber obsidian
normal crest
#

remove just this .. G.GAME.round_resets.shop_uses from that line

#

that's what I meant

scarlet imp
normal crest
#

in lua .. is used to concatenate strings, aka "hello" .. " world" results in "hello world"

normal crest
scarlet imp
#

I see

normal crest
#
SMODS.current_mod.optional_features = {
  retrigger_joker = true
}

you should put this somewhere in your entry file

limber obsidian
normal crest
#

what is the error now?

limber obsidian
#

No errors

#

Just doesnt set shop to 0

#

I may write the code in the correct format, and i act like i understand what this means, but in reality. My work is held together by glue, duct tape, and hopes

normal crest
#

tbh idk what's wrong with your code either

#

can you send it again lol

#

to see the current state

limber obsidian
#

Sure

#
    key = 'jshatt',
    loc_txt = {
        name = 'Its free... :3',
        text = {
            "{C:attention}1 in #1#{} chance for all shop items to be free"
        }
    },
    config = { extra = { chance = 1 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.chance } }
    end,
    rarity = 2,
    atlas = 'HarmfullJokes',
    pos = { x = 1, y = 0 },
    cost = 7,

    calculate = function(self, card, context)
        if context.starting_shop then
            local chance = 1 / (card.ability.extra.chance or 1)
            if pseudorandom('jshatt') < chance then

                if G.shop_jokers ```
#

oop

#

thats not all the code

#
    key = 'jshatt',
    loc_txt = {
        name = 'Its free... :3',
        text = {
            "{C:attention}1 in #1#{} chance for all shop items to be free"
        }
    },
    config = { extra = { chance = 1 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.chance } }
    end,
    rarity = 2,
    atlas = 'HarmfullJokes',
    pos = { x = 1, y = 0 },
    cost = 7,

    calculate = function(self, card, context)
        if context.starting_shop then
            local chance = 1 / (card.ability.extra.chance or 1)
            if pseudorandom('jshatt') < chance then

                if G.shop_jokers then
                    for _, v in pairs(G.shop_jokers.cards) do
                        v.ability.couponed = true
                        v:set_cost()
                    end
                end
                if G.shop_booster then
                    for _, v in pairs(G.shop_booster.cards) do
                        v.ability.couponed = true
                        v:set_cost()
                    end
                end
                if G.shop_vouchers then
                    for _, v in pairs(G.shop_vouchers.cards) do
                        v.ability.couponed = true
                        v:set_cost()
                    end
                end

                return {
                    message = localize{type='variable', key='a_mult', vars={0}},
                    extra = { card.ability.extra.chance }
                }
            end
        end
    end
}```
#

There

#

@normal crest

normal crest
#

Uhmmmm

#

Did you start a new run

limber obsidian
#

ill try that ig

normal crest
#

please do, cus starting_shop only happens the first time each shop is created

#

not when it's loaded from a save file

limber obsidian
#

OOP

#

Yep

limber obsidian
#

But all the re-rolls dont work @normal crest

normal crest
#

or do

#

if context.starting_shop or context.reroll_shop then

normal crest
analog spoke
#
  • the hone and glow up from the vanilla remade
    vs
  • the attempted overrides I made
limber obsidian
scarlet imp
#

Page 1 done

normal crest
#

replacing your current if context.starting_shop then line

limber obsidian
#

Is it just a_money

normal crest
#

might be, i don't know that exactly

limber obsidian
#

a_dollars? Etc

keen totem
#

how do you get if a card is highlighted?

normal crest
# analog spoke

Oh, so you should just do card.ability.extra without the rate, as that does not seem to be a thing

normal crest
limber obsidian
normal crest
#

if you want it to be plain text just do message = "here is my text"

limber obsidian
#

Alright i guess its time for the next joker... yaaaay

analog spoke
thorn furnace
#

How do you destroy a specific card in your hand
Like if you wanted to destroy the second card
context.other_card doesn't exist in context.destroy_card

analog spoke
#

this is what, like, 12 of these vouchers combined looks like, hehehehe

keen totem
normal crest
#

in the order they were highlighted tho

#

not in the order they are in hand

keen totem
#

i kinda need if a card is highlighted

#

obv i could check through that list

normal crest
#

yeah that's how you do it

keen totem
#

oh

normal crest
keen totem
#

they did

thorn furnace
normal crest
#

of course with additional checks to check that a 2nd card in hand even exists

thorn furnace
#

Ooo

keen totem
#

this is the dumbest idea ive ever had

thorn furnace
keen totem
#

(i mean, its a reference so it makes sense if you get that)

normal crest
# keen totem

actually cards might have a highlighted field in them

keen totem
#

eh

solid mesa
keen totem
#

idk why but i thought it would go in update

#

a for loop that runs once is fine

normal crest
#

if you're able could you check if using if card.highlighted works too

normal crest
#

yippie

keen totem
#

i just watched a guy shoot a cow in an ad

#

what the hell are these ads even for anymore

tawdry shale
shell timber
#

seems very situational

normal crest
#

just like gambling

tawdry shale
normal crest
#

also you might be recording at a very low brightness

tawdry shale
#

idk why that's happening but i'll fix it eventually

keen totem
#

Bogos Binted

  • Retriggers Photograph 13 times
solid mesa
thorn furnace
#

Like if I wanted to destroy all 4s in my hand

daring fern
thorn furnace
#

Oh

#

I see

crimson lantern
#

i'm trying to make a mod where the card itself has a different color, but i realized enhancements go behind the sprite goes behind so you can't see them. how would i edit that texture instead?

keen totem
#

how do i get a joker's name

daring fern
keen totem
#

nothings working so idk

#

also i dont think my jokers have localization so

#

but sure if that works

daring fern
keen totem
#

so G.localization.descriptions.Joker[v.config.center.key].name would be the name of v?

keen totem
#

thats the joker it was for

#

this joker is probably better in other languages

#

and thats really funny

#

wait can you not change languages in balala?

#

i thought thats what localization was for

daring fern
keen totem
#

where?

daring fern
keen totem
#

ok

scarlet imp
keen totem
#

its literally better if youre german

#

arent a lot of words in german way longer than in other languages

scarlet imp
keen totem
#

german buff

scarlet imp
#

uncommon German buff

thorn furnace
#

How do I go about increasing the selection limit in booster packs

daring fern
thorn furnace
#

okii

thorn furnace
daring fern
thorn furnace
hidden notch
thorn furnace
daring fern
thorn furnace
#

yea
not sure if there's a better way

sturdy compass
#

Been awhile since I've had to ask a question instead of being the one answering questions lol

I'm trying to make an enhancement that renders a sprite on top of the rank/suit sprite. It'll look roughly like the first image. I've found one other mod that does something like this, being Grim with its "Statuses," so I used that as code to base off of. I've gotten to here (image 2 and 3) but the sprite is not showing. Anybody have any ideas on why?

#

I have a feeling this one's gonna need a lot of bumping lol

thorn furnace
sturdy compass
#

Can confirm oboe uses a patch, as I referenced it for a similar function myself. It is not a hard patch at all

thorn furnace
#

Oo

#

Time to figure out where the patch is in the cryptid source files

daring fern
sturdy compass
#

I can lessen that pain for ya. Here's what I patched

#

G.GAME.choose_mod is something I define in my Game.init_game_objects hook

thorn furnace
sturdy compass
#

either in a lovely.toml file in the root of your mod's directory or a folder titled 'lovely' that can have .toml files of any name you'd like

thorn furnace
#

okii

thorn furnace
sturdy compass
#

And this is the hook. Put this in your main lua file

thorn furnace
#

o
thank uuu

sturdy compass
#

no problem

thorn furnace
sturdy compass
thorn furnace
#

yeeeeee

sturdy compass
#

lol

stoic fulcrum
#

how does the "inactive/active" here get written in code for the description?

#

does it just work with #2#?

daring fern
stoic fulcrum
#

alr

sturdy compass
gaunt thistle
#

maybe a fellow Europe can help you

#

otherwise keep bumping

sturdy compass
#

Mayhaps, but even with Europe being ahead in time, this chat is always in low-activity mode at this time lol

#

Bumping is my friend once more

wintry solar
#

I am here to help

sturdy compass
#

Eremel jumpscare 🔥

wintry solar
#

SMODS.DrawStep {
    key = 'chisel',
    order = 35,
    func = function(self)
        if self.ability.chiselled then
            if not Ortalab.chisel_sprite then Ortalab.chisel_sprite = Sprite(0, 0, G.CARD_W, G.CARD_H, G.ASSET_ATLAS['ortalab_chisel'], {x=0, y=0}) end
            Ortalab.chisel_sprite.role.draw_major = self
            Ortalab.chisel_sprite:draw_shader('dissolve', nil, nil, nil, self.children.center)
            Ortalab.chisel_sprite:draw_shader('ortalab_mythos', nil, nil, nil, self.children.center)
        end
    end,
    conditions = { vortex = false, facing = 'front' },
}

This is my drawstep for something similar

#

It’s probably better to have a global sprite that you draw on the cards similar to seals, and have the enhancement sprite as just a plain card

sturdy compass
#

That was the plan so I’m glad that’ll work out

#

I’ll give it a whirl in the morning as I just shut everything down for the night and my bed is too comfortable right now. I appreciate the guidance tho

limber obsidian
#

can someone just straight up tell me how to make this destroy 2 cards when defeating a blind? its 3am and i wanna sleep

#

ignore the ```

#

just where to add it and stuff

#

and what code to add

#

i have been doing this for 10 god damn hours

#

only the 3rd joker i made

keen loom
limber obsidian
#

balala the looong way

keen loom
limber obsidian
#

OH THATS NEGATIVE WAIT

keen loom
#

it's ignoring the base mult

limber obsidian
#

uhhhhhh

#

o-o

daring heron
keen loom
daring heron
#

No thats how dividing should work

#

But if xmult is smaller than 1 it divides it

limber obsidian
#

yuh

#

that

daring heron
#

Try adding +1 to whatever it scores

keen loom
#

like... i've set it to give x1 mult + x0.5 for each common

#

but it's completely skipping the x1 mult

daring heron
#

Try x2 mult

#

Idunno if that works

limber obsidian
daring heron
#

Yeah it does

limber obsidian
#

yeah then just make it 2 so if it gets devided its halving itself

#

if you divide 1 you get a number below 1

keen loom
#

wait, xmult divides it???

daring heron
#

And that gives negative score

#

No

#

But see it like this

#

X1 mult does nothing

#

Lower than that it divides it

limber obsidian
daring heron
#

Thats why x2 is doubling and not x1

limber obsidian
#

THIS what my fellow screen for a face fellow said

daring heron
#

Real

limber obsidian
#

me when someone asks something and gets a solution but ignores it and continues saying the same issue

daring heron
#

iirc making it x1 mult + x1.5 should make it work

limber obsidian
thorn furnace
limber obsidian
daring heron
#

Not very good at lua myself lol, started like 1 or 2 months ago, and i’m not home rn

#

Sorry

keen loom
#

so what should i change to fix the dividing problem?

daring heron
#

Make it x1.2 for each common

limber obsidian
thorn furnace
daring heron
#

And x1.5 for each for gingerbrave

daring heron
thorn furnace
#

if you're multiplying the Xmults together then it's problematic but if you're adding them then it's fine

daring heron
#

May we see the code?

keen loom
#

i think?

thorn furnace
#

ah so you're multiplying them then

keen loom
#

so how do i make it so it adds these xmults rather than multiply it?

daring heron
#

Just change it to [xmult] + [xmult] instead of [xmult] x [xmult]

keen loom
daring fern
keen loom
native zinc
#

i mean this seems like a wording issue already i expected things to be added

daring fern
native zinc
#

multiplying by 0.2 is division by 5

thorn furnace
native zinc
#

you need to add all the values then return

wintry solar
daring heron
#

Wasnt it dissolve?

#

Or are they different

thorn furnace
# limber obsidian ?

well you wanted to destroy a card
so just set up a counter in context.destroy card and have it return "remove = true" for 2 cards

native zinc
#

please Read Documentation

limber obsidian
#

i code in python and c++ normally so im not used to lua

#

mainly c++

thorn furnace
limber obsidian
thorn furnace
#

what am i thinking of

wintry solar
#

But you’re just making random functions up that don’t exist, why would you do that?

thorn furnace
limber obsidian
daring heron
#

-# undertale reference :0

limber obsidian
#

-# nah

daring heron
#

-# yuhuh

thorn furnace
#

peak undertale ost song CoroboThinking

daring heron
#

So real

thorn furnace
#

Is there a way to find out what the last consumable used is and create another one

limber obsidian
thorn furnace
#

true

keen loom
thorn furnace
#

every time I look up a cool thing from cryptid it's just like "yeah so reference this one property that very clearly doesn't normally exist"

faint urchin
#

Why does this only remove half of my deck?

for i=1, #G.playing_cards do
   if G.playing_cards[i] and G.playing_cards[i] ~= context.full_hand[1] then
      G.playing_cards[i]:remove(self)
   end
end
keen loom
#

ok, i tried this, and it looks like it's still multiplying one by one rather than adding all mults

            if context.other_joker and (context.other_joker.config.center.rarity == "CRB_common") then
                if context.other_joker ~= card then
                    local brvcount = 0
                    local brgcount = 0
                    local normalcount = 0
                    if context.other_joker.label == "j_CRB_brave" then
                        brvcount = brvcount + 1
                    elseif context.other_joker.label == "j_CRB_bright" then
                        brgcount = brgcount + 1
                    else
                        normalcount = normalcount + 1
                    return {
                            xmult = (card.ability.extra.bonus * normalcount) + (card.ability.extra.bonus2 * brvcount) + (card.ability.extra.bonus3 * brgcount)
                        }
                    end
                end
            end
        end```
native zinc
#

make a local total_xmult variable

#

and return everything at the end

wintry solar
#

It depends what you want the effect to be, is it a baseball like effect, or just one bundle of Xmult all at once?

plain gazelle
#

Is it possible to make text small ({s:0.8}) AND colored?

native zinc
#

{C:mult,s:0.8}

plain gazelle
native zinc
# keen loom ok, i tried this, and it looks like it's still multiplying one by one rather tha...
if G.jokers and G.jokers.cards do
   for i = 1, #G.jokers.cards do
      if G.jokers.cards[i] ~= card then
         local total_xmult = 1.5
         if context.other_joker.label == "j_CRB_brave" then
            total_xmult = total_xmult + 0.5
         elseif context.other_joker.label == "j_CRB_bright" then
            total_xmult = total_xmult + 2
         elseif G.jokers.cards[i].config.center.rarity == "CRB_common" then
            total_xmult = total_xmult + 0.2
         end
      end
   end
end
return {
xmult = total_xmult
}
#

store the increases in extra

#

store the end total_xmult

#

as a loc var

#

oh yous hould also be doing G.jokers.cards[i] instead of other_joker

#

fixed

frigid blaze
#

Does anyone know how to make text animation like the misprint joker?

native zinc
native zinc
# keen loom this is happening
if G.jokers and G.jokers.cards do
   for i = 1, #G.jokers.cards do
      if G.jokers.cards[i] ~= card then
         local total_xmult = 1.5
         if G.jokers.cards[i].label == "j_CRB_brave" then
            total_xmult = total_xmult + 0.5
         elseif G.jokers.cards[i].label == "j_CRB_bright" then
            total_xmult = total_xmult + 2
         elseif G.jokers.cards[i].config.center.rarity == "CRB_common" then
            total_xmult = total_xmult + 0.2
         end
      end
   end
end
return {
   xmult = total_xmult
}
keen loom
#

also, the logger says this

keen loom
# daring fern Code?
        -- x1.5 mult
        if context.joker_main then
            return {
                xmult = card.ability.extra.xmult
            }
        end
        -- x0.2 mult for each common cookie, x0.5 for each GingerBrave and x2 for each GingerBright
        if G.jokers and G.jokers.cards then
            for i = 1, #G.jokers.cards do
                if G.jokers.cards[i] ~= card then
                    local total_xmult = 1.5
                    if G.jokers.cards[i].label == "j_CRB_brave" then
                        total_xmult = total_xmult + 0.5
                    elseif G.jokers.cards[i].label == "j_CRB_bright" then
                        total_xmult = total_xmult + 2
                    elseif G.jokers.cards[i].config.center.rarity == "CRB_common" then
                        total_xmult = total_xmult + 0.2
                    end
                end
            end
        end
    return {
        xmult = total_xmult
    }
end
}```
daring fern
keen loom
daring fern
keen loom
native zinc
#

put the local_xmult above the context.other.joker

#

also

#

what

#

no don't use context_other joker

#

just use joker_main

keen loom
plain gazelle
#

my Joker effect is that it gains XMult when a randomly picked card from the deck is destroyed (like Idol + Canio). I want to make it so the randomly picked card changes when previous card is destroyed, so I made a counter of how many times the Joker scaled (stored in config). Problem is - I can't use the counter in the pseudorandom function that picks the card

wintry solar
thorn furnace
#

How would I get a Joker to copy a Joker that the player doesn't currently have

bold sleet
#

My naive approach would be to iterate through the player's jokers and all existing jokers, and if no match is found for each entry, add it to a new list. Then you have a list of all jokers the player does not have in a given run.

thorn furnace
bold sleet
#

oh uh... no idea how to make functions passively do shit every frame.

thorn furnace
#

actually I'll try something

plain apex
#

you can check if played cards don't score but is there a way for a joker to check if other jokers don't trigger

wintry solar
plain gazelle
#

thanks

crisp coral
#

card.ability.flagname if you want it to save

thorn furnace
thorn furnace
#

the joker was sold and ceased to exist
and yet it could be copied

daring fern
harsh sonnet
#

I'm back from depression and have decided to continue on modding
yet I fail to understand the issue my code has
so if there's any1 with a bunch of time and decent knowledge here willing to spend some time to help me with various problems pls contact me in any way
it's like 80 lines of code to read (and understand)

daring fern
bold sleet
#

I don't know how helpfull I can be, but it is worth the shot, right?

thorn furnace
harsh sonnet
#

would u like to switch to dms or create a thread here? would prolly be annoying for others to be drowned in my issues

bold sleet
#

DMs

spice wadi
#

From what I recall, context.main_eval literally just means not context.individual and not context.repetition, that's all

daring fern
thorn furnace
#
SMODS.Joker {
    key = 'stand_whitesnake',
    config = {extra = {lastJoker = nil}},
    rarity = 1,
    cost = 4,
    loc_vars = function(self, info_queue, card)
        return {vars = {card.ability.extra.lastJoker}}
    end,
    
    calculate = function(self, card, context)
        if context.selling_card and context.card.ability.set == "Joker" then
            card.ability.extra.lastJoker = context.card
            return { message = localize('k_upgrade_ex') }
        end
        return SMODS.blueprint_effect(card, card.ability.extra.lastJoker, context)
    end
}
daring fern
thorn furnace
#

I mean

#

I did tho

#

like it fully works

daring fern
#

It wont work anymore.

thorn furnace
#

hm

#

I can probably find a workaround

#

how do you instantiate a joker

#

like what does the constructor of a joker look like
The datatype

daring fern
thorn furnace
#

wdym

#

I mean how the joker is supposed to work is exactly how it does work in the recording

#

But if it crashes on reload then the next idea would be to just instantiate the type of Joker that got copied

#

and then copy the ability of that

daring fern
thorn furnace
#

I'm not exactly sure what fake or real means here

#

this wouldn't be something you'd be able to see happening as a player, it would be behind closed doors

daring fern
thorn furnace
#

It would be of the card datatype I guess

#

Okay so to describe what I'm thinking of in more detail

#

reloading the game causes issues
So the solution is to, instead of storing the sold Joker itself, store the key of the Joker
And then whenever you want to copy its ability, you just instantiate a new member of the Card class with that key and then copy whatever ability that has
and then you delete that now that you don't need it anymore

#

The player sees none of this; it's visually identical to just storing the Joker except it doesn't crash because it's not a memory reference

daring fern
thorn furnace
#

what would a fake joker mean in this context

#

tho I don't think it's too bad
It's just storing a Joker's data because storing the Joker itself is kinda messy

#

I feel like making an entirely different secret card area would be more complicated

#

eh I'll focus on it later i guess

minor magnet
#

is there a way to modify rarity text on a joker without modifying the rarity itself?

daring fern
hushed field
rapid stag
#

bump.

and does anyone know how to use the deckskin crediting from the steamodded PR merge?

minor magnet
north swallow
#

how can i make it so if it fails the 50/50 this joker dissolves and spawns another joker?

daring fern
north swallow
#

so i do
calculate = function(self, center, context) if context.individual and context.cardarea == G.play and if pseudorandom('xmpl_gambler') < G.GAME.probabilities.normal / center.ability.extra.odds then return { Xmult = center.ability.extra.Xmult } else card:start_dissolve({G.C.RED}) end end end

#

?

daring fern
# north swallow ?
calculate = function(self, center, context)
    if context.individual and context.cardarea == G.play then
        if pseudorandom('xmpl_gambler') < G.GAME.probabilities.normal / center.ability.extra.odds then
            return {
                Xmult = center.ability.extra.Xmult
            }
        else
            card:start_dissolve({ G.C.RED })
        end
    end
end
north swallow
#

thanks!

keen loom
#

how would i insert the description of joker from the localization file?

#

the guide mentions "or localization entry", but i have no idea how it looks like

north swallow
daring fern
north swallow
#

what context check?

bold sleet
north swallow
#

oh wait i noticed

#

nvm

bold sleet
#

and second, you need a folder and file like this.

keen loom
keen loom
#

so do i still have to define loc_txt?

bold sleet
#
return {
  descriptions = {
    joker = {
      prefix_key = {
        name = "",
        text = {}
      },
      otr_joker= {
        -- and so on
      }
    }
  }
}
#

Something like that.

#

Not 100% certain if I nailed it.

#

But that should give you an idea.

bold sleet
keen loom
bold sleet
#

Insert what?

#

SMODS should automatically load your entry

keen loom
bold sleet
#

Try removing the localization entry inside your joker

soft echo
#

i'm getting this error when trying to use an edition i made using the example script from the smods github

bold sleet
#

remove loc_txt from inside your joker

faint yacht
daring fern
soft echo
#

okay now when i play the cards with the enhancement nothing seems to happen?

bold sleet
#
calculate = function (self, card, context) end
#

you need that.

soft echo
#

oh

keen loom
cursive sentinel
#

hi, quick question, i have this to set hands at 1 at the start of the blind (put 2 events so it takes into account burglar), although it seems to put hands into negative if i hvae two samples of this joker (the print returns same value twice), any idea how i could keep it's interactivity with burglar w/o making having 2 auto-countering?

if context.setting_blind and not context.blueprint then
            G.E_MANAGER:add_event(Event({
                trigger = 'after',
                delay = 0.1,
                func = function()
                    G.E_MANAGER:add_event(Event({
                        trigger = 'after',
                        delay = 0.1,
                        func = function()
                            if G.GAME.current_round.hands_left > 1 then
                                print(G.GAME.current_round.hands_left)
                                local lost = G.GAME.current_round.hands_left - 1
                                ease_hands_played(-lost)
                                card.ability.extra.xmult = card.ability.extra.xmult + (card.ability.extra.xmultmod * lost)
                                card_eval_status_text(card, 'extra', nil, nil, nil, { message = 'Ungeziefer!' })
                            end
                            return true
                        end
                    }))
                    return true
                end
            }))
        end
daring fern
cursive sentinel
#

although making it only the first one, would make it that if i have my joker, burglar, and my joker, the 2nd wouldn't do anything despite having more than 1 hand

#

like,

#

if i have burglar it does : 4 > 7 hands

cursive sentinel
#

isn't there just a way for my if to actually work?

keen loom
daring fern
keen loom
daring fern
pale holly
#

Hi hi, i'm trying to make a tarot card for my custom enhancement, but the card would crash when i use it, the error says the center is a nil value, apparently i'm not if it exactly means the CENTERS down in my code, can someone help me on this please ?

key = 'topenta',
set = "Tarot",
effect = "Enhance",
atlas = 'topenta',
pos = { x = 0, y = 0 },
cost = 3,
sell_cost = 2,

config = {
        -- How many cards can be selected.
        max_highlighted = 2,
        mod_conv = 'pseudoregamod_sol',
},

    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue+1] = G.P_CENTERS[(card.ability or self.config).extra]
        return {vars = {(card.ability or self.config).max_highlighted}}
    end,
    loc_txt = {
        name = 'Two of Pentacles',
        text = {
    "Select up to 2 cards to", 
    "turn them into {C:attention}Sol Cards{}"
        },
    },
}```
daring fern
keen loom
daring fern
pale holly
daring fern
pale holly
#

Alright thanks !

soft echo
#

is there a way to have my edition be apart of the aura spectral?

#

same thing for wheel

soft echo
#

how would one do this?

daring fern
cursive sentinel
#

in burglar, what nil and true are args of? ease_discard(-G.GAME.current_round.discards_left, nil, true)

cursive sentinel
#

thx

quartz ravine
stiff quiver
#

hi, i wanted to make a joker upgrade itself when a card is destroyed and made this code but im getting a crash, whats wrong with the code? calculate = function(self,card,context) if context.remove_playing_cards then for playing_card in context.removed do card.ability.extra.Xmult_bonus = card.ability.extra.Xmult_bonus + 1 end end end,
its crashing in the line with the for

faint yacht
#

for i = 1, #context.removed do

pale holly
#

I think i still messed up somewhere, it now shows the extra block but says error, my enhancment doesn't have the pool for my mod since otherwise it wouldn't somewhat show during debug (i simply disabled the code), but regardless of it is on or not i still get that local 'center' [a nil value] error when i try to use my tarot card, not sure what to do

i removed the card.ability extra and the self.config.extra as well, only the max_highlighted is left sooo

actually is G.P_CENTERS even working or should i have to replace it ?

key = 'topenta',
set = "Tarot",
effect = "Enhance",
atlas = 'topenta',
pos = { x = 0, y = 0 },
cost = 3,
sell_cost = 2,

config = {
        -- How many cards can be selected.
        max_highlighted = 2,
        mod_conv = 'pseudoregamod_sol',
},

    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue+1] = G.P_CENTERS
        return {vars = {max_highlighted}}
    end,
    loc_txt = {
        name = 'Two of Pentacles',
        text = {
    "Select up to 2 cards to", 
    "turn them into {C:attention}Sol Cards{}"
        },
    },
}```
stiff quiver
daring fern
soft echo
#

okay last question but is there a way for a joker to be able to tell what enhancement a card has?

pale holly
red flower
soft echo
#

thank you

cursive sentinel
#

why does two ease_discard(-(G.GAME.current_round.discards_left) in events of two jokers dont get them under 0, but ease_hands_played(-G.GAME.current_round.hands_left) does?

red flower
red flower
#

yes

manic rune
#

has_enhancement*

red flower
#

hi :3

manic rune
#

hi !

#

im back from vacac now

#

so im gonna be spending time here again :p

red flower
#

yay

#

did u see the joyousspring video

manic rune
#

a

#

which one

red flower
#

that one

manic rune
#

oh what the hell mbt???

#

thats so sick holy

red flower
#

yeah!!

flat vine
#

Eyyo, I'm just starting to learn how to mod, so in the API Docs it says that if I want a Joker to be locked by default I do unlocked = false right? 🤔
But then what function do I make to set it to true?
I've looked at a lot of Mods and they either don't have Jokers locked by default or they use a very convoluted mess that I have failed to follow...

cursive sentinel
manic rune
# red flower yeah!!

i watch mbt like everyday even though i dont play ygo anymore, so its a very pleasant surprise that he made a vid on your mod lol

#

-# i didnt even know he plays balatro too

cursive sentinel
#

with this if math.abs(math.max(G.GAME.current_round.hands_left, mod)) == 0 then return end ?

red flower
#

probably? you can also just do what the function does manually probably

cursive sentinel
#

ahhhhh

#

yes you're right

#

thank you sorry

gusty compass
#

could anyone help make this a bit clear, i don't get why what im trying to do here does not work, i happened to test this without the return function and set the holders of the sticker to give mult as a test, somehow the return statement does not want to do as told, sorry if this looks like a repetitive issue, im new to modding.

cursive sentinel
# red flower probably? you can also just do what the function does manually probably

got it like this, doesn't do anything

if context.setting_blind and not context.blueprint then
            local lost = G.GAME.current_round.hands_left - 1
            card.ability.extra.xmult = card.ability.extra.xmult + (card.ability.extra.xmultmod * lost)
            if math.abs(math.max(G.GAME.current_round.hands_left, lost)) == 0 then return end
            G.E_MANAGER:add_event(Event({
                func = function()
                    G.E_MANAGER:add_event(Event({
                        func = function()
                            ease_hands_played(-lost)
                            card_eval_status_text(card, 'extra', nil, nil, nil, { message = 'Ungeziefer!' })
                            return true
                        end
                    }))
                    return true
                end
            }))
        end
red flower
#

if you want to cap it at 1

cursive sentinel
#

trying this

#

still pushes under 0 when i have multiple

#

it doenst accurately detects G.GAME.current_round.hands_left in the event

red flower
#

makes sense

cursive sentinel
#

so a patch i guess

red flower
#

does that function have an immediate field

cursive sentinel
#

(mod, instant)

#

tried to set nil, true

#

but didn't seemed to change

#

i could try with your settings

red flower
#

ease_hands_played(G.GAME.current_round.hands_left <= 1 and 0 or -lost, true)

cursive sentinel
#

ah

#

im dumb

#

i had put nil

#

bcs of ease_discards, so ofc true wouldnt be seen

pale holly
#

A question to be sure, enhancments doesn't need the pools line or does it to for the tarot cards ?

bold gyro
#

hey y'all, i'm stumped on a simple problem. what would i put in place of the comment to force the current played poker hand into being a new poker hand (called "_hand")? This is a lovely patch for changing the function evaluate_poker_hand

if next(SMODS.find_card("j_picubed_mountjoker")) then
    local _hand, _tally = nil, -1
    for _, v in ipairs(G.handlist) do
        if G.GAME.hands[v].visible and G.GAME.hands[v].played > _tally then
            _hand = v
            _tally = G.GAME.hands[v].played
        end
    end
    print((_hand or "hi").." AAAAAAAA")
    --poker hand is now _hand (what do i put here?)
end
red flower
#

so it changes the hand to be considered the most played hand?

pale holly
#

well i'm really not sure what doesn't work, using pools on my ehancement card will somewhat break and make it impossible to get trough debug mod unlike the other enhancement, so i don't even know if my key for the SMODS.ObjectType being pseudoregamod, i tried to use "sol", "c_sol"
"c_pseudoregamod_sol" for the G.P_CENTERS part but it doesn't show any bubble, and the card still give me a error that says that local 'center' [a nil value]

i'm not sure if it's an error that is from my tarot card or just my enhancement because that last one works well on its own

key = 'topenta',
set = "Tarot",
effect = "Enhance",
atlas = 'topenta',
pos = { x = 0, y = 0 },
cost = 3,
sell_cost = 2,

config = {
        -- How many cards can be selected.
        max_highlighted = 2,
        mod_conv = 'pseudoregamod_sol',
},

    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue+1] = G.P_CENTERS["c_pseudoregamod_sol".. card.ability.mod_conv]
        return {vars = {max_highlighted}}
    end,
    loc_txt = {
        name = 'Two of Pentacles',
        text = {
    "Select up to 2 cards to", 
    "turn them into {C:attention}Sol Cards{}"
        },
    },
}```
red flower
pale holly
# red flower what are you trying to do? pick a random enhancement from a pool?

no, i actually want the card to use the modded enhancement i made, the last one work well by itself but i struggle making the tarot card from it

here's the code my enhancement, i disabled the pool since otherwise i couldn't change the card's enhacements

key = 'sol',
    loc_txt = {
    name = "Sol Card",
    text =  {"{C:blue} +20{} chips",
    "Has no rank",
    "Is considered as any suit"
},},

    atlas = 'sol',
    pos = { x = 0, y = 0 },
    --pools = {["pseudoregamod"] = true},

--unlocked = true,
--discovered = true,

config = {
bonus = 20,
},
    replace_base_card = true,
    no_rank = true,
    no_suit = false,
    any_suit = true,
    always_scores = false,
}
bold gyro
red flower
#

there might be more conditions but im asking if it can be hands from vanilla or other mods

bold gyro
#

both. is there a difference for doing vanilla or modded hands?

red flower
#

nah im just asking if they are not from your mod

#

you probably want to hook G.FUNCS.get_poker_hand_info instead

pale holly
red flower
#

it's whatever you put as your mod's prefix

pale holly
#

Ah i see now, i don't think i did set a prefix before, and i do suppose the SMODS.ObjectType's key doesn't count as a prefix

red flower
#

no, yeah do you have a .json or do you use the header?

pale holly
#

i suppose you mean this one ?

#

oh wait

red flower
#

yeah

pale holly
#

ah alright, so i should activate the prefix simply my removing the --- or something ?

red flower
#

no, just use m_pm_sol

solid mesa
pale holly
#

okay thanks, hopefully it'll work this time

pale holly
solid mesa
pale holly
#

?

pale holly
#

wait

#

i think i see what's wrong

outer basalt
#

any idea on what could possibly be causing this?

red flower
dusty vector
#

I got this funky ass error when I tried booting up pokermon. I think my folder is set up correctly and all the other modding stuff should be fine, so I'm quite stumped

pale holly
#

my mod.json does have a prefix set already with "prefix": "Foolish Dreams" , i used that instead of pm since otherwise under my modded cards it would simply show 'pm', so i should just rename my prefix then ?

bold sleet
#

I think prefix is not meant to have spaces and shit.

red flower
#

the prefix doesnt show up in-game

#

thats display name

bold sleet
#

I think the prefix just helps SMODS to not getting confused when loading mods and stuff.

gaunt thistle
pale holly
#

let's hope it works now

red flower
#

i would also remove the smods header just in case

pale holly
#

not useful i suppose?

dusty vector
pale holly
dusty vector
#

Could be tripping tho

spice wadi