#Blank Joker (Idea)

235 messages · Page 1 of 1 (latest)

rotund nova
#

I have no idea how to make it work, but I was wanting to make a Joker that has a 1 in 2 chance of copying the ability of a different Joker you have, and rerolls itself after each hand. I do wanna learn how, but I have no experience with coding.

#

I adjusted the wording, because I felt like it might have been unclear.

(Did it again, as I kinda wanted it to be a less reliable take on Blueprint).

#

I'm thinking that it shouldn't be able to target Blueprint or Brainstorm in order to keep its somewhat random theme in mind.

slate rune
#

how about instead of making it luck based, just make it copy a random joker that changes each round

#

the wording could go like this

Copies a random held Joker's ability
Changes each round
#

that could be cool as a visual indicatator as to what the Joker is copying

#

and the rarity could either be Uncommon or Rare

#

Uncommon because of the uncertainty that it brings or rare because of the fact that it can copy a random Joker's oh which may be a legendary joker's ability that it's copying unless ofc it's Chicot

rotund nova
rotund nova
#

Yes

untold reef
#

Maybe add a (currently X)

rotund nova
#

Imagine how Wee Joker would look inside of it.

#

I'd like to see an alt version with "changes every hand" instead.

untold reef
#

Could show the joker it's copying's description as one of the popup descriptions beside it

slate rune
#

hmm wouldn't that be too chaotic?

rotund nova
#

I've seen some mods that just have a less-balanced version up for download.

slate rune
#

you can't control what joker it will copy next even when in tight situations

honest siren
#

a) yes
b) you have to check for context.setting_blind for when a blind is being selected; I believe there’s something similar for when the cards are drawn but I don’t remember the name

#
calculate = function(self, card, context)
    if context.setting_blind then
        --write effect code here
    end
end
#

No

#

It triggers whenever calculate() is called, which is on any action

#

You use context to figure out if it’s on hand played

#

The vast majority of joker effects are calculated like this

#

soul_pos = {x = 0, y = 0},

#

This is all you need to set up a soul sprite in the code

#

It doesn’t look like Steamodded has support for using two different atlas yet

#

So what you’d need to do is copy the atlas from the game files and add the Blank Joker sprite to it

#

Then when you select a joker to copy, it should look for its pos and set that as its soul_pos

#

To get the effect you want, you may also need to write some lovely patches to render the other joker smaller than usual

#

I did some messing around with soul drawing code for Cryptid and you could probably just change the base value of the variable scale_mod for that

#

Line 36 is the relevant patch

#

Hologram shader could also go hard with that (and it’s handled the same way)

#

One step at a time, ye

#

What part are you saving, the name or the entire card data?

#

It should be a variable that you can replace with soul_pos

#

Something like card.pos or card.config.pos

honest siren
#

The suit is selected dynamically like the joker would be

#

And I have to run it through localization

rotund nova
#

Wouldn't the little side tooltip be nice to help ensure better mod compatibility?

#

Fair enough.

#

I didn't think this would be as complicated as it seems to be.

#

Then again, I'm basically at the level of coding equivalent to "i don't know how to make a double piston extender in Minecraft".

honest siren
#

Ohhhh

#

that for jokers is not fun

#

I got it working with a specific joker and I had to use lovely patches and it wouldn’t be easily extensible to any joker like what you want

rotund nova
#

Is lua that bad?

#

Ohhhh.

honest siren
#

Well the docs is incomplete and what you have left is just a random game dev’s code

#

Which is not easily designed to support mods

#

You should’ve seen what it was like in the days of the demo

honest siren
#

X is background color, V doesn’t matter for what you’re trying to do

#

For Dropshot it’s used to get the color of the suit correctly

#

C:inactive makes the text that light color for things like (Currently: )

#

That’s for the loc_vars

#

Idk how exactly localization works for jokers but you’ll have to find the Joker’s ID and pass it in with the right parameters

#

{C:inactive}Currently: #1# can work for the string

#

Yes

#

But use inactive instead of grey

#

Also add one space before and after since the game uses that for padding in other cases

#

Something like "{X:inactive,C:white} Currently: #1# "

honest siren
#

Look at Dropshot

#

I use a default value if the card is nil

#

And then you’d need to find the ID and use the localize() function to get the name

#

You would need to wrap anything you want to vary in loc_vars

#

Something like <has a copied joker> and "" or "Copies the ability"

#

Basically it won’t print out anything if isn’t copying anything, but it’ll print “Copies the ability” if you’re in the collection

#

It’s the equivalent of a ternary operator in Lua

#

There’s probably an easier way that the smart people in #⚙・modding-general know about for swapping out two descriptions but this is one way that…works

#

Ah

#

You’d probably want to wrap that check around each part of the last line

#

So like {C:inactive}#1#{X:inactive,C:white}#2#{C:inactive}#3# (#2# is your current check)

#

That might be a bad way of doing it but basically you’re just making everything a loc_var

#

and checking if it should be displayed before displaying it in the loc_vars function

#

The easier way is to just display a default in the collection like every other similar joker does

#

so you can just write {what you’d normally display} or "Joker"

#

might need to check a few tables up if they’re defined so you don’t index a nil value

honest siren
#

It has to be returned in this format:

#

return {vars = {var1, var2, var3}}

#

Vars is just trying to replace #1#

#

So you’d just do util.is_in_your_collection and "Joker" or (joker stuff)

#

Also you will probably want to localize that

#

Why are you doing this

#

But yeah it’s pain

#

The UI library sucks too

honest siren
#

Save it in card.ability

honest siren
#

Just write something like card.ability.copied_joker = other_joker when you pick a joker to copy in calculate()

#

You might need to pull from P_CENTERS to grab all that again

#

Or if you’re copying a Joker you have, maybe just save its name and sort_id which you can reference later

#

Those are in joker.ability.name and joker.sort_id

#

sort_id is unique for each card, hence why I recommend it

#

No

#

Just iterate through G.jokers.cards until it has a matching sort_id

rotund nova
#

I never thought to include Blueprint or Brainstorm in the list of Jokers it could copy.

untold reef
#

Now do a joker that has a soul position like hologram

rotund nova
#

YOOOOOOOOO

rotund nova
#

How's it going?

honest siren
#

The person who was coding it got false banned and unbanned which is why all their messages vanished

#

But iirc they got the thing where you can visually see what joker Blank Joker is copying working

rotund nova
#

Ahhhh...

reef solstice
#

Indeed, the visuals aren't just 100% how I want them yet

#

I can't get them to scale down properly

reef solstice
#

PROGRESS has been made.

rotund nova
#

YOOOOOOOOOOOO!

tawdry wing
reef solstice
#

We ballin

rotund nova
#

Might I request a standalone version of the Blank Joker?

#

I remember seeing something about a mod thing with the screenshots that got wiped, and I'm down for it being there, but I do wanna experiment with the Blank Joker on its own.

reef solstice
#

sure

reef solstice
#

I'll finish it up, clean up the code and then send you a zip

reef solstice
reef solstice
#

I'll write a little standalone

reef solstice
#

@rotund nova ^

honest siren
reef solstice
#

Yeah I just tested it aswell, hold up

#

(Me when I release a mod that crashes your game)

#

Me when I dont add the code to inject the shader

#

smh my head

rotund nova
reef solstice
#

Aight, its updated kids

honest siren
#

perfect, now I can put it in my modpack

reef solstice
#

!!!

honest siren
#

which is literally just installing every 1.0 mod until it breaks

reef solstice
#

lmao

honest siren
#

(hasn't broken yet)

reef solstice
#

erm, what the sigma

honest siren
reef solstice
#

its working for me!!! your fault

#

(what build steamodded are you on)

honest siren
#

0531a

reef solstice
#

?!

honest siren
#

the update to Steamodded literally just lets achievement enabler work

reef solstice
#

You have all the files?

honest siren
#

wait where are you installing Blank Joker?

#

are you putting it in its own folder?

reef solstice
#

Mods/standalone_blankjoker/(code in here)

honest siren
#

ok maybe it's because I didn't delete the old version

reef solstice
#

Yeah, probably

#

(copium)

rotund nova
#

Damn, it crashed.

honest siren
#

no that didn't fix it

reef solstice
rotund nova
#

What's the error specifically?

reef solstice
honest siren
#

bad argument #1 to 'newShader'

rotund nova
#

So I can compare mine.

reef solstice
#

Just show me yours

honest siren
#

wait I have an idea

#

of how we might be able to fix this

#

lemme try it

reef solstice
#

Aye captain

rotund nova
reef solstice
rotund nova
#

Oh. Do I just slap Steamodded 1.0.0 in my mods folder and take out the old version?

reef solstice
#

Yee

#

might need to reverify the steam files

#

1.0.0 is the main branch btw

rotund nova
#

Why did it tell me 0.9.8 was the latest release in the install wiki?

reef solstice
#

becaus e1.0.0 is pre-release-alpha

honest siren
#

ok I think my fix worked

reef solstice
#

not released yet

honest siren
#

for some reason LOVE (the game engine) doesn't like reading from my mods folder

reef solstice
#

👀

#

aha

rotund nova
#

Well, I can't seem to find it.

honest siren
#

I had to do a similar fix to get CustomFont working but I basically move the file to a folder it likes and then delete it

rotund nova
#

Maybe I'm just beeg dumdum.

reef solstice
honest siren
rotund nova
#

How do I find the main branch?

honest siren
#

here's the patched lua file

reef solstice
reef solstice
rotund nova
#

I don't know what that means.

honest siren
#

shader doesn't work with modded jokers but I think you already knew that

#

looks sick though

reef solstice
#

if there's a way to extract the atlas of a joker, that might fix it

#

lmk if you know a way and ill add it

rotund nova
#

Oh.

#

I really was being stoopid

#

And it still crashes.

reef solstice
#

You have other mods

honest siren
#

uninstall that mod

reef solstice
#

you need to remove them

#

they aint compatible with 1.0.0

#

Aight final release now (I beg)

#

(Still the same link:)

honest siren
#

also would be cool if blank joker copied more than just scoring

reef solstice
#

Such as?

honest siren
#

ex. $ gain from mail-in rebate

#

or other things that blueprint can copy

reef solstice
#

it works exactly like blueprint

#

idk if $ works

#

it should

#

Feel free to test

honest siren
#

oh yeah I think BP is incompatible with that

reef solstice
#

^

honest siren
#

seeing double just isn't working btw

#

probably not because of your mod though

reef solstice
#

Cant be my mod because I literally just copied the blueprint code lol

vale fiber
#

Are you able to make a 0.9.8 version? balatroheart 👉🏼👈🏼

reef solstice
#

hmmm

reef solstice
#

I had a look at it and gave it a shot, but it's hell

#

1.0.0 makes our lifes so much easier already

#

@honest siren idk if it works for you, but the scoring stopped working for me

honest siren
#

That was happening with Seeing Double, and appears to not be caused by Blank Joker

#

And then some things that weren’t blueprint compatible it didn’t copy

reef solstice
#

it isnt working for me with like.. any joker it seems

#

Sometimes it does

#

Sometimes not

#

Lusty Joker, for example

#

for some reason aint scoring

#

I fixed it

#

I think it was a not needed if context.joker_main then wrap

#

@honest siren

#

I'll update the release

#

Might fix your issue aswell, lmk when you test it

echo shell
#

Hi @reef solstice can I include this mod into my modpack?

reef solstice
#

feel free to