#đŸ’»ăƒ»modding-dev

1 messages · Page 35 of 1

solemn coral
#

I know there's another trick you can use where you hook into Card.add_to_deck that does the same thing in 0.9.8 mods, but this is much more convienent and keeps all the code for one joker in the same place

crisp coral
#

yup, you had to hook in 0.9.8

solemn coral
#

In fact, a lot of my jokers right now still use that old trick and I need to switch them over to the new method

solid salmon
#
    key = 'blue_joker',
    loc_txt = { 
      name = 'Blue Joker',
      text = {'{C:blue}+2{} hands but {C:red}-1{} discard'}
   },
   rarity = 2,
   pos = {
      x = 0,
      y = 0
   },
   cost = 5,
   discovered = true,
    add_to_deck = function(self, card, from_debuff)
        G.GAME.round_resets.hands = G.GAME.round_resets.hands + 2
        G.GAME.round_resets.discards = G.GAME.round_resets.discards - 1
        ease_hands_played(2)
        ease_discards_played(-1)
end,
    remove_from_deck = function(self, card, from_debuff)
        G.GAME.round_resets.hands = G.GAME.round_resets.hands - 2
        G.GAME.round_resets.discards = G.GAME.round_resets.discards + 1 
        ease_hands_played(-2)
        ease_discards_played(1)
end
} ```
#

@solemn coral would this work?

solemn coral
#

It's ease_discard, not ease_discards_played, but other than that it should, yes

solid salmon
#

ok

solemn coral
#

You should really look into getting that source code available.

#

It's got all those functions inside there so you can look yourself if you have any questions

crisp coral
#

by the way, isn't Blue Joker a base game Joker already?

#

it's going to cause conflicts with that one without a doubt

solemn coral
#

Don't mods automatically prefix their IDs so there isn't any conflicts?

crisp coral
#

vanilla uses exclusively names

#

not keys

brisk pond
crisp coral
#

no?

brisk pond
#

well

crisp coral
#

Blue Joker is the one that gives chips per card in deck right

solid salmon
#
  key = 'scalper',
  loc_txt = {
      name = 'Scalper',
      text = {'Adds {C:blue}+5 sell value of all other owned Jokers to Chips'}
  },
  rarity = 1,
  pos = {
      x = 0,
      y = 0
  },
  cost = 5,
  discovered = true,
  calculate = function(self, card, context)
    if G.STAGE == G.STAGES.RUN then
        if self.ability.name == 'Scalper' then
            local sell_cost = 0
            for i = 1, #G.jokers.cards do
                if G.jokers.cards[i] ~= self and (G.jokers.cards[i].area and G.jokers.cards[i].area == G.jokers) then
                    sell_cost = sell_cost + G.jokers.cards[i].sell_cost
                end
            end
            self.ability.mult = sell_cost
        end
    end
end
}```
brisk pond
solid salmon
#

Eremel said that i'd have to change a part if the function as well

#

but i don't know what to change calculate into

wintry solar
#

update

solid salmon
#

oh

#

so card.update

#
  key = 'scalper',
  loc_txt = {
      name = 'Scalper',
      text = {'Adds {C:blue}+5 sell value of all other owned Jokers to Chips'}
  },
  rarity = 1,
  pos = {
      x = 0,
      y = 0
  },
  cost = 5,
  discovered = true,
  local card_update_ref = Card.update
  card.update = function(self, card, context)
    if G.STAGE == G.STAGES.RUN then
        if self.ability.name == 'Scalper' then
            local sell_cost = 0
            for i = 1, #G.jokers.cards do
                if G.jokers.cards[i] ~= self and (G.jokers.cards[i].area and G.jokers.cards[i].area == G.jokers) then
                    sell_cost = sell_cost + G.jokers.cards[i].sell_cost
                end
            end
            self.ability.mult = sell_cost
        end
    end
end
}```
solid salmon
#

Now i gotta release it

lament zealot
solid salmon
#

I just did

#

@lament zealot

#

But there might be a problem

lament zealot
solid salmon
torpid dagger
#

How would I make something have an effect that would trigger once per blind when any hand containing a pair is played?

cobalt nexus
#

any advice on how to get into modding? especially for jokers?

wintry solar
zealous glen
#

Is there any mod using SMODS.eval_this

#

LobotomyCorp and I had a typo

crisp coral
#

wuh what happen

zealous glen
#

It still doesn't work :<

zealous glen
# crisp coral wuh what happen

This crashes the game

 if context.joker_main then
            if card.ability.extra.chips > 0 then SMODS.eval_this(card, {chip_mod = card.ability.extra.chips, message = localize{type = 'variable', key = 'a_chips', vars = {card.ability.extra.chips}}}) end
            if card.ability.extra.mult > 0 then SMODS.eval_this(card, {mult_mod = card.ability.extra.mult, message = localize{type = 'variable', key = 'a_mult', vars = {card.ability.extra.mult}}}) end
        end
crisp coral
#

?? did they change something to eval_this

zealous glen
#

Idk. Does you code work?

#

okay adding colors make it work

edgy reef
#

Don’t tell me it’s that specific “engine/ui” crash relating to “colours” being nil

crisp coral
#

seems like so from the sounds of it

#

my eval_this has color

shell tangle
#

Still a bit new to the calculate section of jokers, if I want to add something like cavendish, but it needs 2 flags from other jokers, I'd use add_to_pool under calculate, right? And, if so, what context do I use to check for it?

zealous glen
#

but I'm 200 commits behind apparently

zealous glen
#

I'm not sure because I think Steamodded recently added a helper function for that

shell tangle
#

I thought add_to_pool was that helper function,

zealous glen
#

I can speak of what happens in the background in vanilla. Basically you just need to set a flag to true or false as appropriate yes_pool_flag or no_pool_flag. Since you want it to depend on two Jokers, you need 2 or 3 flags, but only the last one is associated with the Not!Cavendish.

#

Each individual Joker should check the first or first two flags, and depending on their values they should set the third.

#

The context they check should be the context associated with whatever action you want to affect Not!Cavendish's availability

shell tangle
#

Where do I find the code for yes/no_pool_flag? I only know of it being set in game.lua when it's set as a variable, haven't gotten a good idea of how it works yet.

zealous glen
shell tangle
#

I mean, that's where I'm looking, just haven't found it anywhere else yet.

zealous glen
#

It's used in get_current_pool

shell tangle
#

Just found it in common events, thanks.

brisk pond
#

guys I added 7/41 Jokers and the mod file is already 691 lines long, do I split the code in multiple files?

crisp coral
#

0.9.8 bunco is 4395 lines long i think you're fine

queen scroll
#

i don’t think that’s necessary unless you really want to

queen scroll
#

OMG I MISCLICKED

crisp coral
#

L

queen scroll
#

never thought this would be me

night pagoda
brisk pond
#

how do I use the load function? I need to use a specific syntax inside the helper file?

crisp coral
brisk pond
#

i tried looking at the lua manual but brainError

zealous glen
#

You can register the Joker inside or return it and build it with the return

brisk pond
#

suppose i have

mainfolder:
  main.lua
  jokers:
    my_joker1.lua
    my_joker2.lua

and inside my_joker1.lua I have the SMODS.Joker = {}

#

i do loadfile('jokers/my_joker1.lua') in main file?

#

apparently no because it is considered a nil value and the game crashes

zealous glen
#

Oh Idk what’s loadfile

#

But the two ways that I know of loading files in Lua would require the entire path of the mod

#

In whatever PC it’s in

brisk pond
#

load(SMODS.current_mod.path.."jokers/08_RobinHood.lua") in main file
Jokers aren't loaded into the game

crisp coral
#

uhm load is a love2d function

#

so call it with NFS.load

brisk pond
#

Context for those who started reading this now:
This is my mod's folder

mymod/
- main.lua
- jokers/
    - joker.lua

The joker.lua contains multiple SMODS.Joker initializations.
How do I load the Jokers from joker.lua into the main mod file?

frosty dock
#

load(NFS.read('jokers/joker.lua'))(), basically

#

NFS.read gets the file content as a string, load turns it into a function which you can then call

brisk pond
#

moment of truth...

crisp coral
solid salmon
#

How do i announce my mod to some people

frosty dock
#

SMODS.current_mod.path .. 'jokers/whatever.lua'

frosty dock
#

we had some issues with lua_reload and using require, for some reason

zealous glen
# fast badge

I was using require but it didn’t work with 1.0

#

The / were turned into \

#

So I changed to NFS.load

fast badge
#

Well this mod is in 1.0 and it works

#

so idk

zealous glen
brisk pond
zealous glen
#

this is how I do it

SMODS.Joker(NFS.load(SMODS.current_mod.path .. "modules/jokers/" .. "filename.lua")())
#

the file itself just returns the table you'd pass as input. it can also NFS.load other files inside

brisk pond
#

🙂
it runs perfectly

night pagoda
#

Does 1.0 steamodded have deck functions in it yet?

#

ah yes, I see these in the wiki now, was looking at the wrong place

quasi kettle
#

does anyone know how to refrence the card that are played in a hand but not scored?

crisp coral
#

context.full_hand includes unscored cards

#

you'll still need to isolate the scoring ones though

quasi kettle
#

Sounds good

#

Thanks

quasi kettle
#

for anyone that is trying to pull the non scoring cards in a played hand this worked for me

function non_scoring_cards(full_hand, scoring_hand)
        local nonscore = {}
        for k, v in ipairs(full_hand) do
            nonscore[#nonscore + 1] = v
        end
    
        for k, v in ipairs(scoring_hand) do
            for i = #nonscore, 1, -1 do
                if nonscore[i] == v then
                    table.remove(nonscore, i)
                    break
                end
            end
        end
    
        return nonscore
    end```
outer hedge
#

for some reason ease_dollars is activating every frame and idk how to stop it

        return {vars = {card.ability.extra.dollars, card.ability.extra.mult}}
    end,
    update = function(card, card)
        card.ability.extra.dollars = -(G.GAME.dollars - 20)
    end,
    calculate = function(self, card, context)
        if context.end_of_round and not context.blueprint then
            if G.GAME.dollars ~= nil then
                ease_dollars(card.ability.extra.dollars)
            end
        end

        if context.joker_main then
            card.ability.extra.mult = math.abs(card.ability.extra.dollars)
            return {
                mult_mod = card.ability.extra.mult,
                card = card,
                message = localize {
                    type = 'variable',
                    key = 'a_mult',
                    vars = {card.ability.extra.mult}
                }
            }
        end
    end,```
#

it should set the money you have to 20 and add a mult from how much you lost/gained

#

but it keeps adding the money and it should only do it one time

zealous glen
#

I’m gonna guess it’s that update function

outer hedge
sly forge
outer hedge
sly forge
#

in that case, just set money to 20 if context.end_of_round

#

(ok, I know that's not the whole story)

#

there's this thing called dollar_buffer. your actual money isn't G.GAME.dollars, it's that + dollar_buffer

#

try looking at base game jokers that contain dollar_buffer

outer hedge
#

i got it working thanks

night pagoda
#

does anyone know if the tag api in 1.0 even works?

#

can't find any info on that

outer hedge
#

is there a reason why my vars are not showing up in the desc?

    pos = {x = 7, y = 0},
    cost = 9,
    unlocked = true,
    discovered = true,
    blueprint_compat = false,
    eternal_compat = true,
    perishable_compat = true,
    loc_txt = {
        name = "Revolutionary Joker",
        text = {
            "At end of round set {C:money}Money{} to {C:money}$#3#{} and add","a {C:mult}Mult{} depending on how much money was","{C:attention}lost/gained divided by 2{}","{C:attention} self-destructs{} if amount of money ever exceeds {C:money}#4#{}","{C:inactive}(Currently a difference of {C:money}#1#{} {C:inactive}dollars with a mult of {C:mult}#2#{}{C:inactive})"
        }
    },```
wintry solar
#

are you passing all the vars? looks like 3 and 4 aren't being found

solid salmon
#

How do i make card packs

zealous glen
outer hedge
wintry solar
#

just add your other variables to the table in it

zealous glen
#

'innit

outer hedge
#

oh i see now

maiden veldt
#

is there any way to change the weights of booster packs? if so, how?

mellow sable
#

They’re just numbers in the code

#

I forgot where but that’s how I got the rates for Immolate

analog spoke
#

I'm trying to learn how to mod, and I've looked into the wiki thing as well as (tried to) look at the base game joker code
I can't really tell how things are done yet though, primary thing I've been trying to figure out is exactly where the information about joker abilities and stuff are
I'm not really sure how to translate anything into a mod file either
I found an joker mod with a single joker in it in the modding page that I've been looking at and trying to experiment with to try and figure out how things work and how to do things but I'm still pretty lost
so far, I've figured out how to change the joker's name in game, change it's art, and, I think, change it's description, but I've yet to try that one yet, but I do think I've found where it's done
any tips on learning how to make a joker?

scarlet merlin
#

yo, is it possible to have a floating component over a normal card (like legendaries) but the floating component is larger than 71x95?

#

this is the card in question

thorn lava
#

idk if this is asked a lot, but does anyone know why this isn't working? the Mods button isn't even showing up on the main screen

near ivy
#

wait whats up with the border?

#

seems off

thorn lava
#

but idk about making it bigger without that

mellow sable
#

Probably possible if you mess with the spritesheet logic for it

analog spoke
#

I have an idea, but am unsure if it would work as I haven't made a mod before

mellow sable
#

You could do something similar to photograph to make the sprite a different size and then just use that to draw the sprite of the joker

analog spoke
#

you might be able to have the base sprite be sideways then turn it afterwards
it looks like the head sprite might be able to fit in a 95x71

scarlet merlin
#

is it possible to put the horns on a different frame?

#

dunno

scarlet merlin
near ivy
#

ah

scarlet merlin
#

well the threetwo things i need are:

  1. Fitting the full bull over the BG
  2. Have that replace the bull
  3. ||Replace the bull with the below image when you have $0 or less||
#

||the full intention being that drspectred discovers this ingame, so I guess it also needs to be not visible in the collection||

edgy reef
scarlet merlin
#

i should get @regal wolf here too

edgy reef
#

The only issue you'd face is that soul_pos doesn't take a custom atlas, at least for base game.

scarlet merlin
#

what does it mean for something to have a custom atlas?

regal wolf
#

sprites exist inside of an "asset_atlas"

scarlet merlin
#

ahhh

edgy reef
#

Joker sprites are by default 71x95.

regal wolf
#

which points to the sprite sheet, posx and posy etc

edgy reef
#

And the size for this is larger than that

regal wolf
#

i have hardly used custom atlas' tho

scarlet merlin
#

should it be possible to just disable bull

#

and then replace it with a modified version?

#

or would that break things

regal wolf
#

it is possible yes

#

you can just overwrite the atlas entry

#

I just dont really know how to do that yet

#

so ill need to read up about it

#

unless someone wants to help xd

regal wolf
spice scroll
#

would be interested to see the code for this since i plan on having a similar card

thorn lava
#

does anyone know if playing modded balatro has a chance of breaking a save file? is it recommended to make a new profile? or is there something to account for that e.g. no cloud saving is done when launching with mods?

spice scroll
#

how would i check if the deck is a certain type? like in an if statement

#

also, how would i check if the player owns a certain voucher

#

G.GAME.used_vouchers?

unkempt thicket
spice scroll
#

ty

shell tangle
#

Anyone have any idea which file I should search for to find the code that loads the draggable card on the main menu?

mellow sable
#

if you want to modify its contents, you can look at code from Talisman or Brainstorm which do this

#

Don’t remember where the code I modified was

shell tangle
#

Appreciated, hopefully I'll have better luck searching through them.

mellow sable
#

# Show a Gold Seal to confirm Talisman is Active
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = "replace_card.states.visible = false"
position = "before"
payload = "replace_card:set_seal('Gold', true, true)"
match_indent = true
overwrite = false

@shell tangle

shell tangle
#

Perfect, found what I wanted, thanks.

mellow sable
#

yw

rough furnace
#

hello "developers"

spice scroll
#

hi

fallen tendon
#

Hi

rough furnace
#

I haven't done any development in a while

#

I should

crisp coral
#

hello

wild gyro
#

hi

fallen tendon
#

Maybe you should make a mod that adds a joker

#

Maybe 2

#

Maybe more

#

Or turn balatro into minesweeper im not one to judge

rough furnace
#

I have some things I want to add to debug plus

crisp coral
#

yooooo

#

big if true

spice scroll
#

anyone know offhand where the code for determining if something contains a specific hand is stored

#

think i got it, misc functions

zealous glen
#

@scarlet merlin yes you can make it like this

spice scroll
#

what do i have to put into get_flush()/get_straight()? i thought it was context.scoring_hand but nope

zealous glen
crisp coral
#

usually there's only one so you can do get_straight(context.scoring_hand)[1] iirc???

spice scroll
#

is that used for if a scoring hand contains a flush/straight?

#

like

crisp coral
#

if you're just doing contains then do next(get_flush(...))

scarlet merlin
zealous glen
#

Maybe you could do without but this was straightforward to make

spice scroll
#

ok i have no idea where to even begin tbh

#

actually maybe ill try a different way of going about it

#

but the mult/chips being set to 0 doesnt seem to be working either so

#

hm

frosty dock
#

context.poker_hands exists

spice scroll
#

is that used for a hand containing a pokerhand or the scared hand being a poker hand

#

either way the calculating if there is a flush seems to be working i just need to figure out how im going to not allow a hand to be played

frosty dock
#

I think you need to do it via Blind:debuff_hand, otherwise you can't stop calculation

spice scroll
#

so i gotta hook that yea

frosty dock
#

yeah, hook that instead of using a calculate function and check if your joker is present there

spice scroll
#

i am guessing thats the issue with this btw but it might be something else

spice scroll
#

ok fixed that

#

FINISHED.

#

now onto probably the two hardest cards that are by themselves

narrow pollen
spice scroll
#

im guessing the straights by the name

#

but sure, if youre fine with it (ill give credit)

narrow pollen
#

yeah, figured the context would make it obvious

#

bet

#

you know what, actually

#

i could probably make this code like more effecient for both of us, gimme a sec

spice scroll
#

gotcha

spice scroll
#

i do not have that joker why isnt it allowing that hand

crisp coral
#

find_joker alone returns a blank table

#

which passes the if

spice scroll
#

yeah i figured out i was missing the next

#

thhank u tho

#

which context is right after a hand is scored?

#

just gotta find out where to update the ability of this joker then it should be done

spice scroll
#

oh thanks

#

with the forums would show the posts even if they havent been talked in in a while :/

spice scroll
crisp coral
#

G.GAME.current_round.hands_played + 1

#

clearly

#

context.after works i think?

spice scroll
#

will try it

#

oh yeah cause of rule 5

#

i think i asked you if i could use the code from one of your jokers and you said yes? but just in case i didnt is that ok

#

my memory is so bad lol

crisp coral
#

i dont mind

spice scroll
#

cool

#

also context.after isnt rly what im looking for since im just trying to get the "currently x mult" to update right after a hand is played

night pagoda
#

TIL the chip color in the code doesn't match chip color in the sprites

#

009cfd vs 009dff

#

unplayable

spice scroll
#

0/10

narrow pollen
#

@spice scroll this is what you want it to do, right? (also works with JQKA2 and KA234)

#

your custom joker, i mean

spice scroll
narrow pollen
#

straight flush is basically detected by going

#

"is this hand a straight and a flush at the same time? okay go"

spice scroll
#

gotcha

#

but yeah thats basically it

narrow pollen
#
function get_straight(hand)
  local base = get_straight_ref(hand)
  local results = {}
  local vals = {}
  local verified = {}
  local can_loop = next(find_joker('Superposition'))
  local target = next(find_joker('Four Fingers')) and 4 or 5
  local skip_var = next(find_joker('Shortcut'))
  local skipped = false

  if not(can_loop) or #hand < target then
    return base
  else
    table.sort(hand, function(a,b) return a:get_id() < b:get_id() end)
    local _next = nil
    for val=0, #hand*2-1 do
      local i = val%#hand + 1
      sendDebugMessage("Card "..i.." is "..hand[i].base.value)
      if #verified > 0 then
        if SMODS.Ranks[verified[#verified].base.value].next[1] == hand[i].base.value then
          sendDebugMessage(hand[i].base.value.." comes after "..hand[(val-1)%#hand + 1].base.value..".")
          table.insert(verified,hand[i])
          skipped = false
        else
          if skip_var and not skipped then
            sendDebugMessage("Skipping because Shortcut.")
            skipped = true
          else
            sendDebugMessage(hand[i].base.value.." does not come after "..hand[(val-1)%#hand + 1].base.value..".")
            verified = {}
            val = val - 1
            skipped = false
          end
        end
      end
      if #verified == 0 then
        sendDebugMessage("Starting new straight.")
        table.insert(verified,hand[i])
        skipped = false
      end
      if #verified == target then
        break
      end
    end
    if #verified < target then return {} end
    return {verified}
  end
end```
#

yes i use a 0-base loop; makes working with modulus much less annoying.

spice scroll
#

so this is just going in main yeah?

#

wait which version are you on is this a 1.0.0 thing

night pagoda
#

unplayablex2

wintry solar
spice scroll
wintry solar
#

Does it not work with just updating the number played when you calculate the xmult?

#

That should dynamically update your tooltip

spice scroll
#

it does but the problem is when it updates when the xmult is calculated, the hands_played variable hasnt incremented yet

wintry solar
#

Can’t you just increment it there?

spice scroll
#

hands_played increments automatically

#

as in its a built in variable for balatro

wintry solar
#

Oh right

#

You could just keep an internal counter too for your calculation

spice scroll
#

i suppose so

wintry solar
#

When does the built in one update?

spice scroll
#

lemme try and find it

#

after G.FUNCS.draw_from_play_to_discard()

wintry solar
#

Yeah if you want it to update before that then you’ll have to keep an internal counter

spice scroll
#

gotcha

#

actually wait then it wouldnt work with judgement generating it mid round

#

and i run into "when do i update the counter"

narrow pollen
#

that's coding for alpha

solemn coral
#

Extraordinarily annoying limitation of the base game - there's code to let cards held in hand give Mult, there's code to let them give xMult, but there's no code to let them give Chips.

#

Does anyone know how I could get a card to give Chips in the same way that Shoot the Moon gives Mult?

spice scroll
brisk pond
#

Guys I have this Joker that changes ability when its rank goes up.

  • Rank 1: nothing,
  • Rank 3: +1 joker slot,
  • Rank 7: +2 joker slot,
  • Rank 10: +3 joker slot
    How do I code that?
#

I already coded the PT_rankUp function and it works, I just want your ideas on how to implement each ability

solemn coral
#

I think the easiest way should be running G.jokers.config.card_limit = G.jokers.config.card_limit + 1 once when the joker passes each threshold

#

And then use remove_from_deck(self, card, from_debuff) to remove the right number of slots when you sell/destroy the card

brisk pond
#

So... this?

solemn coral
#

Looks good, yeah

solemn coral
#

Is there any existing mods that have cards give Chips when in hand that I could look at? If not, I think the only thing left I could try would be Lovely patching, which I am not looking forwards to trying to learn

brisk pond
#

check for context.cardarea == G.hand

solemn coral
#

Already looked at that a bunch unfortunately

#

I even found the exact area of the code where that context gets actually used:

#
if effects[ii].dollars then 
    ease_dollars(effects[ii].dollars)
    card_eval_status_text(G.hand.cards[i], 'dollars', effects[ii].dollars, percent)
end

if effects[ii].h_mult then
    mod_percent = true
    mult = mod_mult(mult + effects[ii].h_mult)
    update_hand_text({delay = 0}, {mult = mult})
    card_eval_status_text(G.hand.cards[i], 'h_mult', effects[ii].h_mult, percent)
end

if effects[ii].x_mult then
    mod_percent = true
    mult = mod_mult(mult*effects[ii].x_mult)
    update_hand_text({delay = 0}, {mult = mult})
    card_eval_status_text(G.hand.cards[i], 'x_mult', effects[ii].x_mult, percent)
end

if effects[ii].message then
    mod_percent = true
    update_hand_text({delay = 0}, {mult = mult})
    card_eval_status_text(G.hand.cards[i], 'extra', nil, percent, nil, effects[ii])
end
#

It's got the code blocks for Mult and xMult, but nothing for chips, since the only in-hand cards are Shoot the Moon, Baron, Reserved Parking, and Raised Fist.

#

So, if I do a Lovely patch here to add a block for chips, it should work.

#

The big issue is that I have to do a Lovely patch.

zealous glen
#

Do you really need a patch?

#

I would think the base game works

solemn coral
#

How so? What would I do to get it to work?

zealous glen
#

Just have the Joker return chips in the context that iterates over the hand

solemn coral
#

Look at the code I posted - returning chips does nothing, since it literally doesn't check for chips in this context

#

It only checks for mult, xmult, and dollars since that's all the base game does

#

(This is in state_events.lua if you want to have a look yourself)

zealous glen
#

I can’t look at it right now

#

Is this context.individual and context.cardarea == G.hand?

solemn coral
#

Yep

#

(And also not context.end_of_round)

zealous glen
#

There’s another similar context for the Jokers that apply while you’re at the hand

#

The difference being whether the card or the Joker applies the bonus

solemn coral
#

That happens before hand calculation, right?

zealous glen
#

Idk

#

You could also call mod_chips directly inside the Joker

solemn coral
#

Already tried that, and it doesn't seem to do anything

#

I think it specifically needs the local variables inside the function

zealous glen
#

I mean you can look at the code for mod_chips

#

And see why it didn’t work

solemn coral
#
function mod_chips(_chips)
  if G.GAME.modifiers.chips_dollar_cap then
    _chips = math.min(_chips, math.max(G.GAME.dollars, 0))
  end
  return _chips
end

function mod_mult(_mult)
  return _mult
end
#

The local variables mult and chips are the things actually updating the score and the score display, calling mod_chips does nothing

#

I'm just making the Lovely patch. It probably isn't too complicated.

wintry solar
#

Patching should work, the evaluate play loop has very few effects not in base game

#

Just replicate the h_mult one

solemn coral
#

Okay this isn't working

#
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0

[[patches]]
[patches.pattern]
target = "state_events.lua"
pattern = '''
if effects[ii].h_mult then
    mod_percent = true
    mult = mod_mult(mult + effects[ii].h_mult)
    update_hand_text({delay = 0}, {mult = mult})
    card_eval_status_text(G.hand.cards[i], 'h_mult', effects[ii].h_mult, percent)
end                
'''
position = "after"
payload = '''
if effects[ii].h_chips then
    mod_percent = true
    chips = mod_chips(chips + effects[ii].h_chips)
    update_hand_text({delay = 0}, {chips = chips})
    card_eval_status_text(G.hand.cards[i], 'h_chips', effects[ii].h_chips, percent)
end
print("If you can read this, the patch worked")
'''
match_indent = false
#

I can't see anything wrong with this but it's not adding the chips and it's not printing the debug message

#

It's also not throwing any errors in console that I can see

crisp coral
#

you cannot search for multiline with patches.pattern

solemn coral
#

Ah

crisp coral
#

you need to use regex for multiple lines

#

alternatively do a position = "before" patch with if effects[ii].h_mult then as the pattern

solemn coral
#

Still not doing anything that I can see

crisp coral
#

ah i see

#

target needs to be functions/state_events.lua

solemn coral
#

It's doing something!

#

It's not quite working yet, but it's at least patching the game!

#

Thank you!

#

IT WORKS!!

#

Jeez that was two hours spent on a single Joker I thought I could finish up in like 20 minutes max

#

Thank you Victin and Myst for helping me through this!

coral plaza
#

what does that joker do?

solemn coral
coral plaza
#

ah

solemn coral
#

Literally one of the simplest effects in this mod

hallow forge
coral plaza
#

hi

hallow forge
#

you can't escape me

coral plaza
#

okay

#

that wasn't my plan

brisk pond
zealous glen
solemn coral
#

Agreed. As I see it, if another mod wants to have a similar effect and they create another patch like this, the effect will trigger off of both mod's patches and apply the chips bonus twice.

fast badge
brisk pond
zealous glen
frosty dock
crisp coral
#

no clue what better_calc is supposed to do

#

but i'm not going to bother looking into it

crisp coral
#

like. how does it "just work"

night pagoda
#

do tags have add_to_pool?

crisp coral
#

for Blueprint/Brainstorm, what does the context.blueprint line actually do

surreal marsh
fast badge
#

(its a counter)

surreal marsh
#

yeah

fast badge
#

(as you can see, if context.blueprint > amount of jokers +1 -> return)

crisp coral
#

. Oh

fast badge
#

the naming of alot of variables in this source code are.... unfortunately chosen, to word it kindly

brisk pond
brisk pond
#
-- JOKERS

load(NFS.read(SMODS.current_mod.path .. 'jokers/03_Milady.lua'))()

load(NFS.read(SMODS.current_mod.path .. 'jokers/08_RobinHood.lua'))()

load(NFS.read(SMODS.current_mod.path .. 'jokers/11_Twins.lua'))()

load(NFS.read(SMODS.current_mod.path .. 'jokers/13_BackAlleyDoctor.lua'))()

only the Twins gives problems, the other ones load perfectly

zealous glen
brisk pond
#

I reported the bug to myself and myself said "i don't know how to fix it"

maiden phoenix
#

Either the namefile isnt 1:1 or SMODS.current_mod.path changes too quickly

#

Might want to put it in a var

frosty dock
#

which uh

crisp coral
#

LMAO not lua moment

frosty dock
#

that's not lua syntax

night pagoda
#

are custom editions available? can't get them to work

#

in the 1.0 I mean

#

every time I try to create a blank edition I end up with this

#

maybe I'm missing some argument?...

crisp coral
#

do you have a shader file?

#

the file_name argument should point to that shader the same way as atlases do

coral plaza
#

how do you even do modding things i've looked at some stuff and i don't know how to even, like, start

wintry solar
#

Yeah you need a shader

#

The shader should be declared as its own object too iirc

#

I can send you my code later this evening if you haven’t figured it out

night pagoda
#

I did shader yes

#

And I put its path

#

and I changed the thingy inside it

night pagoda
crisp coral
#

is the file in assets\shaders\...

night pagoda
crisp coral
#

its not path

#

it's file_name = "glitter.fs"

night pagoda
#

it's path in the examples tho

crisp coral
night pagoda
#

is the example wrong then? đŸ€”

#

also that is a weird location

wintry solar
#

The example might be old

night pagoda
#

in the vanilla the shaders are in the resources/shaders, not assets/shaders

#

yuck

wintry solar
#

Yes but mods use assets not resources

#

Right?

crisp coral
#

yea

night pagoda
#

why just don't do a flexible path?

#

weird

crisp coral
#

its the same way atlases work

wintry solar
#

^

night pagoda
#

I will have both resources and assets now

wintry solar
#

Why do you have resources?

crisp coral
#

it's always assets\some folder for steamodded stuff

night pagoda
#

I have shaders there

#

that I use to replace vanilla some shaders

#

I guess I'll move everything

crisp coral
#

you can take_ownership vanilla shaders probably

wintry solar
#

I am unsure if you can take ownership of them

crisp coral
#

probably

wintry solar
#

I didn’t foresee anyone needing to change vanilla shaders

#

What do you change about them out of interest?

night pagoda
#

I have these since 0.9.8

#

Change the quality of rendering

#

Specifically for background, intro and flame shaders

wintry solar
#

Are they on the bunco GitHub?

night pagoda
#

yup!

#

okay I moved the shader

#

still have the same error

wintry solar
#

iirc it needs your mod prefix

night pagoda
#

bunc_glitter?

wintry solar
#

Yeah

night pagoda
#

didn't work for file

#

trying both

#

didn't work for both

#

still the same error

#

I avoided that error before by registering the shader manually

wintry solar
#

Let’s see the code?

night pagoda
#

like the way I replace shaders

night pagoda
wintry solar
#

It’s file_name not path

night pagoda
#

trying

#

now works!

#

ty

#

uh oh

#

shader works on the locked/undiscovered edition

wintry solar
#

Got a screenshot? I can investigate later on

night pagoda
#

I don't even know if that's how it is in vanilla

wintry solar
#

No neither do I

#

I imagine it’s not

zealous glen
#

Are there any tools for making custom pools?

analog spoke
#

so, I currently have a +mult joker that I'm beginning with, how would I change it into a xmult joker?
I tried to change something which I thought would do this, but it ended up having no effect in game

quasi kettle
#

(in the return statement) instead of doing mult_mod you can do Xmult_mod

analog spoke
#

ooooh, ok, I didn't even see that part initially lol

lyric sparrow
#

Yooo, secret rares

coral plaza
#

finally i got something working

#

(it does nothing)

coral plaza
#

hmm yes

maiden phoenix
#

Reverse Cryptid

coral plaza
#

i had made it give +mult equal to the value of the card and the value of stone cards is apparently massively negative

frosty dock
#

it is if you use get_id to determine the "value"

coral plaza
#

yeah

frosty dock
#

maybe the nominal chip value is better suited

coral plaza
#

i fixed it to be that

wintry solar
#

oh god I've screwed up my git tree

frosty dock
#

how so?

coral plaza
#

by the way: the seed i was using to test this was gabeyk9

wintry solar
#

I think it's to do with the new structure of api_hooks maybe?

#

and then I was trying to work on a branch but then make a change to my main branch instead and screwed it all up

#

I think I've got it all back though now

zealous glen
#

Oh I thought you had like

#

Desynced the local and remote trees

wintry solar
#

I actually have no idea what happened

#

when I reapplied what I'd stashed it did half of it?

zealous glen
#

Did it fail to reapply something?

wintry solar
#

I'm not sure

#

is everything supposed to reregister when I switch profiles?

frosty dock
#

it says on github your fork is synced with main

#

but the AltTexture branch is still there and last pushed half an hour ago

wintry solar
#

yeah I think I've managed to get back to how it was

#

right

#

how is best to get the new file structure in this working branch

frosty dock
#

overrides is basically just what api_hooks was without the palettes part and some changed comments

wintry solar
#

so just base functionality overrides, and then everything else thrown in utils?

frosty dock
#

overrides for any non-lovely hooks on base game functions

wintry solar
#

yeah

frosty dock
#

utils for whatever else i guess

#

there's also core which is where I used to throw stuff like that, now it's just mod UI and probably needs renaming

wintry solar
#

now, I'm struggling to get my AltTexture branch to update to the newest version

#

should I just rebranch and copy stuff over manually?

frosty dock
#

seems like about the same amount of effort as manually merging

wintry solar
#

we're working again 😄

#

oh do I have write access to the main branch @frosty dock ?

frosty dock
#

seems like you do

wintry solar
#

I think that is where I got all tangled up

#

I will be very careful from now

solid salmon
#

I have 51 card suggestions for my mod

coral plaza
#

one per playing card other than 2 of diamonds?

hallow forge
#

everyone knows the jack of spades isn't a real playing card.

solid salmon
#

look at this chaos

mellow sable
#

Do you like my idea for “Stop posting”?

solid salmon
#

nerf it a bit please

#

Also HEEEEEEEEEEEEEEEEEELLLLLLLLLLLLLLLLLLPPP{P

mellow sable
solid salmon
#

otay

maiden veldt
#

how would i make it so consumables have a chance to be negative when appearing in shop? or, where is the code that determines the random edition for shop jokers?

maiden veldt
#

thanks

royal ether
#

me when i make localization a nightmare because... i dont remember because i made this 3 months ago

coral plaza
#

how do you get the card name from the value

#

e.g. 9 becomes 9, 11 becomes Jack

royal ether
#

theres no inbuilt function

#

you could just copy this and make your own

coral plaza
#

where is that

royal ether
#

card.lua:1133

coral plaza
#

ah

#

ty

coral plaza
#

is it possible to make it start with set jokers i'm having a lot of trouble finding them to test

edgy reef
#

Debug Mode/DebugPlus lets you spawn jokers in.

coral plaza
#

what

#

debug mode?

edgy reef
#

Debug Mode basically jsut enables LocalThunk's debug mode for Balatro and DebugPlus adds more (although requires Lovely).

spice scroll
#

i feel like im missing something obvious with these jokers repeating their effects over and over

edgy reef
#

Surely this works, right? (clueless)

solid salmon
#

guys me (and some other people) has to add 94 new stuff to stupidity

crisp coral
edgy reef
#

You caught me LMAO

crisp coral
#

LMAO

spice scroll
#

flush_type doesnt seem to be getting the suit correctly

#

okay no the debug is showing that its getting the flush type correctly wtf

#

why is it just giving me the world

coral plaza
crisp coral
#

flush_type being local means it only works inside the if block

#

it's nil when you start checking it

spice scroll
#

pretty sure it is?

#

oh

#

wait i see the problem

#

ok cool

coral plaza
solid salmon
#

how do i fix this

#
  key = 'scalper',
  loc_txt = {
      name = 'Scalper',
      text = {'Adds {C:blue}+5 sell value of all other owned Jokers to Chips'}
  },
  rarity = 1,
  pos = {
      x = 0,
      y = 0
  },
  cost = 5,
  discovered = true,
  local card_update_ref = card.update
  card.update = function(self, card, context)
    if G.STAGE == G.STAGES.RUN then
        if self.ability.name == 'Scalper' then
            local sell_cost = 0
            for i = 1, #G.jokers.cards do
                if G.jokers.cards[i] ~= self and (G.jokers.cards[i].area and G.jokers.cards[i].area == G.jokers) then
                    sell_cost = sell_cost + G.jokers.cards[i].sell_cost
                end
            end
            self.ability.mult = sell_cost
        end
    end
end
}```
near ivy
edgy reef
#

SO TRUE

#

I did cook a fully custom obj_pool API to make booster easier to make so

#

It's not 100% stolen

crisp coral
spice scroll
#

oh yeah btw
23/38 done
2/38 done without art
5/38 with minor bugs
4/38 being worked on
4/38 not started (shop joker, redrawing card joker, transformation jokers)

edgy reef
crisp coral
#

i have no clue either

#

the ui part i stole from buffoon packs

rough furnace
#

Check the card area's max thing

coral plaza
edgy reef
narrow pollen
#

for @spice scroll or anyone else on 0.9.8 in need of a "looping straights" detector

#

it should be compatible with custom ranks, assuming they get added to G.P_CARDS, but let me know if it's not.

rough furnace
#

Spelling mistake detected

mellow sable
#

It was originally in the game as “Caino “

#

When he fixed the typo he never changed the slug I guess

rough furnace
#

or the ability name

coral plaza
#

i managed to get the default love2d error handler screen

rough furnace
#

me when I make a syntax error with lovely

coral plaza
#

yeah

#

cursed thing with 6 cards 1: 3 pairs is counted as just a pair

rough furnace
#

yeah I think 2 three of a kinds is just a three of a kind too and not a full house iirc

coral plaza
#

yeah

zealous glen
#

I wanted to make a custom pool with different types of cards

edgy reef
#

I'm not sure if it's applicable for that unless it would use get_current_pool

#

Cause it's basically letting you make custom versions of that.

#

Still have to make some changes to base (like adding rarity)

#

(this is also totally not stolen from LobCorp xdd)

#

Along with making sure preset works.

#

(It's supposed to let you skip the starting pool and rarity parts as some object groups only need to reduce the starting pool or factor in other rarities and let SMODS.Obj_Pool handle the culling part but I haven't tested it set so it likely doesn't balatrojoker ).

#

Using it is just setting the _type used in create_card or get_current_pool to the obj_pool key

#

Like this

card = create_card("d6_jokers", G.pack_cards, nil, nil, true, true, nil, 'dsix_buf')
surreal marsh
#

why the file name is omitted😭

edgy reef
#

It might be something to do with loading the file from the mod differing from how Steamodded loads it.

#

But idk

surreal marsh
#

ohh đŸ€” makes sense

zealous glen
#

How would you word an effect that does Blue Seal with Acrobat's timing?

#

They both use "final hand" differently

hallow forge
#

Acrobat should be able to tell if it will be the last hand if the round /j

surreal marsh
#

blue seal uses "final played poker hand" and acrobat uses "final hand of round"

#

there is difference

zealous glen
#

Unrelated: in principle the final hand of round needs not be the final hand, but I think that's good enough

zealous glen
#

I decided to go with:

When you play your
final hand each round,
create its Planet card

wintry solar
#

Is the effect only triggered if it’s your last possible hand?

solid salmon
crisp coral
#

get yourself an ide

#

you cannot use local inside a table

wintry solar
#

yeah those two lines should just read update = function(self, card, context)

night pagoda
#

does editions api have calculate function argument for scoring effects or it's not ready yet?

crisp coral
#

it's in todo

night pagoda
#

because I found mention of it and not sure

#

yup

wintry solar
#

yeah ejwu has been looking at rewriting calculation stuff

#

you can do chips, mult and xmult, and a combination of them, and I'm not sure if the version in main branch has p_dollars or not

night pagoda
#

looking for my own effects for now

#

will inject then

#

(don't know where to inject tho yet)

solid salmon
night pagoda
#

btw I updated the shader

#

and it looks like that now

wintry solar
#

what is the effect?

night pagoda
#

1.2X Chips

wintry solar
#

ewwww Xchips

night pagoda
#

yup, but it's not going to appear normally in the pools

gilded blaze
#

what is the edition called

night pagoda
#

glitter

wintry solar
#

you'll need to inject for playing cards and jokers

#

it's quite an easy injection actually

night pagoda
#

I don't know where exactly this calculation is located, that's why I'm confused

#

maybe here?..

wintry solar
#

no there's specific edition ones

night pagoda
#

yup, there's if edition_effects.jokers then afterwards

wintry solar
#

there's another one further up the stack for playing cards

night pagoda
#

aha, I see it too

#

Do I need to pass anything to the cards themselves so these condition will work?

wintry solar
#

I don't believe so

#

I think you should just need the actual calculation

#

so just modify the xMult ones

brisk pond
#

what's the problem with it?

wintry solar
#

curly brackets

brisk pond
#

oh

#

yeah that was the problem

wintry solar
#

hmmm, anyone had any experience taking ownership of seals?

wintry solar
solid salmon
#

I'm fixing my monitor right now it's tweaking

#

IDE?

wintry solar
#

your editor

solid salmon
#

so the code?

wintry solar
#

yes

#

but with the line numbers

solid salmon
#

it says } supposed to close the thing at line 22

#

wait

#
  key = 'scalper',
  loc_txt = {
      name = 'Scalper',
      text = {'Adds {C:blue}+5 sell value of all other owned Jokers to Chips'}
  },
  rarity = 1,
  pos = {
      x = 0,
      y = 0
  },
  cost = 5,
  discovered = true,
  card_update_ref = card.update
  card.update = function(self, card, context)
    if G.STAGE == G.STAGES.RUN then
        if self.ability.name == 'Scalper' then
            local sell_cost = 0
            for i = 1, #G.jokers.cards do
                if G.jokers.cards[i] ~= self and (G.jokers.cards[i].area and G.jokers.cards[i].area == G.jokers) then
                    sell_cost = sell_cost + G.jokers.cards[i].sell_cost
                end
            end
            self.ability.mult = sell_cost
        end
    end
end
}```
wintry solar
#

screenshot

#

...

solid salmon
#

dude i sent the area that the errors at and the error itself

wintry solar
#

I'm not scanning your code for you, give me the lines numbers

solid salmon
#

22 to 49

wintry solar
#

just go like this then I don't have to count, or solve it yourself

solid salmon
#

everything you say makes me more confused

#

can SOMEONE else help

wintry solar
#

I mean I'm pretty sure I've told you multiple times how to solve this problem everytime you've posted it here, but now I'm asking for a little more context you're simply refusing to do a very simple task

solid salmon
#

pretend im dumb (if you weren't already)

wintry solar
#

do you know how to take a screenshot?

solid salmon
#

yes

wintry solar
#

take one of the code and paste it here

solid salmon
wintry solar
#

delete line 35

#

remove card. from line 36

solid salmon
#

that's it?

wintry solar
#

yes

#

that's what your error code told you

crisp coral
#

change every self in the update function to card

solid salmon
#

update -> card

#

?

#

also this

wintry solar
#

go to line 90

#

and fix the problem

zealous glen
#

The issue might be before line 90 to be fair

solid salmon
#

line 90 is end

#

wait

zealous glen
#

Like some missing bracket or comma which makes something out of scope

solid salmon
#

thats not supposed to be there

zealous glen
#

An extra thing can also be at fault

frosty dock
#

you put your update function like it's a literal hook to Card:update(), which it isn't

#

you can't just put random code inside a table constructor

#

please just learn lua properly, and not only will you be able to stop wasting your own time, but also ours

solid salmon
#

it works but now another problem

#

and i have the png

#

added

wintry solar
#

clearly you don't

frosty dock
#

^^

wintry solar
#

aure do you want me to make pages for seals?

solid salmon
wintry solar
#

I can't imagine this is intended behaviour

hallow forge
#

i can

frosty dock
#

yeah having pages is probably for the better

solid salmon
frosty dock
#

i can't tell you where that's saved on your computer

solid salmon
#

i have this in 2x

#

assets

#

rb

wintry solar
#

you can tell him where it's not saved though!

solid salmon
#

Dude

frosty dock
#

okay that was easy

#

folder names are case sensitive

#

your file is in Stupidity/Assets/2x, not Stupidity/assets/2x

#

also consider stopping being behind 3 weeks worth of commits on steamodded

royal ether
#

please use snipping tool

wintry solar
#

they're not case sensitive btw

#

but

#

this

royal ether
#

xdd

frosty dock
#

oh that's even worse

#

mb

crisp coral
#

oh god

wintry solar
#

tbf, I also thought they were case sensitive but did a quick test on my end

#

I now have an ASSETS folder

crisp coral
#

64 different assets folders with different capitalization

solid salmon
#

I used a shortcut

wintry solar
#

in other news, I can't take ownership of default seals. I think it's because they don't have a prefix in base game because for some reason they're stored in a different table, any ways around this?

frosty dock
#

it's case sensitive on linux (which is probably what I was thinking of)

#

and it's possible to make directories case insensitive in windows (used for WSL)

solid salmon
#

i use window

frosty dock
frosty dock
#

anyway that isn't in your Mods folder

solid salmon
#

...

wintry solar
solid salmon
#

it was

#

n't

frosty dock
#

too bandaidy

#

also not great for cross-mod ownership taking

#

I'll just allow omit_prefix on the object, might fix more thoroughly later

solid salmon
#

HOW THE HECK DOES local card_update_ref = card.update have an unknown symbol

wintry solar
frosty dock
#

please learn lua

wintry solar
#

I get this with omit_prefix on the object

frosty dock
#

wtf

wintry solar
#

hang on maybe this is my atlas mistake

crisp coral
#

is the card colors button getting moved pls

wintry solar
#

where do you want it myst

solid salmon
#

i remebered

crisp coral
#

not at the bottom

frosty dock
#

just pushed something to allow omit_prefix on the object

crisp coral
#

preferably

wintry solar
#
for _,v in pairs(G.P_CENTER_POOLS.Seal) do
        SMODS.Seal:take_ownership(v.key, {})
    end```
running just this gives me these lovely card backs
frosty dock
solid salmon
surreal marsh
#

shaders use F# đŸ€” another language

frosty dock
#

I shall not have my time be wasted further

solid salmon
#

Hey eremel

frosty dock
#

you're literally not providing the information needed to help you

solid salmon
#

not that

#

it's for my mod suggestions

wintry solar
#

hmm?

solid salmon
wintry solar
#

no

frosty dock
#

💀

solid salmon
#

do you want to add a card suggestion

#

don't question why theres so many cause i don't know either

crisp coral
#

guh i'll need to learn how to make a shader eventually

#

absolutely not looking forward to this

surreal marsh
#

can't understand why negative edition needs so many lines balatrojoker I thought it would be simple as R = 255-R, G=255-G, B=255-B

wintry solar
#

scroll down to the effect part

surreal marsh
#

so this if (negative.g > 0.0 || negative.g < 0.0) { SAT.b = (1.-SAT.b); }

wintry solar
#
vec4 SAT = HSL(tex);

    if (negative.g > 0.0 || negative.g < 0.0) {
        SAT.b = (1.-SAT.b);
    }
    SAT.r = -SAT.r+0.2;

    tex = RGB(SAT) + 0.8*vec4(79./255., 99./255.,103./255.,0.);

    if (tex[3] < 0.7)
        tex[3] = tex[3]/3.;```
#

this

surreal marsh
#

ok

wintry solar
#

everything is 0-1

wintry solar
night pagoda
#

I don't think she meant this

#

it was about that it's below collection menu I think?

#

I also accidentially enter this menu sometimes

wintry solar
#

oh yes I am moving that

zealous glen
#

I vote to keep it where it is blueprint

night pagoda
#

yup

#

but I'm not myst so I'm not sure if she really meant this

frosty dock
#

fs just stands for fragment shader

surreal marsh
#

vscode says it's f#

wintry solar
#

it's GLSL but an old version because love

frosty dock
#

vscode is wrong

surreal marsh
frosty dock
wintry solar
#

yes

frosty dock
#

These effects are written in a language based on GLSL (OpenGL Shading Language) with a few things simplified for easier coding.

surreal marsh
#

what does this mean

frosty dock
#

simplification > standardization

zealous glen
wintry solar
#

you can use SMODS.Shader({name = "test", path = "test.fs"}) on newest version

surreal marsh
#

line 109 is love.graphics.setShader( G.SHADERS[_shader or 'dissolve'], G.SHADERS[_shader or 'dissolve'])

wintry solar
#

not name

#

key

frosty dock
surreal marsh
#

but the 0.9.8 compatibility would gone balatrojoker

wintry solar
#

oh no what a shame balatrojoker

#

also what does your shader file look like?

surreal marsh
#

i copied negative shader and changed a number

wintry solar
#

you'll need to change every occurance of negative to test in it too

frosty dock
#

compat_0_9_8.lua casually missing features blueprint

wintry solar
#

nah isn't this a case of it not working for people running 0.9.8?

#

the compat is backwards

#

not forwards

surreal marsh
wintry solar
#

no in your shader file

#

I'm pretty sure thats what the uniform missing means

night pagoda
#

is it possible to set default pitch in the sound api?

surreal marsh
#

ok thanks

frosty dock
#

but unrelatedly, it's missing suits and ranks

surreal marsh
#

yay (it's polychrome not negative i apologize)

frosty dock
#

either way I'm again starting to tend more towards thinking of supporting 0.9.8-related things as being a footgun

zealous glen
#

Yo imagine a pirate with a footgun for a pegleg

crisp coral
#

now can you push that to main 😊

night pagoda
#

where do I set custom edition's sound?

#

(assuming I already registered the sound itself)

wintry solar
#

sound = { sound = "foil1", per = 1.2, vol = 0.4 },

night pagoda
#

Is "per" = pitch?

#

also thanks!

wintry solar
#

unsure

#

but it's included in base game sound stuff

frosty dock
#

per is pitch, vol is volume

wintry solar
#

I wonder where per comes from

crisp coral
#

percent?

surreal marsh
wintry solar
#

Calculated with regard to 1 being the base pitch. Each reduction by 50 percent equals a pitch shift of -12 semitones (one octave reduction). Each doubling equals a pitch shift of 12 semitones (one octave increase). Zero is not a legal value.

zealous glen
surreal marsh
zealous glen
wintry solar
#

you've replaced the base shader though right?

surreal marsh
wintry solar
#

but you aren't drawing the game's base shaders

#

you've overwritten the draw function for testing

surreal marsh
#

i should inject here right

wintry solar
#

it wont be transparent

#

but yeah

frosty dock
#

eh, you're still calling the original

surreal marsh
frosty dock
wintry solar
#

in what circumstances are you using this shader?

surreal marsh
wintry solar
#

fair enough

surreal marsh
hallow forge
#

namsilaT

frosty dock
#

i got the weird messed up crash screen

silent sapphire
#

Is there anyway I can check if a card held in hand has an edition?

hallow forge
#

when the crash screen crashes

#

you know really messed up

zealous glen
#

Maybe it’s trying to play Bad Apple

surreal marsh
wintry solar
#

are you still using your test function or have you patched now?

surreal marsh
#

i'm patching

wintry solar
#

can I see the patch?

surreal marsh
wintry solar
#

ah right yes

#

so your shader is transparent

#

the problem is that the game has already drawn the shadow and card underneath

royal ether
wintry solar
#

hmmm

#

you could change your pattern to this one if not self.no_shadow and G.SETTINGS.GRAPHICS.shadows == 'On' and((layer == 'shadow' or layer == 'both') and (self.ability.effect ~= 'Glass Card' and not self.greyed) and ((self.area and self.area ~= G.discard and self.area.config.type ~= 'deck') or not self.area or self.states.drag.is)) then and return to break the loop

#

but then it won't draw anything else

#

let me check what invisible joker does

#

or stneicl

#

oh no, they're just transparent sprites

silent sapphire
surreal marsh
#

what đŸ€Ș

mellow sable
#

Jolly Joker

#

m economy in shambles

surreal marsh
mellow sable
#

M

surreal marsh
#

m

crisp coral
#

jesus christ

wintry solar
#

uhhhh

#

do they just fly around like that?

surreal marsh
#

they don't fly

#

they stay there

wintry solar
#

that's not what I thought what happen

surreal marsh
#

add this part fixes

#

but this is no different than just don't call Card:draw balatrojoker

zealous glen
wintry solar
#

I'm so confused

#

how does it draw the shadow before that block

zealous glen
#

What do you mean?

#

There’s a shader call just for the shadow

wintry solar
#

yeah, the call is before it does the hover/tilt stuff though

surreal marsh
surreal marsh
wintry solar
#

yeah, you've injected before it

#

assuming you've copied the hover.tilt into your lovely patch?

surreal marsh
wintry solar
#

yeah

#

so doing this you don't draw the shadow

#

it won't draw floating sprites though this way

surreal marsh
#

which part enables hovering ui

surreal marsh
#

patching adds the difficulty to find the key part, i'm directly overriding Card:draw to learn balatrojoker

shell tangle
#

Double checking, for the no_pool_flag, I just need it in the config to work - As soon as I throw the flag into the flag pool, I don't have to make any checks beyond that to remove it from the pool, right?

solid salmon
#

are fusion jokers compatible with 1.0.0

night pagoda
#

how to add small description thingies?

#

want to add edition's description to edition's tag

wintry solar
#
        info_queue[#info_queue+1] = G.P_CENTERS.e_greyscale
        return {}
    end```
night pagoda
#

didn't work, hmm

#

do tags even have loc_vars?

wintry solar
#

they should do

night pagoda
#

no thingy

wintry solar
#

hmmm

#

I'm not sure how info_queue works fully

night pagoda
#

I want to do some kind of sanity check regarding if there's loc_vars for tags

#

but not sure how

#

will just send message

wintry solar
#

put some variables in it

night pagoda
#

sanity check passed

#

will try variables

#

got it

#

I was supposed to type e_bunc_glitter, not just bunc_glitter

#

thanks!

wintry solar
#

ah that makes sense

night pagoda
#

is working fine without e_ for other things so I assumed this is something from old versions

wintry solar
#

I think it's to do with looking directly in the G.P_CENTERS table

surreal marsh
wintry solar
#

does it work on legendary jokers?

surreal marsh
#

also strange page

#

i commented this part and the shadow part

sonic mortar
#

wish i could use calculate for editions, maybe soon? slugloaf

wintry solar
#

maybe soon

fallen tendon
shell tangle
#

Can anyone identify the issue with this? Trying to increase Xmult for each Hearts card held in hand at the end of the round. Currently goes through each one and shows "error" a single time, no matter how many hearts, and doesn't change the value at all. I assume it's something to do with the for loop, unsure what steps to take.

      if context.cardarea == G.hand then
        for k, v in ipairs(context.other_card) do
          if v:is_suit('Hearts') then 
            self.ability.extra.Xmult = self.ability.extra.Xmult + self.ability.extra.Xmult_add
            return {
              message = "Upgraded!",
              colour = C.G.MULT
              } end
        end
      end
    end```
solemn coral
#

There's a way to set a little icon that appears next to your mod's name in the mods menu, right?

#

The icon on the left here