#💻・modding-dev
1 messages · Page 580 of 1
cant you just remove the id and value jank
wdym
local func?
otherwise the rest of my code also breaks
break just ends the current loop
since smods.modify rank is already doing thay
genius
mf forgot to delete his original code
better?
doesnt that end the end the return aswell?
it shouldnt
No, you don't return in the for loop.
oh i think isee
ship it and see
How do you apply custom color to a splash test from a joker? (Where they say mult, chips or whatever during scoring)
en
dutch reference
true/...
echt/...
werkelijk...
theres no way this isnt an smods issue atp how does card become nil
AUREEEEEEEEEEEEEE
lol
this "card" thing ur speaking of wtf is that?
Erm
i would ping aure rn
card is the card object that whatever function is being called on
No, context.other_card doesn't exist in the event.
that is executing the calculate function
i got that im just mimicing the error dw tweeling
You need to put it in a variable.
wait @daring fern where was the has stone = true supposed to go again?
wtf
why is lua stupid
because it currently looks like this and i know thats wrong
hit that alt shift F vro
for k v in ipairs context dot full hand
you have summoned me
ur right vro
like this?
heres the readable version XD ( i moved has stone down two just to test)
god has answered my prayers
why is the indent like that
Yes, but also for juice_up
dont worry, its just lua fuckall
the for loop doesnt actually do anything?
before the loop you need to do local has_stone = false
uh so
context.other_card gets nullified before you use it
so after the calcuate = functon line?
so you need to save it to a local var outside the event
Can I write “colour = {HEX(‘123456’)}” in calculating?
yeah
No, remove the {}
is the has_stone in the right place?
bcs it feels out of place when its not in the for loop lol
i remember it worked like this?
alright, hoping this works bcs my family is nagging me to hurry up lol
juice_up is a method
idk what you want to do here
No, it would be thecard:juice_up(...)
cuz has stone does nothing
like absolutely nothing
maybe you want the function to return the things if has stone is true?
context. full hand doesnt exist
You need a context check.
put a if context.individual and context.cardarea == G.play then before
wrap it around the whole thing
maybe im tripping but wont this only trigger if i have only one stonecard instead of played?
no?
it just means that your hand is scoring
what are you trying to do here im confused
im trying to make it double the poker level why does it always upgrade by 1
if your played hand contains a stone card give X4 mult
do you by any chance have talisman installed
yeah
okay that would be why
(to the Joker to the card would be too busted)
talisman turns hand level into a table for bignum/omeganum
and if the amount in level_up_hand isnt a number it just becomes 1
currently I have to do something so I'll be back in a couple hours
just do to_number(G.GAME.hands["Pair"].level)
to_number works until the hand level exceeds the default limit
which will probably happen with a planet that doubles levels
calculate = function(self, card, context)
local have_stone = false
if context.joker_main then
for k, v in ipairs(context.full_hand) do
if SMODS.has_enhancement(v, "m_stone") then
have_stone = true
break
end
end
if have_stone then
return {xmult = 4}
end
end
end
I'll let you know if it works when I'm home XD
shouldnt is be just context.joker_main
oh true
and local have_stone = false should be in the context check
also the xmult isnt in a context check
omg thanks it worked :DDDD
isnt have stone's position arbritrary
i guess
How do I check for when a certain joker triggers?
Tryign to do the restrictions on a challange, does anyone know why this isn't working? It works with {id ="v_wasteful"}. I have tried t_bstuck_scratch but it also didnt work; is the "t_bstuck" meant to be something else?
ohhh, fair fair. thank you!
if context.post_trigger and context.other_card.config.center.key == 'j_modprefix_key'
Can confirm that worked, thanks!
I changed it to this, and it doesn't do anything. Did I do something wrong?
if context.post_trigger and context.other_card == G.jokers.cards[1] then
ease_dollars(card.ability.extra.money)
end
Did you enable post_trigger?
Nope, will do that now.
@stiff locust can you show your code? Might be able to tell what's wrong by looking at it
i did the thing the guy said about swapping condition with g.c.green and it didn't crash but also the boxes which should be changing colours aren't showing up
also, a screenshot of what it's currently drawing would be great!
it's drawing everything except the 16 nodes with colours = condition and g.c.green or g.c.red
they simply do not show up
yes but I can't read this code and immediately imagine what it's gonna look like, haha
true
there's 6 buttons and they are all next to a description and there's a title at the top
there's a title at the top but i forgot to include it in the picture :)
i haven't balanced or implemented these effects yet
i want the 16 nodes to be a resource meter
and when you press the buttons the resource meter should go down by the number in brackets
I try to load up a challenge and this happens
Ah, but not animated, right? Just reloads it with less nodes filled up?
yeah
the buttons recalculate the UI
so the nodes should update their colours
if the nodes showed up at all
i don't see why the colours wouldn't update. But you're saying the things don't get drawn at all, right?
yeah
UI code is a bitch to read so give me a sec to parse it a bit more thoroughly, haha
gotcha
if you remove the condition, and just make it green by default, does it get drawn? Because you mentioned it working without the colour change, no?
How would I check if a card is a playing card?
actually no i haven't gotten them to draw even once
i personally check if it's set is default or enhanced
if card.playing_card
how do I set consumable type name in SMODS.ConsumableType so it won't be like that
give me a sec to load your code into debugplus, i'mma mess around a bit to see if I can figure out the layers
ye
b_key_cards in Localization > misc > dictionary
real quick, how do i check if a playing card has no enhancement
if not next(SMODS.get_enhancements(card))
need to convert a bit too many things to set it up and I need to leave in a sec, so can't use debugplus to watch the file atm, sadly
Code?
But could you do something for me, Marie? If you make 2/3 colours (I'd personally just set them in the function itself), and alternate them for each subsequent node, it'd be a lot easier to see which ones are getting drawn and which ones aren't
Because I'm assuming the main issue won't be that nothing gets through. In my experience, UI stuff is mostly just incorrect nesting or syntax, and it just takes some tricks to find the place where you're missing brackets for example
I think it should work now
Because it'd be very handy to know up to which node does get drawn, and where it gives up
“the guy wrote self, info_queue, card instead of self, card, context, laugh at him”
i did that and none of these nodes draw
ough last question regarding challanges: someone know why this voucher ain't getting banned?
i couldn't get all 16 on screen but none of them draw
“THE GUY ALSO FORGOT TO ADD CONTEXT.MAIN_EVAL 😭”
vouchers go into banned_cards
I’m so fucking stupid bruh
thats. kinda crazy damn. ty.
all centers go into banned_cards afaik
In what situation would I not include main_eval in an end_of_round thing
when you want it to trigger 8 times for the funny
for effects on playing cards at the end of round
because
main_eval is true when no secondary cards are being evaluated
whuh
you should always use either main_eval, individual or repetition
am I missing something what's wrong with it
you are meant to put the G.UIT.R inside the node or the content, depending on what you need
or, you misplaced the bracket
Why is my XChips not xchipsing
oh
I did misplace a bracket
ah shit
okay progress
the box has rendered
the box is empty but it's working
No, it is true when the calculated object is a joker, consumable, deck or blind and the context is from SMODS.calculate_context.
thats effectively the same
i cant think of anywhere where that would be different from no secondary card
well that's progress but none of the colour nodes are showing up
What is a secondary card?
e.g. context.other_card
like another card being used in calculation
im just stealing the wording from here though idk if it has a better term
and the lsp definition also gives the same description
yeah okay now it's definitely the colours' fault
I'm doing something wrong but what?
calculate = function(self, card, context)
if context.joker_main then
return {
Xchips = card.ability.extra.Xchips
}
end
if context.end_of_round and context.main_eval then
if context.ante_change and context.ante_end then
card.ability.extra.Xchipsincrement = card.ability.extra.Xchipsincrement * card.ability.extra.Xchipsincrementmultiplier
return {
message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.Xchipsincrementmultiplier } },
colour = HEX('00FFFF')
}
else
card.ability.extra.Xchips = card.ability.extra.Xchips + card.ability.extra.Xchipsincrement
return {
message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.Xchips } },
colour = HEX('00FFFF')
}
end
end
What about context.post_trigger?
main_eval would always be false there
or nil since i dont think its even passed into the calculation
because post_trigger always has another card
No, because it uses SMODS.calculate_context
I'd honestly just keep checking, because those nodes don't have enough code to be an issue
i don't know what else to check other than
how to modify the current values of a joker in your joker slots
I guess these are all R nodes?
if I set them all to C will they appear above each other
that's not what I want
y'all it's been a while since i've coded a joker
fuck did i do wrong now
i mean main_eval has no reason to exist anyway there since theres always a second card
It's xchips
ok what about the value mod?
the actual description i imagine is just for contexts where both main_eval and not main_eval would be possible
since in contexts where theres always/never a secondary card it doesnt make sense
Remove if context.end_of_round and context.main_eval
Oh yeah, you don't wanna stack R nodes in R nodes
},
loc_txt = {
name = "{V:1,s:2}Stultus Astronomicus{}",
text = {
"Gains {X:chips,C:white}X#2#{} chips at the end of the round.",
"Multiply gained {X:chips,C:white}XChips{} by {B:1,C:white}#3#{} at the end of the ante.",
"{C:inactive}(Currently {X:chips,C:white}X#1#{C:inactive} chips){}"
}
},
Always alternate 'm
but if i make them C nodes do they go vertical
Otherwise you'll get them being drawn in unexpected places
do a single C node inside the main R node and then you can have a bunch of R nodes inside that
No, because they're in a row. Stuff inside of 'm would be sorted in a column, but the nodes wouldn't
ahhhhhhhhh
yes. ante_change and end_of_round are never true at the same time
i mean i tried doing it separately
but it doesn't seem to work either
i made them all C nodes and they still aren't showing up
you cant stack C nodes in C nodes either if thats what youre doing
im not
i have an R node that contains sixteen C nodes
the sixteen C nodes arent there
but the R node is
even if I remove the variable colours it doesn't show up
calculate = function(self, card, context)
if context.joker_main then
return {
xchips = card.ability.extra.Xchips
}
end
if context.end_of_round and context.main_eval then
card.ability.extra.Xchips = card.ability.extra.Xchips + card.ability.extra.Xchipsincrement
return {
message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.Xchipsincrementmultiplier } },
colour = HEX('00FFFF')
}
end
if context.ante_change and context.ante_end then
card.ability.extra.Xchipsincrement = card.ability.extra.Xchipsincrement * card.ability.extra.Xchipsincrementmultiplier
return {
message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.Xchips } },
colour = HEX('00FFFF')
}
end
end
waaait
like this?
I didn't assign a min height
yes
but Xchipsincrement is not affected by Xchipsincrementmultiplier
also why are you doing HEX("00FFFF") every time instead of like G.C.CHIPS
it's astro's joker.
okay
pls help
you either have to already specifically know the variable names of the joker to change it or you need cryptlib for Cryptid.manipulate
to modify other jokers that is
a joker can modify itself quite easily
wtf
wait there is another API? is it compatible with SMODS?
seals on everything has value manip?
theres a lot of APIs
also not every api is like smods
Wait what
cryptlib requires smods
where can I grab already spawned vouchers in the shop
so that I can destroy them with :shatter() or smth
Yes, Energy
New addition?
so where do I find crptidlib?
Cryptlib*
Yes.
I can't figure out why my challenge is crashing
No, just make a function like the one in the link I sent.
Releases or main branch
Both.
Your recommendation
The main branch.
I love the minecraft map
soon
so do I just put the folder in the mods folder?
yes, its a mod
No, you just copy the function in the link I sent.
omg
if context.end_of_round and context.main_eval then
card.ability.extra.Xchips = card.ability.extra.Xchips + card.ability.extra.Xchipsincrement
return {
message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.Xchipsincrementmultiplier } },
colour = HEX('00FFFF')
}
end
if context.ante_change and context.ante_end then
card.ability.extra.Xchipsincrement = card.ability.extra.Xchipsincrement * card.ability.extra.Xchipsincrementmultiplier
return {
message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.Xchips } },
colour = HEX('00FFFF')
}
my favorite hand leveled up by ^2
i still have problem
Still have no idea on my end
though tbf, i'm using lovely to implement the challenge
Code?
what do i need to patch to edit the shop
banned_cards can also be a function that returns a table
fyi
you dont gotta do allat
anyways hum guys how do I get a list of all shop cards
how to use manipulate?
I'm using lovely to code the challenge, not smods
so I can destroy all vouchers in a specific case
nvm im just gonna copy entropy code
you can still do that though?
What? Code it in smods
G.shop_jokers.cards, G.shop_vouchers.cards, G.shop_booster.cards
you should be able to make it a function unless it just isnt an smods mod at all
how did I miss that
I'm still rusty, wdym make it a function
banned_cards = function()
--like whatever as long as you return a table of keys
end
no i can't do that
why not
it's lovely not smods
are you just not using smods at all
not for the challenge, no
well
you can still do that as long as smods is there
because smods adds the ability for challenges to use functions for bans
nvm i have no idea where ruby put the thing
so bump
actually how to use any cryptid function?
Why would i need banned_cards as a function anyway
YOU'RE NOT DOING ANYTHING, "END OF ANTE" CONTEXT
if context.ante_change and context.ante_end then
yeah i'm not understanding ya with what the smods.challenge is saying
restrictions.banned_cards: Expects a list of tables with keys to ban in their id fields.
ok i found it nvm
What is your SMODS version?
I'm literally on the smods.challenge page on the wiki
yes
0827c.
What mods do you have?
why are you testing with so many mods on
3x Credits
the nodes will show up if I don't do variable colours now
but I need the variable colours
Entropy overwrites ease_ante and removes it's ante_end input.
how did you get it to work
So that it’s versatile with any other mod
well
its not like this joker is going to break other mods
and you wont know if its your mod or another mod if you have like 10 other mods installed
Yeah, H'. I'm not getting this. Something must've changed in the updates that's causing my stuff to break so I'm just gonna just try something
So context.ante_end never exists.
I’ll just have to change it then
But I love entropy
well yeah but its actively making your joker not work
Then i’ll change it
No, SMODS fixed it by using SMODS.ante_end instead.
Which is only in the dev version.
hey so I downloaded cryptlib and added its path my to my libraries in my luarc. is there anything else I should do?
Okay so it's literally a bug with me implementing the challenge through lovely
I got an idea
Can I still just ante_change?
I'm gonna use my jank method of implementing it through lovely then take ownership in smods
yeah ante_change should still work
It’s more broken that way
I know it works with jokers at least so it's gotta work with challenges
HAH. MY JANK METHOD WORKED
IT WORK
It’s fixed in the next release of smods
Ooh
How do achievement atlases work? I've seen there are atlases for when the achievement is locked and unlocked and idk where to start exactly since I do wanna make a sprite sheet first
i know that much
other than that they work like any other atlas
you assign a sprite for when an achievement is locked or unlocked
hidden_pos is the locked sprite and pos is the unlocked sprite
those are defined inside each achievement
ye that's what I was looking for
thank you
got this working
I want to detect alternating suits but it's not working, any ideas?
im looking at this one in a sec but in the other screenshot you posted not fivewhatever == {} is wrong
btw
a == (b or c) doesn't do what you want, in this case it always evaluates a == c
instead of checking if it's not stone you should check if not SMODS.has_no_suit(context.scoring_card[i])
Hmm, doesn't seem to be working
I separated all the ors into their elseif statements and changed the smod part
can i see how it looks
Is this a joker?
Lemme double check my code first before I make a fool 🤪
yeah
oh yeah something is right
Remove the card area check.
i think you misunderstood the or thing
Oh
You have to do if a == b or a == c not if a == (b or c)
Ohhhh
My bad
Heeeyy! It's working now, thanks so much
This chat is amazing really
hey is there any resources for cryptlib or am I just screwed?
there arent
also 99% of the time youre better off just stealing its functions
because dependencies are annoying as of now
im trying to make a meme joker for a test to get better before doing a full mod and when i run this piece of code could you please explain why the joker gives 0X mult here is the code "SMODS.Atlas {
key = "Jokers",
path = "Jokers.png",
px = 71, py=95
}
SMODS.Joker {
key = "Gay_Joker",
cost = 1,
loc_txt = {
name = "Gay Joker",
text = {
"Adds {X:mult,C:white} X#1# {} Mult",
" for each Gay Joker.", "If a straight is played,",
"you lose the run instantly."
}
},
atlas = "Jokers",
pos = { x = 0, y =0 },
config = {
extra = { Xmult = 628 }
},
loc_vars = function (self, info_queue, center)
return {
vars = {center.ability.extra.Xmult}
}
end,
calculate = function (self, card, context)
if context.joker_main then
local gays = SMODS.find_card("Gay_Joker")
local count = #gays
return {
card = card,
Xmult_mod = card.ability.extra.Xmult * count,
message = "X" .. card.ability.extra.Xmult * count,
colour = G.C.MULT
}
end
end
}"
if context.joker_main then
return {xmult = card.ability.extra.Xmult*#SMODS.find_card('j_modprefix_key')}
end
how would i change the enhancement of a card?
card:set_ability('m_modprefix_key')
what would that look like for this i;m still new so i dont quite understand this and the docs are kind of confusing for me
what do I hook if I want to lower the final score of every hand played if I cannot use a calculate function
Why this error appear?
Remove vremade_
vremade is the mod prefix for vanillaremade. you need to use the prefix for your own mod
No, SMODS.ConsumableTypes don't have prefixes.
ah right
Thanks
i dont really understand why but i have it so every joker is 71 by 95, however when following this there's always a little bit of the other joker that laps into the next one
Could be an issue with your joker png file. Something could be misaligned.
Also, how is your atlas set up?
i do think its in my paint.net but idk why
heres my atlas btw
considering my first joker ends at 71 my second at 142 etc
The Atlas looks correct, so I can only assume it's an issue with the image. But if you don't show the image itself, there's no way to know what's wrong, if anything.
let me pull it up while blurring some of my friends faces haha
this is currently my amazing selection of jokers
in 2x
Jokers are actually 69x93
wait i do see an issue
why am i learning about this now 😭
okay ill just make every joker 2x by 2x smaller then?
hey chaat
i'm still trying to do variable colours in a uibox and it's almost working
but the menu recalculate function doesn't appear to be working
even when I run it manually the UI doesn't update when the colours are supposed to change
idk what to doo
is there another way I can get it to redraw the UI
currently using G.OVERLAY_MENU:recalculate() and it's doing nothing
why doesnt this work?
"11"
all my homies hate smods.chnage_base
i did "Jack" and it worked
Right, that takes a "key", not numerical ID.
wait so
the full joker including border
should be 71x95?
yes
is there anyway i can add a button on the options screen as i want to make a mod with completley different gameplay so i would like to use the balatro window without any balatro on it.
okay so currently
taking this one as example
you can see it has like 1/2 px border from the other joker right?
yeah
no the one on the left is touching the edge of its area
it should be moved one pixel over to the left
oh so its 70px
with one border
no?
the full area is 71x95 and you should be using 69x93 of it
what youre suggesting is making it 70 with one in between right
wdym by full area then?
thats like 1 grid space in the atlas
im so confused
Full area as in the sprite by itself is taking that
And sprites are next to eachother without any border to separate them
im just gonna move everything one to the left and hope it works
bcs i dont understand ts
that
wont work
you only need to cut off 1 pixel off the right of the rightmost sprite
no i mean like
wdym rightmost?
oh
so like this?
uh
Here, just look at the vanilla jokers.png as an example of how yours should be laid out.
yeah theres 2 pixels between each card
oh so move my right joker one more to the right?
(and all the others except the left most)
How could I make a challenge start off with one random card? I tried removing all but one card in apply, but it seems like G.deck and G.playing_cards don't exist yet when apply runs.
okay
they do exist, you need to change the starting deck with events though
im praying this works bcs im sick and tired of sprite things its been over an hour 😭
Do you have an example?
you know how events work right?
Uh, not really, I just use them based off when they're used in vanilla remade.
well
you can just
copy your current code for changing the deck
and put it in an event
Alright, got it
okay so completely different question i have a joker that functions almost entirely the same as drunkard
how do i make it play a stupid sound at the start of the round
add a context for selecting blind (idr what it is) and have it play the sound then
whats the syntax for selecting blind?
do you happen to know?
if context.setting_blind then
if context.setting_blind then
💔
lol
do you also happen to know the one for purchasing/obtaining the joker?
(obtaining as in pulling it from judgement buying it as in yk)
if context.card_added and context.cardarea == G.jokers then
outside of the calculate function, you can do stuff in an add_to_deck function which runs when the card is first obtained in any way. make sure to check if not from_debuff unless you want it to also play the sound whenever it gets undebuffed
https://github.com/Steamodded/smods/wiki/SMODS.Joker
this is true when any joker is obtained
thank yo utwin
even if thats that true that just makes my effect funnier
sure if you want that
the joker im making this for a gravity coil from roblox
it going boioioioing when you buy a joker is low kfunny
okay so
this works when obtaining another joker
not itself
however
i do like that it works when obtaining other jokers
its funny
the only issue is it doesnt do it when obtaining itself
if context.setting_blind then
and this also doesnt work
(for context if it matters my joker gives +2 discards -1hands)
What's your full calculate function for the joker right now?
for obtaining itself do the add_to_deck thing i told you about
alr ill get to that
yea just add a play_sound call to the add_to_deck function
wait ur so right
i was making a seperate function
but thats so much easier
Instead of a second if you can just do
if (context.card_added and context.cardarea == G.jokers) or context.setting_blind then
Since both contexts lead to the same result.
(Your issue is that with how your calculate function is laid out currently, your second if is actually inside the first if, in such a way that it can never trigger.)
oh true
yeah ur so right i completely forgot thats how that works
summer break no programming projects really made me forget alot
What's the function that triggers when a joker is being destroyed, and is there a way to identify the joker that destroyed it?
Card:remove(), no.
So if madness destroys my joker, I can't do anything to alter the madness?
Yes.
right so i have a weird issue
im making a boss blind that changes the suits of played card
the issue is, the cards are changing suit before the cards/blind wiggle
if i put the :change_suit inside the event, then the cards look like they've changed, but jokers will act on the suit prior to change
i.e.
club flush
boss scrambles suits into complete random
onyx agate does +7 on all 5 cards
how do i put my consumables into my booster thing? (i also do not want them to be immediately used)
Use SMODS.change_base with the fourth input as true then do card:set_sprites(card.config.center, card.config.card) in an event.
change_base can take a fourth argument? it's totally undocumented on the wiki or even in the lsp_def
ope yea i see it in the source code for the function itself
how do i do what i asked
read the documentation
example two can be modified to use your consumable type as the set (or if you have a specific subset of tarots/planets/spectrals, you'll have to make a pool of them and use that pool as the set)
https://github.com/Steamodded/smods/wiki/SMODS.Booster
how the heck do i make a pool
i'm new to this
also i read the docs but they make no sense to me
or atleast this one
ok i assume you do just have some custom tarots/spectrals/planets that you want to have their own booster pack
you'll want to create a new SMODS.ObjectType, set the key to whatever you want to name the pool and set the cards table to include all your consumables (the full key, i.e. c_yourmodprefix_yourconsumablekey)
then, copy example 2 from the screenshot i showed into your SMODS.Booster object, remove the edition part and fill in your mod prefix for the key_append, and change set to equal the key you gave your ObjectType
hi
how do you apply a seal to 1/3 of the deck in a challenge?
how do you run a function when starting a challenge deck
apply
thx
i assume using pseudorandom_shuffle(G.deck) and looping through it x times would functionally apply a seal to that many cards right
what are the args
right so weird variation of this problem
instead of randomizing suits, it changes a card to stone
self
the issue is, the sprite of the card dissapears when the enhancement is changed internaly
Code?
yeah, but can i make the card sprite not dissapear until i explicitly update it (line 403)
how do you make a challenge unlocked by default
Hook Card:should_hide_front()
hook?
is using challenge apply to modify the deck bad form? should i go the long way and add a game modifier?
unlocked = function() return true end
that was fasrt
How would I replace the atlas for the Balatro logo? Not the card, but the logo specifically
look at how ortalab does it
SMODS.Atlas{
key = 'balatro',
raw_key = true,
path = 'newlogo.png',
px = 333,
py = 216
}
SMODS.Challenge {
key = "moderntech",
unlocked = function() return true end,
rules = {
custom = {
{id = "no_shop_jokers"}
}
},
jokers = {
{id = "j_nflame_opensource", eternal = true}
},
consumeables = {
{ id = "c_judgement" },
{ id = "c_judgement" }
},
apply = function(self)
local deckfix = G.deck
pseudoshuffle(deckfix, "nflame_moderntech")
local affected = 17
for _, v in ipairs(deckfix) do
v:set_seal("cry_green_seal")
affected = affected - 1
if affected < 0 then break end
end
end
}``` does anything stand out
my challenge either isnt showing up or is locked
creating a challenge?
unlocked = true
last i checked challenge unlock functions don't actually work
or booleans for that matter
Hi, i'm doing a challange and i attempt set the tarot and planet rate to 0 but i dont know how to do it
I try this but dont work
Yes, do it in apply
how do you spawn a perishable joker to a challenge
Have you checked how any of the challenges in vremade
Work
yeah
i'm searching in the wiki where is apply, sorry i'm new doing challenges
the word perishable ONLY appears in the non perishable challenge
pinned is a supported argument tho
id (required): The key of the joker to create.
edition: The edition of the joker, if any, given without the e_ prefix.
eternal: If the joker is eternal.
pinned: If the joker is pinned.
perishable isnt
ty
The evil deck
It's not on the wiki.
Change eternal to perishable
How would I give all playing cards that appear in the shop an edition?
And change jokerkey to your joker obviously
where is it?
Nowhere.
how to uses?
well yea lol
apply = function(self)
-- code
end
Hook CardArea:emplace()
"What's a hook"
Here https://github.com/nh6574/VanillaRemade/wiki#whats-a-hook
Idk why I have a feeling this question will pop-up
You saw through it honestly
like this?
Yes.
how do i get the current deck again?
perishable = true didnt work
G.GAME.selected_back
it returns the key, yes?
No, it's G.GAME.selected_back.effect.center.key
G.GAME.selected_back.effect.center.key if you are looking for a specific key
dont works, but dont creashes
What is your SMODS version?
i'm slow i just realized G.GAME.selected_back just checks if you have a deck selected
0*x = 0?
OH ITS JUST STICKERS = {}
Idk why would perishable not work when eternal and pinned does
its just not a native switch like eternal and pinned is
you have to apply it directly with stickers = {} apparently
good evening modding dev i had forgotten to say i finally released the new version of hpfx
thanks for all the help
i'm trying to do tarots and planet dont appear
function CardArea:emplace(card, location, stay_flipped)
if G.GAME.selected_back.effect.center.key == "b_JCJ_incremental_pack" then
local roll = pseudorandom('incremental_pack')
local pool
if roll <= 0.05 then
pool = rares
else
pool = normal_gains
end
local ability, index = pseudorandom_element(pool, 'incremental_pack')
card:set_ability(ability)
else
return cae(card, location, stay_flipped)
end
end
this is bugging for some reason, ive attached what it says is crashing, any help?
Pass in self too
inside the function values?
if it has the colon i don't think you need to pass self
return cae(...)
oh that yea
Inside the function on the return
Yes
think i mightve did something...
No, you should still run the original function.
What is the goal?
every card generated has a randomly selected enhancement
or well
an enhancement from a list i have
local oldcardareaemplace = CardArea.emplace
function CardArea:emplace(card, location, stay_flipped)
local g = oldcardareaemplace(self, card, location, stay_flipped)
if (self == G.shop_jokers or self == G.shop_vouchers or self == G.shop_booster) and card.playing_card and (G.GAME.selected_back and G.GAME.selected_back.effect and G.GAME.selected_back.effect.center and G.GAME.selected_back.effect.center.key == 'b_modprefix_key') then
card:set_ability(SMODS.poll_enhancement({guaranteed = true}))
end
return g
end
wait how would i exclude cards from the deck from having this
Do you just want playing cards in the shop or all playing cards?
in the shop, or newly generated cards
i have a starting set of 52 cards with enhancements
repost for a crash that happened last night
G.GAME.modifiers.booster_choice_mod = (G.GAME.modifiers.booster_choice_mod or 0) + card.ability.extra.size
is it the same for booster size mod
Yes.
it works thank you 👍
(this)
Yes, I changed the code.
oh fire lemme look
Does anyone know if there's an equivalent to the set_sprite_pos function but for the soul sprite?
It's the same function.
1 small issue, i want it to pick from a list of 24 random enhancements
Yes, get a pseudorandom_element from that pool, and put it instead of SMODS.poll_enhancement
huh? how does it work
ohhh'
okay
card.children.floating_sprite:set_sprite_pos(...)
ah floating sprite ok
I know this isn't really the right channel but I asked in modding chat and they ran out of ideas why my game crashes when I start it with Talisman activated. All other mods are deactivated, I reinstalled Talisman, the folder isn't nested and I'm using the newest releases but I stil get this crash every time
Just don't use talisman then
Did you look into the lovely dump
It's needed for some mods
...small issue.
For what?
try switching your save file idk
I mean it's crashing for a reason
Already tried that, didn't work
¯_(ツ)_/¯
this line in the dump
go check it and see what it says and we might be able to trace back the problem
main.lua line 1476
What is the issue?
it just doesnt work fully
Uh yeah that's a card area too
whats the card area for it
Uhh
Sounds familiar so probably
yea G.pack_cards
if not check then
if not Talisman or not Talisman.config_file.disable_anims then
G.E_MANAGER:add_event(Event({
func = function()
local new_card = copy_card(card, nil)
new_card.ability.immutable.overflow_amount = 1
new_card:set_edition("e_negative", true)
new_card:add_to_deck()
new_card.ability.split = true
G.consumeables:emplace(new_card)
new_card.split = nil
return true
end
}))
else
local new_card = copy_card(card, nil)
new_card.ability.immutable.overflow_amount = 1
new_card:set_edition("e_negative", true)
new_card:add_to_deck()
new_card.ability.split = true
G.consumeables:emplace(new_card)
new_card.split = nil --This line is 1476
end
end
--stuff```
wow you're really trying huh buddy
i'm sure it'll embed the third time :3
take a screenshot of the lines around it
same thing.
I must say that mobile formatting sucks
How far?
Code?
i played around with some of the formatting so randomization would be easier, but here:
local oldcardareaemplace = CardArea.emplace
function CardArea:emplace(card, location, stay_flipped)
local g = oldcardareaemplace(self, card, location, stay_flipped)
if (self == G.shop_jokers or self == G.shop_vouchers or self == G.shop_booster or self == G.pack_cards)
and card.playing_card
and G.GAME.selected_back
and G.GAME.selected_back.effect
and G.GAME.selected_back.effect.center
and G.GAME.selected_back.effect.center.key == 'b_JCJ_incremental_pack' then
local roll = pseudorandom('incremental_pack')
local pool = (roll <= 0.05) and rares or normal_gains
local ability = pseudorandom_element(pool, 'incremental_pack')
card:set_ability(ability)
end
return g
end
This is the whole function
gifs are blocked i hate this place
it seems to randomize some cards, but not all of them
If someone may have a solution, ping reply please
I banned all the tarots and planets but the strength and pluto still appearing
Because they're the default consumables in those pools
oh, then i must set the planet and tarot rate to 0
Set the consumable types weight to 0 to make them not show up
i try but i'm too dumb and i cant do it works
How do i access a consumable's key?
card.config.center.key
So like G.consumeables.cards[i].config.center.key
Yes.
how can i get all cards that didn't score, in context.before?
local unscored = {}
for k, v in pairs(context.full_hand) do
if not SMODS.in_scoring(v, context.scoring_hand) then
table.insert(unscored, v)
end
end
awesome, thanks :D
Wait, line 1476 changed. It's now attempt to call nil value with this line: Notations = nativefs.load(talisman_path.."/big-num/notations.lua")(). Why is that a nil value when I start the game with talisman?
figured out how to make it instantly win if you collect all 5 pieces of exodia
(they're all each uncommon, so it would be a pretty low chance you'd actually end up getting them all)
I figured it out, for some reason card.playing_card is returning nil, any help?
(card.ability.set == "Default" or card.ability.set == "Enhanced")
this seems to have worked!
this always plays for some reason
SMODS.Sound({
key = "music_22exomythic4mecipe",
path = "music_22exomythic4mecipe.ogg",
volume = 1.5,
select_music_track = function()
-- check if the music_22exomythic4mecipe setting is enabled
--[[
if not (cryptposting_config and cryptposting_config.music_22exomythic4mecipe) then
return false
end
]]--
if (#Cryptid.advanced_find_joker(nil, "crp_22exomythic4mecipe", nil, nil, true))
or (#Cryptid.advanced_find_joker(nil, "crp_exomythicepicawesomeuncommon2mexotic22exomythic4mecipe", nil, nil, true))
or (#Cryptid.advanced_find_joker(nil, "crp_supa_rare", nil, nil, true)) ~= 0 then
return 1.2e308
--[[
else
return false
]]--
end
end,
})
ignore the commented out stuff was for config things but are now just waiting to be eventually fixed by procrastinating me
I set all to 0 and still appearing 😔
It's if next(Cryptid.advanced_find_joker(...))
still always plays
SMODS.Sound({
key = "music_22exomythic4mecipe",
path = "music_22exomythic4mecipe.ogg",
volume = 1.5,
select_music_track = function()
-- check if the music_22exomythic4mecipe setting is enabled
--[[
if not (cryptposting_config and cryptposting_config.music_22exomythic4mecipe) then
return false
end
]]--
if next(Cryptid.advanced_find_joker(nil, "crp_22exomythic4mecipe", nil, nil, true))
or next(Cryptid.advanced_find_joker(nil, "crp_exomythicepicawesomeuncommon2mexotic22exomythic4mecipe", nil, nil, true))
or next(Cryptid.advanced_find_joker(nil, "crp_supa_rare", nil, nil, true)) ~= 0 then
return 1.2e308
--[[
else
return false
]]--
end
end,
})
Remove ~= 0
ah
if context.after then
for _, card in pairs(context.scoring_hand) do
card:set_ability(G.P_CENTERS.m_stone, nil, true)
G.E_MANAGER:add_event(Event({
func = function()
card:juice_up()
return true
end
}))
end
end
end```hey, how do i make the scoring cards not go blank during scoring?
Remove , nil, true
if i see this upon booting up the game with a mod, did i fuck up or did the mod dev fuck up
sure, but now they look like stones when scoring
i didnt read chat but is this quantum enchancements
nope nvm
ignore me
Is that not what they're supposed to look like?
as far as im aware stone inherently hides the card front as soon as its applied
i want them to change to stone after scoring
which they do but then it oesnt make sense for them to look like tone when they arent stone yet
this is probably an event timing issue, return a func() with the transformation applied there
Then put , nil, true back and hook Card:should_hide_front
okay i might not be reading correctly, is the problem that they visually become stone cards too early or some other shenanigans
i just chucked the enhancement change under the function and it worked
yeah they were either blank or stone during scoring
ah well nice that it worked
what is the easiest way to test my mods
more context
wdym specifically with test your mods
like if i added a new joker or consumable or booster pack, what would the easiest way to test that be
DebugPlus
i have debugplus but i can't figure out how to do those with it
click 3 while hovering over the desired card in collections menu
better yet, in game, hold tab
youll see all debugplus shortcuts on the side
what's the key for the money/dollars sound?
how to put a delay() after returning a message? im guessing with an event but i dont know how to put messages in there
coin1
i'm making a custom enhancement, what should the texture look like??? i honestly have no idea how enhancement textures are formatted
so what are "badges" in the enhancement code
badges are the lil text on a card that say what it is
like "planet" "tarot" etc
for enhancements thats steel, stone etc i think
Each one of these is a badge.
Anyone know why this doesn't let WoF give negative edition?
local oldpolledition = poll_edition
function poll_edition(_key, _mod, _no_neg, _guaranteed, _options)
if _key == 'wheel_of_fortune' and G.GAME.used_vouchers['v_willatro_addict'] == true then
_no_neg = false
end
return oldpolledition(_key, _mod, _no_neg, _guaranteed, _options)
end
i think wheel of fortune passes an explicit table of editions as _options, which would bypass _no_neg entirely i imagine. this is done so that it's only foil/holo/polychrome even when other mods add other editions
you need to add e_negative (or whatever the key actually is) to the _options table in your if clause
Seems like wheel doesn't use _options at all.
alr i was just checking vanillaremade, i figure the actual vanilla code for WoF is a bit different then
key = 'unus',
loc_txt = {
name = 'Unus',
text = {
}
},
no_pool_flag = 'unus_annus_assimilated',
rarity = 3,
cost = 7,
atlas = 'Jokers',
pos = { x = 0, y = 0 },
blueprint_compat = true,
perishable_compat = true,
eternal_compat = false,
config = { extra = { chips = 0, chip_mod = 35 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.chips, card.ability.extra.chip_mod } }
end,
calculate = function(self, card, context)
if context.remove_playing_cards and not context.blueprint then
local removed_cards = 0
for _, removed_card in ipairs(context.removed) do
removed_cards = removed_cards + 1 end
end
if removed_cards > 0 then
card.ability.extra.chips = card.ability.extra.chips + removed_cards * card.ability.extra.chip_mod
return { message = localize { type = 'variable', key = 'chips', vars = { card.ability.extra.chips } } }
end
if context.joker_main then
return {
chips = card.ability.extra.chips
}
end
if next(SMODS.find_card("j_tica_unus")) then
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.3,
blockable = false,
func = function()
G.jokers:remove_card(card)
card:remove()
card = nil
return true
end
}))
end
end
}
name = 'Unus',
text = {
"This Joker gains {X:chips,C:white}+35 {C:blue} Chips",
"Whenever a card is destroyed.",
"{C:inactive} (Currently {C:chips}+#35#{C:inactive} Chips)"
},
},```
I don't even know if the rest of this works to be honest.
Oh, I actually already see an error unrelated to the nil thing, so I'm just gonna go ahead and fix that really quick.
first of all, you can get rid of the loc_txt table in the joker itself
then, in the localization file, use #1# and #2# to refer to the first and second variables you returned in the loc_vars function. so it'd be
text = {
"This Joker gains {X:chips,C:white}+#2# {C:blue} Chips",
"Whenever a card is destroyed.",
"{C:inactive} (Currently {C:chips}+#1#{C:inactive} Chips)"
}
(also that's nonstandard formatting, the "gains +x chips" part should be formatted with just +x being blue text like you had in the (currently +y chips) line)
pff... haha.
Okay, I understand completely what's going on now. That's silly.
That's a silly mistake. Yeah. Thanks for making me realize.
ouh thx
how to tell if context.drawing_cards is because of a hand or discard
you could always set an internal variable on a discard or hand
G.hand and G.discard according to smods wiki
or context.cardarea == G.hand its not clear
still stuck on UI code is anyone around that knows about it
I am really close to getting the variable colours to work but it's not working
if you meant "context.drawing_cards and G.hand" it dont work same with "context.cardarea == G.hand"
oh
does anyone know why this wouldn't be properly adding the values to the array?
v is the card being scored
is there a table of cards to be drawn/were drawn
so its trying to access the index of scoring hand that corresponds with that specific card
ohhh i see
replace _ with i
so itd just be adding like the number 2 or whatever lmao
and then instead of v put i
context.scoring_hand is numerically indexed
so context.scoring_hand[1] gets the first scoring card
so its a table that maps a number to a card
how do you apply an enhancement to a card with debugplus
Ctrl + w
I think
Hold tab for more info
thx
There are some Arabic Letters there, I'm translating it to Arabic, but the order is from Joker to Droll Joker
@rocky plaza
is context.end_of_round and context.individual good for triggering end of round on held effects on a enhancement?
What do you want to do exactly
do a conditional effect at the same context as gold cards
Yeah you could use that
oke cool
Make sure to set cardarea to G.hand
And whatever you’re doing should be in an event (preferably)
so context.end_of_round and context.individual and context.card_area == G.hand?
how do you get the card the enhancement is on from the enhancements calc function
is the card passed in the calc function the card the enhancements on
It would be context.other_card
That’s the joker
no this is the enhancements calc function
and how can a joker have an enhancement
Quantum enhancements
uhh
Then probably yes
I thought you were making a joker that does something with enhancements
... im taking a look and it seems you put everything in the Joker entry????
idk if i fixed it entirely but try this
Manual labor for free
no im just makign a enhancement
😭 why do i do this to myself
i mean once i noticed what was going on it was just a matter of ctrl c ctrl v
Oh God, Now I see, That's why I need to sleep well
Thank you from everything that's in me
debugging a 3k+ line loc doc 💀
Why would you thank him for everything inside you
...depends on what kinda ui stuff u need to do
I am trying to get a UI node to have a variable colour
Why do you have to question everything?
I've been trying for three days and right now I am VERY close
can i see the ui code
sorry-
Dev issues
please specify by very close
I have everything working except 1 thing
and that 1 thing is that the UI refuses to update after being drawn
(yes I am running recalculate it doesn't work)
so i've got this bar
with 16 nodes on it which is like a meter
corresponding to a value of 16, and when it's 15, one of the nodes should turn to inactive colour
uhuh
if I turn the value to 15 before opening the UI, everything works as intended
i see
but I need it to change while the UI is open
which it won't do, even if I change the value while the UI is open and then run recalculate
ok
hmmm can i see the ui code for the 16 nodes
and their parent container
atp it's close enough to completion I don't really need to blur the content I'm not cool enough for people to want to steal from me
function Jokebox.uibox_variable_colour(i)
if Jokebox.Quickhack.VRAM >= i then
return {
n = G.UIT.C, config = { minw = 0.6, minh = 0.9, colour = G.C.GREEN, align = "cm" }
}
else
return {
n = G.UIT.C, config = { minw = 0.6, minh = 0.9, colour = G.C.INACTIVE, align = "cm" }
}
end
end
I just run this 16 times with different values to put in all the nodes
which is run in here
the rendering of those nodes works, they just don't update when I run G.OVERLAY_MENU:recalculate()
and I feel like it would look ugly if I closed and reopened the entire UI because it comes in from the bottom again
unless I can make it show up instantly to cover up the closing/entering
idk how to do that
and yes, I tried a thousand other ways to make the variable colours work, nothing worked besides returning the same node with different static colour values
hmm
if JokeBox.Quickhack.VRAM is a number
it is
hmmm
if I set VRAM to 8 before opening it, half the nodes turn to inactive as they should
the issue is that I need it to update while the UI is still open
that or I need to skip/remove the animation for the UI sliding in
so I can instantly make the updated UI appear
worst comes to worst I might be able to fast forward the ingame clock by a second to skip that
but that's obviously not an elegant solution
what values does it range from
0 to 16
I have code in place for it to never go below 0
it starts at 16 and is subtracted by 2/4/8 when you "spend" it on stuff in the menu
it won't let you put it into negatives
and the UI closes if it is ever <= 1
because you spent all the resource
after which the value resets for the next time
this code will only run once if you have the corresponding joker when the boss blind is selected, but it's easier to just run the function manually for testing purposes, so I do that with debugplus
nothing changes between those two entries
in the config of the node whose children is the 16 ui boxes add
func = "update_quickhack_ui"
then outside that add
G.FUNCS.update_quickhack_ui = function(e)
for i, child in ipairs(e.children) do
child.config.colour = ((i <= Jokebox.Quickhack.VRAM) and G.C.GREEN) or G.C.INACTIVE
end
end
this is based off of what I did for my dynamic ui
that just might work
idk give it a shot
it didn't work
maybe it's because these are now being defined by functions
if I change them back to regular nodes it might work
This happened to me too when trying to update ui colors
this changed nothing
they're all green still
waait
wait
is it all green regardless of the quickhack value
shit I figured it out
what was it
ah'
trying again
yeah it needs to be a string
it did change something yeah
maybe I fucked up the padding
yeah no it's still not updating and it should not be a solid bar
wait
i know why it's doing that
oops
?
i put the func in the wrong node