#💻・modding-dev
1 messages · Page 652 of 1
That pathing looks correct, what are the contents of the toml?
Extra 'end' is for checking if patching works
I also tried to set pattern to 'return t'
thats really cool but how do you figure out the code
I didn't program this the other guy I'm working with did
He's more smart when it comes to how twitch chat and this works
He's like an actual programmer who's made legitimate software
I'm focusing on more simple stuff
Its supposed to prevent showing amount of ranks that are 0 when you open deck view
is it possible to context.mod_probability during context.before? (Or rather, I need to know the scoring hand, and it should happen when scoring that hand, because it resets afterwards)
```swift
SMODS.Blind {
key = 'wallkerip',
atlas = 'clackerblindplaceholder',
unlocked = true,
discovered = true,
pos = {x = 0, y = 20},
dollars = 5,
mult = 2,
boss = {min = 3},
boss_colour = HEX("543770"),
calculate = function(self, blind, context)
if not blind.disabled then
if context.debuff_hand then
local suits = {}
for k, scored_card in pairs(context.full_hand) do
for _, scored_suit in ipairs(SMODS.Suits) do
print(scored_suit)
if scored_card:is_suit(scored_suit) then
suits[scored_suit] = true
end
end
end
return {debuff = (#suits >= 3)}
end
end
end,
}
Anyone have any clue why this is not working?
It's mainly the suits loop that isn't working
Well, it looks like scored_suit isn't defined
doesn't debuff the hand
hehe, all g
No, you would have to hook G.FUNCS.evaluate_play and put the scoring hand in a global but not in G.GAME
zamn, okay
a lot more work than i wanted to do LOL
# only works on number indexed tables.
Oh, my problem is that nothing returns on the print function
but thanks tho
Wait, not in G.GAME? Why not?
Because you can't put cards in G.GAME
Well, I could check for the card im looking for and just mark a variable true then
(Which was my plan before i read i shouldnt put it in g.game)
Can you modify the display size of a card through enhancements?
iirc pixel_size and display_size also can be used in definitions of an enhancement.
```swift
SMODS.Atlas({
key = "gloom",
path = "gloom.png",
px = 71,
py = 102
})
SMODS.Enhancement {
key = 'gloom',
atlas = 'gloom',
replace_base_card = true,
no_rank = true,
no_suit = true,
display_size = {w = 71, h = 102},
pixel_size = {w = 71, h = 102},
in_pool = function(self, args)
return false
end,
}
This was the code I had 🙃
```lua
SMODS.Atlas{key = "TOGAJokersMainW", path = "togajokersw.png", px = 91, py = 95}
...
display_size = { w = 71 * 1.27, h = 95 },
pixel_size = { w = 71, h = 95 }
Here's unique stuff pertaining to this *Joker* being wide... however, for enhancements, I'm not sure if the 71x95 is *enforced* or not.
Is there any way I can increase the number of all repetitions? i.e. hanging chad retriggers 3 times instead of 2, mime retriggers everything twice, etc.
I'm using context.repetition but i don't know if you can check within that context how many repetitions are actually happening
Hook eval_card
alright, thanks!
```lua
local oldevalcard = eval_card
function eval_card(card, context)
if not card then return end
local g, post = oldevalcard(card, context)
if not card:can_calculate(context.ignore_debuff, context.remove_playing_cards or context.joker_type_destroyed) then return g, post end
for k, v in pairs(g) do
if type(v) == 'table' and v.repetitions and type(v.repetitions) == 'number' then
v.repetitions = v.repetitions + 1
end
end
return g, post
end
oh shit
thanks!
Question about post_trigger, does checking for the ret of jokers not with for a blind? Or am I missing something?
```
calculate = function(self, blind, context)
if context.post_trigger then
local other_ret = context.other_ret.jokers or {}
if other_ret.mult or other_ret.h_mult or other_ret.mult_mod or
other_ret.x_mult or other_ret.xmult or other_ret.Xmult_mod then
G.GAME.blind.chips = math.floor(G.GAME.blind.chips - G.GAME.blind.chips * 2)
G.GAME.blind.chip_text = number_format(G.GAME.blind.chips)
end
end
end
Do you have the post_trigger optional feature enabled?
I do
How do I shuffle cards in hand to deck?
G.FUNCS.draw_from_hand_to_deck()
It shuffles the whole hand, where is it defined?
have you tried printing other_ret to see how it's structured?
functions/state_events.lua
this is what prints out... which should be working with what I have. I am checking other_ret.mult_mod
you're adding a .jokers for no reason then, right?
oh wait nvm I am bad at reading today
it will be some jank with timings then I think
i'm testing without the check, and the effect is working fine, so some timing issue must be at play
Does anyone know how to fix button positions? I've hooked G.UIDEF.use_and_sell_buttons to give sell and use buttons to my new type of card, copying the use and sell buttons for consumables, but they aren't aligned properly at all
Check the code of vanilla remade
Might help
I'm pretty sure vremade doesn't deal with custom UI
Simply because it doesn't need to
Sucks
Oh yeah i see
Although the vremade wiki MIGHT have something on UI
Smods have too
SMODS UI documentation won't explain how to do that though
Creates an align_buttons cardarea config option that allows default card button alignment behavior on areas with this option enabled. This will prevent destructive patches or janky hooks that were ...
that's not merged yet right?
no you would need to copy it
It’s honestly not a super copyable method if you wanna keep compat
it is either that or me having to write the solution and i just woke up and i dont wanna :3
based
Lmfao fair
Is there some easy way to add new type of cards here?
Is your card type a consumable?
no
i would look into cardsleeves' code
i know it's done automatically for consumables
k
they have a part for sleeves i assume
yes, in other
how would i check if all played cards are a specific rank
ui code my behated
```lua
local rank = 2
local is_same = true
for _,card in ipairs(G.play.cards) do
if rank ~= card.config.card.value then
is_same = false
end
end
Or some variation of that code. Fit it for your specific needs.
G.play.cards
-# forgor it was a cardarea i am dumb
```lua
local passed = true
for k, v in pairs(context.full_hand) do
if v:get_id() ~= id then
passed = false
end
end
if passed then
end
im not gonna lie
i have no idea how to implement this lol
i understand what each part of the code does i just dont know where to put it
WAIT IT WORKS
THANKS GUYS
does anyone know what ms, mr, mx, my are?
ms is the scale offset, mr is the rotation offset, mx is the x offset and my is the y offset.
The offsets don't draw correctly though.
yea, thats what i was noticing
it seems like, they start getting "desynced" or off
from whatever center they are on
depending on where it is
eg a sticker on a card making use of ms and mx and my, it seems to vary in position relative to the card depending on where the card is on the screen
heres an example
btw to even get scale offset to play nice i hooked prepdraw
i might as well give it a shot before i throw in the towel (im willing to accept a small offset for now)
ty!!!
yea, it didnt help this issue specifically
thats fine though, its not a huge issue for me
gains 1x mult for every gros michel destroyed (totally not impossible to proc)
"destroys a held banana joker for x buff" or soemthing perhaps?
cause its a monkey and it eats the bananas to get stronger (but you might have to add more bananas cause there are only 2 in vanilla)
I've made a joker that changes the suit of a card in the deck and made a simple animation using events where that card is drawn, shown, and then returned to the deck
the problem is: if I change the card's suit in the events it wont have changed by the time other jokers, but if I change it outside the events I cant show it transforming in the animation.
Is there some way to delay the visual suit change but still immediately change the suit before other jokers contexts run?
Every time Cavendish/Gros Triggered +5 mult (Maybe more for cav) lose all mult if banana sold/Breaks
change base has an argument to set the sprites manually after
so I'd call it twice, first changing suit and then in events changing sprite?
in the event you need to just change the sprite
iirc card:set_sprites(nil, card.config.card) i think
yup that works, thanks
This is actually wrong, it's literally a completely different random_seed function in luajit that takes a double instead of an int. Kinda sucks that there's no actual lua standard. https://github.com/LuaJIT/LuaJIT/blob/e17ee83326f73d2bbfce5750ae8dc592a3b63c27/src/lib_math.c#L114
multiply by pi and add e. yup. that's definitely A Thing that this function does.
Hey guys, does anyone here know where to look for drawing custom stuff on a card? Aka stuff beyond the static image from the atlas. Can't find much, I dont think SMODS.DrawStep is what I need..? And no idea how to use Joker.draw or rather what methods I have to use within said function.
wdym custom stuff
To be more specific I want to draw and update lines and text on the card
it would be a drawstep but if youre doing text i would wait a bit because theres a feature coming up that makes drawing text on cards less janky
i would look into The Soul in VanillaRemade for an example of drawsteps
Its not much text, I might just get away with drawing sprites for now, but thats good to know!
Alright, thank you guys! I'll look at that then.
<@&1133519078540185692> kill
ok
yay
that same scam just appeared earlier accept it was elon musk instead of mrbeast
How, in G.GAME.<???> or similar, do I determine what deck the player is currently playing with?
Is there away to spawn a joker face down
Or do you need to flip it after it spawns
Cause I wanna do something where all your jokers get destroyed and replaced with new jokers
But have them spawn face down and then revealed
FSR all "Actives" that spawn are the default one, any idea why?
maybe it has to do with the injection function? im using the default one from SMODS.Center
how do i get when a card is clicked on
Hook Card:click
ty
It should be target = '=[lovely debugplus.core "debugplus/core.lua"]'
oh
meta mod brewing is typing
yea debugplus is different because it works without smods
🤫
if I had something worded "card drawn this round" would it be confusing if those cards being drawn in booster packs counting?
shop + booster packs feels like they exist outside of "this round" entirely, so yea imo
hmm alright
I have been making good progress in understanding drawsteps so far. Currently I am trying to create a sprite to render that instead, however, it doesn't like my atlas (normal atlas like 'stickers' work though)
It is throwing an called with invalid atlas key, aka SMODS.get_atlas(atlas_key) is throwing nil and I dont know why >.>
found it, my in_pool functions were f'd up
It should be modprefix_atlaskey
oooh, that makes sense. Yeah now its working, I feel silly now ^^'
Thank you!
How do i make a joker recognise another when a specific joker is held in hand
for example if i had a joker which gives +4 Mult if Gros Michel is held in hand or whatever
held in hand?
like owned in joker slots or specifically in your actual playing card hand
what's the differnce between context.scoring_hand and G.play.cards
are they equivalent and does one have an advantage over the other
or is one just a more direct label for it
scoring_hand only includes cards that are actually scored in the hand (so if you play a high card with 3 other nonscoring cards, context.scoring_hand is just the high card)
Meta...
context.full_hand is basically the same as G.play.cards
ah ok
lily...
smiles
yuri
Huh
incorrect
aw
unfortunately i am being pet in my pfp by the real victim of yuri
as per my discord status, i am indeed involved in yuri, just not with lily
friend 🙂↕️
anyway assumikng you mean another joker is owned just check for it like this if next(SMODS.find_card("joker_key_here")) then
ye s
my old code just loop through g.joker.cards lmao
how can I make a joker rental?
card:set_rental(true)
merci
bumping this since it hasn't being solved yet
but this soft lock basically doesn't allow to select any cards, while the consumable is still in the middle
probably trying to use it but still falling
What's the context/etc. I should be checking if I wanted to get a playing card's retrigger from its (custom) enhancement
as in, a card's enhancement causes it to retrigger, and a joker reacts to that
there's no context for it afaik, idk personally what you need to hook to get that
it would also be hard to pinpoint the source of the retrigger since i dont think thats passed in
alright, that's fair
is there a way to make a ui popup appear on top of everything else
there is some hover ui to the right of the upgrade blind button here, but it doesnt show because its under the big blind selection
how do i make a joker NOT target a copy of itself
like if there was a version of madness that killed any joker except a copy of itself
well it depends on how you are getting the target
hmm
the code looks smth like thsi rn
``` calculate = function(self, card, context)
if context.before and SMODS.pseudorandom_probability(card, 'hatch_rottenbanana', 1, card.ability.extra.odds) then
G.E_MANAGER:add_event(Event({ --Infection
func = function()
SMODS.add_card {
key = 'j_hatch_rottenbanana',
}
G.GAME.consumeable_buffer = 0
return true
end
}))
--Slicing
local destructable_jokers = {}
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] ~= card and not SMODS.is_eternal(G.jokers.cards[i], card) and not G.jokers.cards[i].getting_sliced then
destructable_jokers[#destructable_jokers + 1] =
G.jokers.cards[i]
end
end
local joker_to_destroy = pseudorandom_element(destructable_jokers, 'hatch_rottenbanana')
if joker_to_destroy then
joker_to_destroy.getting_sliced = true
G.E_MANAGER:add_event(Event({
func = function()
(context.blueprint_card or card):juice_up(0.8, 0.8)
joker_to_destroy:start_dissolve({ G.C.RED }, nil, 1.6)
return true
end
}))
end
return { -- Infection Message
message = "Infected!",
colour = G.C.PURPLE,
delay = 0.4
}
end
rn it targets any joker, including a copy of itself, which is No Good
add and G.jokers.cards[i].config.center.key ~= 'j_hatch_rottenbanana' to the check for adding a joker to destructable_jokers
also you're resetting the consumable buffer instead of the joker buffer after SMODS.add_card, incase that's an error
oke
o
how do i fix that
nvm
dnaks
the code is being kinda jank
it should destroy another joker (without destroying a copy of itself) and then duplicate itself
ill test it more tomorrow im just super confussled
So how do you actually make a new stake do something? It only has a modifiers function which doesn't take context
Like if I wanna make a new sticker for shop jokers, where would I put the code to actually apply it?
Oh the sticker object has functionality for this
Interessante
calculate contexts for stakes i mean
oh awesome :3
Alright, very fun little thing I encountered. Activating a boss tag while in the shop will set you back to the previous blind, with the exception of shops after a boss blind. I know you're never meant to be able to get a boss tag while in the shop, but it's possible with mods, and kinda messed mine up.
BILL CIPHER?!
Indeed
WHAT IN THE FUCK ARE YOU DOING HERE?!
what do i doooo 😭
yeah i found this recently too
whats the issue again
ok so, "rotten banana" is supposed to...
- destroy a random joker
- and create a copy of itself
it basically spreads like a virus
so it converts a pre-existing joker into a copy of itself
and whats the problem right now?
it doesnt really do that... for starters:
- the infected message pops up a little too quickly
- and it shows up on the main joker, not the new joker
- it also infects itself, for some reason 😭
Is there anything to be done about it? Or do I just accept it for now?
Maybe you could run card:set_ability("j_hatch_rottenbanana") on the selected joker to transform it into a banana instead?
i didnt investigate it honestly
for your mod you can use context.prevent_tag_trigger to stop them from triggering in the shop
as like a kinda patch
tho i don't think they'll trigger once you leave the shop, so you'll need to make them trigger then yourself
for the first problem it's probably due to the order of events, you would also need to specify the message_card for it to go on another card
also i dont see how it could target itself
I'm guessing I just need to toggle that on and off? Because if so, I could toggle on when entering a blind and off when leaving the shop, no?
Eh, I'll play around with it.
is there a database or guide with the joker names internally for making custom decks and stuff?
is the functionality available in the latest release or not yet?
also i just tried this and it doesnt do anything 😭
anyways the previous code does work, the only real issue is that it infects + creates a copy of itself
Making a quick Dark Souls deck mod
anyways i fixed it
how did ya do it?
You need to actually swap out card
Otherwise its just transforming into itself
nvm i think i broke it
nice!
Hey modding dev folk
I've been making a mod that requires making an overlay over the entire screen, while using an animation spritesheet
I was browsing the smods documentation for an object that used animation-atlas as an "animated sprite", but I couldn't find anything for it
Is there a function that lets you blit a SMODS.Atlas-type object in that way?
I could've been less coy about it in this message, I'm trying to do the 1 in 10,000 Withered Foxy Jumpscare
Just to make sure, you are aware of https://discord.com/channels/1116389027176787968/1402599821902348319 ?
lolll
:,D
I'm new to this modding stuff but why do we not have a google-searchable way to find mods?
closest is probably this, but not everyone puts their stuff on the wiki
balatro modding doesn't use any mod launcher apps or whatever, so everyone tends to upload their mods directly to github (or similar services like codeberg)
The Balatro Mod Manager in the corner:
is there a good place to find folks i can commission to make art for my mod?
Why do people dislike it anyway?
it tends to cause more problems than it solves
it's not hard to download mods from github -> unzip into mods folder, and balatro mod manager has had a history of introducing its own problems (failing to update smods correctly, that compatibility checker feature it added that isn't particularly helpful because smods already does that + it caused insane lag for a little bit, etc)
Maybe I was lazy in the searching process, but it feels like github repos are the last thing to appear in Google's SEO
true...
where is
github#
i have nothing against anyone who uses it tbh, it's just evil and evil and villainous and needs to be cast into hell and die and explode /lh
idk
I think it's fair to cut it some slack since it's not 1.0 yet
I've had problems with it some time ago, but as of 0.4.0 it's not giving me any issues
i will never cut slack to anything that doesnt communicate with the community effectively
Oh are the devs not here?
they havent replied to me at least
Huh
it also treats itself as if it is 1.0 (complete website that makes no mention of its current version)
and i think ermel dm'd them too with no answer
i actually have gotten a response from a dev when i put in an issue on the github about the compatibility module causing lag, but that's certainly not an ideal method for general communication
Interesting...
if you ever see me hating a mod it's usually for similar reasons
(cryptid, mp, utdr, pwx)
the state of my browser after a day of modding
how can i modify starting deck size? such as starting with 26 cards instead of 52? This destroys some but A, is very janky and doesnt do it right
im trying to make it start with like 7 cards instead of 52
my custom booster packs say error at the bottom, not sure how to fix it? (i am using joker forge)
You need to assign a group key to the booster pack
Jokerforge doesn't use a localisation file, so you'll have to make do with creating a group key yourself
so like, if the pack is called voucher pack. the group key should be voucher_pack?
this is from the boosters lua file in the mod
again, how can i make deck size change? Yes, I know its that card name but i want it to be 7 cards
if you have group name then you need to remove the key. the key is for the localization file
you would need to destroy the cards like you did before im pretty sure
ah
i dont have access to it rn but i would check how the vanilla decks do it in deck.lua (i think we never added the code to vremade)
back.lua
almost, but it stops at 26
have an analogy
well not an analogy but whatever
on entry 1 it sees it has 52 cards so it removes 1 and goes to the next entry
but now the next entry is what used to be #3
its skipping basically
i have relapsed and not sure if this is new where there is no button
your mod localization is wrong
thanks
this cuts it down to 26. not sure why it breaks but i need it to go down to seven, but this doesnt obviously. If anyone knows how to fix this please guide me I am SO lost
you need to loop through the cards backwards afaik
so instead of ipairs you would do #G.playing_cards, 1, -1
or 7 as the second one
for i=#G.playing_cards, 7, -1 do
G.playing_cards[i]:remove()
end
then do 8, -1
Not sure if there's a more optimal method of implementing cards having enhancements of other enhanced cards in the full deck.
```lua
if context.check_enhancement and context.other_card and context.no_blueprint then
local curenh = {}
for i, pcard in pairs(G.playing_cards or {}) do
if pcard and pcard.ability.set == 'Enhanced' and pcard.config and not curenh[pcard.config.center_key] then curenh[pcard.config.center_key] = true end
end
return curenh
end
-# ...'cause this does bring Balatro to the knees when more items are calculated...
god has forsaken us
swift SMODS.Blind { key = 'snaggler', atlas = 'clackerblindplaceholder', unlocked = true, discovered = true, pos = {x = 0, y = 28}, dollars = 5, mult = 2, boss = {min = 5}, boss_colour = HEX("70673d"), in_pool = function() return false end, calculate = function(self, blind, context) if not blind.disabled then if context.drawing_cards and (G.GAME.current_round.hands_played ~= 0 or G.GAME.current_round.discards_used ~= 0) then print(context.amount) if (context.amount >= 4) then return { cards_to_draw = 4 } end end end end, }
I copypasted the serpent code from vanillaremade, anyone able to figure out why it's drawing ghost cards?
The new theme is subway surfers brainrot lmao
how would I code a boss blind that debuffs everything but a random card number that you have in your deck
are you sure its because of the blind
Yeah I tested it without any jokers, enhancements and yeah
Just the Blind tho apparently if you set the cards_to_draw value to a value that results in the amount of cards you get being less than the hand size
Then it draws extra cards which refer to cards that already exist in your hand
The ghost cards are duplicates that are face down if you do anything
oh and they go away if you reload
weird the serpent works fine for me
I'm using the Vanilla remade version
@wintry solar do you know why?
Nothing changes if post trigger is enabled or not
no i dont actually it works fine on my end. still, eremel is more likely to know
ah do you have this
its a new thing
its on vremade serpent but i dont remember what it is for
Am I on an outdated version?
yes
Damn
```lua
if G.STATE == G.STATES.DRAW_TO_HAND and not SMODS.blind_modifies_draw(G.GAME.blind.config.blind.key) and not SMODS.draw_queued then
...
```lua
-- Function used to determine whether the current blind modifies the number of cards drawn
function SMODS.blind_modifies_draw(key)
if SMODS.Blinds.modifies_draw[key] then return true end
end
👍
i have found an error in the UT/DR balatro mod and don't know how to fix it can someone help? whenever I hover over a certain joker ( page 20 top left ) in the colection ( from the main menue ) the game crashes with the error in the .txt i dont wana break the mod trying to fix it myself so i came here!
probably the joker you're trying to hover is trying to access G.deck in loc_vars but G.deck doesnt exist
-# in the main menu
so how do i stop it from crashing?
Real
this line isnt working like i want it to 😭
this card*
idk how to make it decrease the chips amount while also properly displaying
the display is WRONG I TELL YOU
i also dont remember how to make a food joker consuming if statement
vanillaremade will help with both issues (particularly looking at Ice Cream)
in particular, not everything should go in the return statement. adjust the values outside of it and then just return a message
do you have a link on hand?
should jump directly to ice cream
https://github.com/nh6574/VanillaRemade/blob/main/src/jokers.lua#L1245
i was finnagling with it and now i need the like chips colored message text
does ice cream do that idr
yes, it's this part
OH
I thought you'd like knowing that one of my Jokers is very similar to this:
White Rice
+100 Chips
-1 Chip per $1 lost
Had to add a function that ensures it doesn't lose chips when first bought.
I had the same question, it's adjust_alpha(darken(G.C.BLACK, 0.1), 0.8)
How do you make it so a Blind has a custom reward message?
Like how small blind has the "No reward" thing?
This tells the system that automatically handles the card limit/extra slots system that the blind is being funky with drawing cards
Is there a better way to force the blind reroll to be a specfic boss blind other than G.FORCE_BOSS?
<@&1133519078540185692>
How do you get the boss blind regardless of where it is?
G.GAME.round_resets.blind_choices.Boss
Ah thx
Where are vanilla edition rates defined?
How do you check if a Booster Pack is bought from the shop?
how do you check for jokers in a specific pool? (all my jokers belong in a pool called "bustjokers")```lua
for _, v in ipairs(G.P_CENTER_POOLS.Joker) do
-- Only shows discovered common, uncommon or rare and non-owned jokers
if v.discovered and not next(SMODS.find_card(v.key))
and (v.rarity == 1 or v.rarity == 2 or v.rarity == 3) then
selectable_jokers[#selectable_jokers + 1] = v
end
end
G.P_CENTER_POOLS.bustjokers
just a question, what does the "card" before the table in SMODS.scale_card do/reference?
```lua
SMODS.scale_card(card, { -- referring to the "card" here
ref_table = card.ability.extra,
ref_value = "chips",
scalar_value = "chips_mod"
})
the card that is being scaled
wouldn't that just be in ref_table?
i may be stupid maybe would help if there were an example of a use of scale_card that doesn't use card
Wait a minute
ok i think i get it
thanks
well its not a context
its not valuemanip
this is how stuff like runner and spare trousers should work
yeah its been a thing for a while
idk
i assume not since scale_card is fairly recent
also one other question
how would i do something like this using SMODS.scale_card?
```lua
...
card.ability.extra.xmult = card.ability.extra.xmult - (count * card.ability.extra.xmult_mod)
...
specifically the `count` is making it difficult for me to think of how exactly to accomplish this
true...
```
"{X:red,C:white}X#1#{} Mult, decreases by",
"{X:red,C:white}X#2#{} Mult per {C:attention}Unenhanced",
"card in scoring hand"
yeah this is probably correct lol
so it would work
For i = 1, count?
yeah
No, it does, also SMODS.scale_card is 5 months old.
i assumed it didn't since it's existed long before it was a thing and secondly i consider 5 months old to be recent in these terms
july still feels like it was two months ago 😭
This triggers if u get a Booster pack from tags
And I don’t want that
Hook G.FUNCS.use_card and check if card.ability.set == 'Booster' and card.area == G.shop_booster
```lua
SMODS.scale_card(card, {
ref_table = card.ability.extra,
ref_value = "xmult",
scalar_value = "xmult_mod",
operation = function(ref_table, ref_value, initial, change)
ref_table[ref_value] = initial - count*change
end,
})
Ah oki, thx
How do you force a lose?
what is G.deck.config.card_limit?
It's the same as #G.playing_cards
ah i see
how can i add an # to a textbox without it being removed
because the game recognizes it as text styling
add it as a loc_var
Hey guys, small question:
I want to position a sprite on the card as it currently only always renders on top left. However I can only move the texture within the sprite..? There probably is a different method but I dont know which one. Where do I find them in general?
Also I am not sure what X,Y, W, H in create_sprite exactly do, they seemingly have no effect..? Or perhaps I am creating and using the sprite wrong in general?
```lua
if not Mod.label then
Mod.label = SMODS.create_sprite(64, 0, 0, 0, 'crashpack_Font', { x = 1, y = 0 }) -- Letter B on atlas
end
Mod.label.role.draw_major = card
Mod.label:set_sprite_pos({ x = 0, y = 0 }) -- ???
Mod.label:draw_shader('dissolve', nil, nil, nil, card.children.center, 0, 0)
doesnt work in the voucher area
the values in create sprite are for when you use the sprite on its own iirc, in this case you are drawing it over the card so it will use the position of the card
the next two arguments in draw_shader (after the two 0s you have) are the x and y offsets of it
theres no docs on this stuff other than just reading the vanilla code yourself for the most part
Oh okay, I guess I'll extract the lua files from there then. Thanks ^^
its better to read the files in lovely/dump since those are after smods patches
Oh, good to know then
Nice. The only thing missing now is ensuring it properly rotates, I feel like the pivot point is not correctly set
i would honestly wait for the canvassprite feature in the next smods update, it's basically designed for this
yeah that probably makes sense. Up until that I'll keep trying to understand the code more and more though ^^
sr, can’t help much rn
ok
is there a context for the very start of the run
no but there's this https://github.com/Steamodded/smods/wiki/The-Mod-Object#modreset_game_globalsrun_start
OK works for me
how much should this joker cost(in vanilla esque cost scaling)
and is the scaling too slow?
i mean i'd say this is a rare
this is basically buffed erosion
and for rares it's usually in the $8-10 range yea
ah shit i actually dont know how to calc when a card is destroyed
this is an infinite scaling xmult joker
how do i make a card on the title show its description box when hovered over?
is there a like inf combo with it i didnt think about
how much is campfire
i mean currently as worded, it scales when card is destroyed, not when card is below 52
so if you destroy something, you can just buy a standard pack and you're back up to normal
ah
dna + trading card
so it is a true infinite scaling
are playing cards the only thing that can be "destroyed" or should i count food jokers being eaten as destroyed too
immolate
depends on you
or any other weird joker effects like knife
i just know thats annoying to code x3
i think there's a context for jokers being destroyed
card.no_ui = false
ty
I’d also recommend waiting like a week for the menu cards smods changes
i already did the menu card stuff days ago
the closest vanilla comparison to this is hologram which is another true infinite scale
although a few caveat
Then you’ll likely have to change it in like a week or so 😂
i expect to dw
hologram is uncommon because adding cards is harder than destroying cards generally
but hologram does scale by .25 instead of yours .1
maybe if you dont mind it, you could just base it on hologram, which is a $7 uncommon
Destroying cards is also better than adding cards
i have two other x mult jokers that also cost 8
mhm
also real qucik vs mention i love my yuri visual novel with a free rhythm game
anyway
peak
kenban is kinda a troll card
i should make it cost more or have a reset condition probably
isnt kenban just synonymous with "scale if hand beat blind"
like i get what you mean but yeah maybe the wording need to be adjusted
also technically not fire
isnt fire if the hand itself beats the entire blind req
how would i word this then 😭
nope, it happens when the hand scores more than the total blind score
well, here's a joker i have for reference
burnice joker that scales on fire
why the 😳 react? 🤨
also ignore my terrible text coloring
ice joker that nerfs itself if score is on fire
and eventually melts
technically a food joker
difference is it doesnt destroy itself
ill fix the coloring in a second
ok the plus is wrong
also Mult should be capitalised
ty
to be consistent with vanilla
yeah i think that's fine
maybe put "Rerolls" in C:attention
generally keywords that doesnt have its own specific colour like suits or mult should be in C:attention
although even this is not consistent in vanilla
since Chaos puts "reroll" in green
of all colours
thanks chaos
but flash card puts reroll in attention
gotcha
oh mood
i'd put "per" on line 1 just so the line length are closer
but these are just stylistic nitpicks
yeah neat jokers
yeah that was initially the goal but eventually i just let myself be a little silly :3
not too silly though i am still actively trying to vanilla balance
ok it works now
gg
do you wanna test it for me though, some of the jokers are... strange
cough cough eri
honey this is like chocolate chip at best
is it blueprint copyable
burglar can mogi t lowkey
like there's no reason to not use discards
Its pretty good econ
So i think its fine
i mean theres not much use out of extra hands usually
yeah that was my concern
And you get more throwaway hands as utility
true
like money i guess
For purples, rebate
for now though
More scaling jokers from playing hands
yeah
iirc the discard req was a reference but im not sure
you added something that you worry won't have any uses? add its synergies yourself
oh true 🔥
serpent joker that makes it so you always draw 1 extra card every hand played
Green deck synergy
you have a card that has an effect that can add 16 3 of clubs to your deck? have a 3 synergy joker
its banner without aura
hey
what
whoa
its a legendary
5oak of 3s that's 3^5
i was also gonna commission kyotsugyon for a :3c remix but that fell through
:3c
yeah
imagine not going im just adding this because i find it funny
eh
kinda not legendary ngl
epic ya feel me
EPIC DOESNT EXIST
cuz you're gonna run out of voucher fast
no but it gets across what i mean
i was gonna add a stipulation that if you ran out it becomes random
unless you're planning to add like 8 more pairs
what
Repeat vouchers?
it physically cant do that
kid named patching
wait thatd be cool
what do you mean it cant do that
another telescope each planet is 2.25x
You can patch voucher pool generation to allow duplicate vouchers
true but some dupes just dont do anything
Would be wierd since a lot of vouchers dont stack though
magic trick:
Yeah
dont let those happen
telescope 2
played card gives x1.5 mult for each held suit tarot that matches
Tarot/planet merchants, hone/glow up and interest vouchers all set values
so if you have a Sun hears gives x1.5 mult
Instead of increasing
hmm
what does that have to do with planets
what would make this a legendary without completely rewriting the voucher code
. w .
it wouldnt
you're seeing beyond the planets
but its a telescope
electron telescope
i cant adjust the rarity of the card to fit the effect, i have to do the other way around because of the mod
maybe like make it increase random stats when redeeming blanks
After yoy get every voucher
whats the spades one again i forgot
oh shit actually fire
The world
telescope pointing downward
telescope on the iss
"when redeeming a blank voucher, choose between, hands, discard, interest, hand size, joker limit, consumable limit"
choose?
choose as in random ignore that
oh like it chooses
ye
yeah seems good
i could do boss reroll cost too
fair
like its similar to why you arent doing reroll cost either
true
Interest is also kinda jank to increase
i assume it just goes up 50
Since seed money and money tree directly set interest caps
can you not just increase the cap of money tree
thatd be fun
Well no
"interest cap equals current interest cap plus 2/3"
do you mean 10 and 20
No
The interest cap value is actually the maximum amount of money that contributes to interest
also i just checked
i currently have
20 jokers
with some asterisks
one of them technically behaves like 12 jokers in a trenchcoat
Or you can do to the moon effect instead for interest
one of them is technically one joker with 26 variants
Since that is actually built for stacking it
and i think it's fair to say one of them just actually acts like an infinite joker machine
so yeah
Joker slots is probably a bit strong true
20 jokers, functionally infinite jokers + 11 + 26
tooltips?
its gonna be a like
info_queue?
scaling percentage kinda thing
i mean its like 1/8 per shop
oh it still do that
You could do like shop slots or something
7/32
maybe
true
choose between, hands, discard, interest, hand size, joker limit, consumable limit, shop slots
do you guys have an idea of why its doing this
yeah i think those are a good set
i have no idea how rare i need to make some of these
joker limit and hand size being the two i wanna like
make rare
oh yeah btw when people add new legendaries to their mod is it like a good idea to make another way of getting legendaries
maybe a deck where you have to work for it
including legendaries because of how many of them there are
i'd weight hem like this
4 hands
4 interest
3 hand size
3 shop slots
2 discard
2 consumable slot
1 joker slot
where lower numbers are rarer
why are hands over discards
i think hands and discards should be swapped but i could be crazy
well once you've got an engine having more hands matter less
hands = money still
discards are always going to matter to dig for the necessary cards for your engine
hm
yeah but again
fair
once you have your engine, you're not buying jokers often anymore
maybe one or two rerolls to see if you get a planet you like
or death
true
but cant you just dig with hands
there are more builds that have restriction on using hands than using discards
again im ordering them based on when they'd be useful on average
how do i check if ive redeemed a blank voucher specifically twice
the first time, with this joker, i dont want it to do anything
i think you just check what the key of the redeemed voucher is
and set a bool flag
probably easiest way to do that
it's probably stored in a G.Game somewhere
i dont remember where to go digging for this im just gonna see if someones asked this before x3
this fixes the issue of you constantly getting high card levels
with spaceman
thumbs up emoji
but its propably a lil slow
can someone post the fabled smods link again
we should have a bot where we can do like !smods
but also i find myself looking at the smods wiki less and less
and just going off vanillaremade mostly tbh
it doesnt always have what i wanted to do but it certainly has more than smods
vanillaremade seems also good
currently suffering trying to find a single example of a text box
what kind of text box
similar to the edition or the sticker descriptions
i wanna explain what every "stat" is
like, how to add them to the side of the description?
yeah
for stickers it would be like this
mmh
How do I make a stake that goes after gold stake and applies gold stake? This code isn't doing the thing
```lua
SMODS.Stake {
key = "emerald",
applied_stakes = { "stake_gold" },
above_stake = "stake_gold",
...
}
I did add stake_ though
I also tried adding prefix_config = { applied_stakes = false, above_stake = false }, and that didn't do it
I'm not sure I'm understanding, the vanilla gold stake doesn't have a mod prefix
try prefix_config = { applied_stakes = { mod = false } },
smods adds it by default so it sends up as modprefix_stake_gold
It assumes that the stakes I'm listing are all from my mod?
it's kinda how you don't need to add your prefix to atlases
Oh interesting, I'm doing that lol
This does the thing, thank you
So instead of doing key = "nancy_stakes" for my atlas I can just do key = "stakes" and there won't be a conflict?
Btw the stickers on vremade seem to be missing the rate parameter
So it looks like they apply to every joker
Oh unless 0.3 is the default for all of them?
yes
Lol I see
yeah
Neato
@red flower I think vremade doesn't have these sticker descriptions in its localization file
added thank you
merci :)
Why does this code make the sticker apply to literally every single card including consumables?
```lua
SMODS.Sticker {
key = "baneful",
badge_colour = HEX('068b54'),
atlas = "stickers",
pos = { x = 0, y = 0 },
config = { extra = { hsize = -1 } },
loc_vars = function(self, info_queue, card)
return { vars = { self.config.extra.hsize } }
end,
should_apply = function(self, card, center, area, bypass_reroll)
return G.GAME.modifiers.nancy_enable_banefuls_in_shop and not card.ability.rental
end,
calculate = function(self, card, context)
end
}
Specifying rate = 0.3 and sets = { Joker = true } doesn't change anything either
setting a custom should_apply function ends up ignoring the rate, so you have to include the rate check in that should_apply function
vremade lied to me 💔
But also it seems to apply to rental cards too, and I don't want that
Uh, how would I do that? What do I check against?
rental applies after custom stickers, it sucks
wehhh
and pseudorandom("seed") < 0.3 in the if statement
I see
Can I have the sticker unapply if it detects that the joker became rental? How would I do that?
you should probably patch into the sticker apply code so that rental can only apply if it's not your custom sticker
or take ownership of rental and give it a should_apply function of its own
Yeah I tried that and it ended up applying to every single card too, but now I know why
Lowkey would be easier to just write a patch lol
But let's see if this works
stickers are wonky so its kinda impossible to recreate some conditions without patching
but i will make a note on vremade
I mean you can do this in their should_apply functions so it's accurate, right?
yea
oop sorry for ping
idk why they use should_apply actually
And I guess you also need to check for the card to be a Joker
Yeah there's this
Man lol
I think the smods wiki should have a note that should_apply overwrites all these other attributes
This is unintuitive
i think its because they have the condition to not have the other sticker
Ah yeah fair
but it doesnt work anyway
Btw card.rental isn't a thing, it should be card.ability.rental
Same for the other stickers
idk i didnt add those
i will probably just remove the should apply and make a note that they cant be recreated exactly
Fair enough lol
v_blank
:3
Right well this seems to have done the trick lol
```lua
SMODS.Sticker {
key = "baneful",
badge_colour = HEX('068b54'),
atlas = "stickers",
pos = { x = 0, y = 0 },
config = { extra = { hsize = -1 } },
loc_vars = function(self, info_queue, card)
return { vars = { self.config.extra.hsize } }
end,
should_apply = function(self, card, center, area, bypass_reroll)
return G.GAME.modifiers.nancy_enable_banefuls_in_shop and card.ability.set == "Joker"
and not card.ability.rental and pseudorandom('nancy_banefulsticker') > 0.7
end
}
SMODS.Sticker:take_ownership('rental',
{
should_apply = function(self, card, center, area, bypass_reroll)
return G.GAME.modifiers.enable_rentals_in_shop and card.ability.set == "Joker"
and not card.ability.nancy_baneful and pseudorandom('nancy_rentalsticker') > 0.7
end,
},
true
)
Kinda obnoxious
But I guess better than a patch?
Or maybe just writing a lovely patch would be better lol
What do y'all think?
ok well v_blank by itself isnt working and im trying to check for blank being purchased
what do you have rn
was trying to do a check here
context.card.config.center.key == "v_blank"
?
oh i might be stupid
also you would need to remove buying_self
how do i make a counting variable set somewhere without accidentally resetting it later >w<
coding sucks!
wdym
i need to put this somewhere before reading it in the if statement, but setting it inside the if statement is confusing
unless i set it to 1 by default, but then it'd reset itself to 1 repeatedly
oh im stupid
i forgot about config
yeah
Nevermind this allows rentals from judgement
I'll just write a lovely patch...
my damn joker randomly went back to jimbo land
ah i see, you should use pseudorandom_element on it
i did some looking and couldn't find anything, is there any channel/thread/post with a tutorial on how to make a texture pack? (i wanna make one to change the playing cards)
i may need a bit more elaborating on that N
much thanks!
pseudorandom_element(card.ability.extra.statTable, "any seed") gives you a random element respecting the run's seed
in general don't use math.random
like inside the stattable?
no, by itself
oh hold on
accidentally copy and pasted backwards
(i copy and paste between my github copy and my in game copy)
now nothing is happening
OK THE MESSAGE WORKS
now... i just have to increment each stat when triggered by the table
😭
ok how do i do the interest
i need to increase both the cap and the threshold
where do i check g.game as a hypothetical
function Game:init_game_object() in game.lua
where is game.lua
See the lovely folder in your Mods folder
It contains a dump of the game's code after being patched by smods and other mods you have
im coming up with ideas for a mod (not too sure if it's gonna be made) and obviously im adding astro, what does he do in other mods? (I have zero ideas and i need inspiration)
for editing stuff like this, do i need to remove the starting_params
no in that case it would be G.consumeables:change_size(number)
