#Oddity API - Unthemed Consumable type

1 messages · Page 1 of 1 (latest)

flint wave
#

https://github.com/AutumnMood924/OddityAPI/releases/tag/1.0.0

Comes with packs, rarities, support for "nonconsumable" oddities, shop injection. For examples of use, check out my other mod, TheAutumnCircus, which will have support for this mod from 0.3.0 onward.

Please feel free to support this for your projects; it is my goal with making this API that it can be a sort-of mixing bowl of various things; there is no enforced theming with Oddities; they don't even really need to be "cards"! (The terminology used in pack descriptions omits the word "cards" for this reason!)

GitHub

Requires Steamodded 1.0.0 alpha. May work with release versions, may not.

normal pivot
#

i am first to see this😎

pastel quartz
#

REAL

flint wave
#

PLEASE do note that this mod will not behave properly if it is loaded without at least one oddity of each rarity loaded; i'll look into a solution to this down the line but for now just don't try to use this without either TheAutumnCircus or some other mod that populates some

#

(although TheAutumnCircus does not actually have Legendary Oddities, though it also grants no method to gain any)

late garden
#

I’ll check it out later so I can finally add Milk to the game

flint wave
#

sick

late garden
flint wave
#

it shoudnt matter, they dont actually return anything anyway iirc

#

also wrong thread lol

#

ill fix it for the next update tho

late garden
flint wave
#

no

#

the file adds to TheAutumnCircus.INIT itself

late garden
#

Hmm, I see

flint wave
#

the abbreviated entries in TheAutumnCircus' global table are for a thing i decided against doing

#

none of those files actually return anything

#

so technically those are pointless assignments

late garden
#

I'm still going through the example in Autumn Circus, but can I add Oddities without adding packs? I haven't seen where packs are created yet

flint wave
#

oddity packs are added by oddityapi

#

a future update will allow for disabling them, if desired, as well as for disabling oddities in shops

#

(i just wanted to get SOMETHING out)

late garden
#

The size is a bif off, but Milk is functional. It helped that my idea for it was exactly what you implemented for Chips lol

Although I was considering making Milk change the Edition.

In the meantime, I hardcoded the probability of an Oddity pack appearing to be 0.

late garden
#

Even though I had set the chance of an Oddity Pack appearing to be 0, it showed up anyways… full of Jimbos

#

Using the function you implemented for Chips, the Consumeable has the upgrade effect instead of the card. Is that intentional?

flint wave
#

yea thats how i did it

#

im too smooth brain to figure out evaluating each targrted card

late garden
#

By the way, do you know how to fix the size?

late garden
winged saffron
#

You should all use this I think

flint wave
#

but if you DO want to make it smaller, check how the chips set their pos

#

there should be scale_h and scale_w, which are the % size of the oddity compared to a normal card

#

oh actually...

late garden
flint wave
#

well im at work

#

so

late garden
#

Me too 🤔

flint wave
#

in fact it looks like you may have used that code? but the sprite is still Big

late garden
#

I noticed a variable that looked like it set the card size but I didn’t change it from the green_chip I used as a base

flint wave
#

since its offset in the consumables area

#

yeah that sounds right

#

i dont think it actually scales like wee joker

winged saffron
#

weed joker..

flint wave
#

this is just the dimensions of the hitbox and stuff

flint wave
late garden
#

That explains the janky hit box

late garden
#

Is there an easy way to add new types of Oddities and new Packs? (New type as in, they don’t mix together, like Tarots and Planets)

flint wave
#

not specifically, no

#

you could do like how sylvie's silliness does it, and make packs with specific pools

#

i can see about adding a flag to omit specific oddities from spawning in the provided packs & shop hook

late garden
#

I think Consumeables that can't be obtained from Packs but only generated in a specific way are an interesting idea, at least as far as they allow implementing some mechanics in an easy way

flint wave
#

oh

#

check jimbobread man (half)

#

just have a yes_pool_flag that will never get set

late garden
flint wave
#

and its still appearing in packs?

late garden
#

Ah, no, I just wanted to create different kinds of Consumeables to organize them into different types

flint wave
#

oh, yeah

#

i may be able to create a special flag to omit them from general Oddity generation

#

but not interfere with other methods

late garden
flint wave
#

should be thinner? idk

#

like, ~8px thinner

late garden
#

Ah, I see it now

late garden
#

What's the function that moves cards from the hand to the deck at the end of a booster pack opening?

#

Is it just add_to_deck?

flint wave
#

i... dont know?

late garden
#

Hmmm… I created an Oddity that creates cards but they're just. They're just there.

mint galleon
#

i found a jimbo in an oddity pack lol i assume thats intentional

flint wave
#

itll happen if the game cant spawn one of a particular rarity

mint galleon
#

makes sense

flint wave
#

in a future update itll default to the first oddity registered, but for now itll be jimbo

willow slate
#

my oddity's description isn't drawing ingame

flint wave
#

huh

#

can you try using the tablecall method TheAutumnCircus uses?

#

just out of curiosity

willow slate
#

i'll try that later

fiery kraken
#

I am new to this and have a problem.When i start the game with this mod it crashes and says "BUFFER" any help?

flint wave
#

what mods do you have aside from this one?

fiery kraken
#

a few others but it also crashes when its just this mod and autummcircus

flint wave
#

can you show me the crash screen?

fiery kraken
#

here is the crash

flint wave
#

update steamodded

fiery kraken
#

ok thanks

flint wave
#

lmk if its still broken after that o7

fiery kraken
#

it works thank you

raw bay
#

Gave making an Oddity consumable a try by making a simple one 👍

#

Is there a reason as to why switching profile empties the oddity consumable collection?

grave crown
#

i actually have some issues with the oddities api on the steam deck

flint wave
flint wave
raw bay
#

Can oddities be eternal?

flint wave
#

probably but it might not work correctly

#

most likely it works the same way as normal consumables being eternal

#

however that works

raw bay
#

Not sure if I'm doing something wrong but it doesn't seem to work

flint wave
#

they dont have eternal_compat fields, so set_eternal will see the nil eternal_compat and refuse to set it

#

just set it directly with self.ability.eternal = true

raw bay
#

That did the trick, ty 👍

raw bay
#

I see that in the API there's some calculate_joker ref, does it work the same as in Steamodded? Is it done like this?
SMODS.Oddities.c_my_oddity.calculate = function(card, context) ?

#

Ok so apparently it's not getting every context?

flint wave
#

ok so

#

consumables do get calculate_joker calls

#

but only some of them

raw bay
#

Oh 😦

flint wave
#

it's technically supported by OddityAPI to the same extent that it's supported by Steamodded afaik
i believe the general way to do it is context.joker_main

#

any of them that are more niche contexts (i.e. not part of scoring) will probably skip consumables

raw bay
#

Without context.joker_main those are the one I got

#

I guess it only gets context.joker_main anyway since I see it as the only one as true

#

I guess I'll have to use a calculate_jokerref func?

flint wave
#

what are you trying to do actually

raw bay
#

egg but on selling cards for an oddity

flint wave
#

i think the issue is that calculate_joker just straight up isnt called in other contexts for consumables

raw bay
#

Sad 😔

flint wave
#

so hooking the function outside of the existing api hook won't help

#

it is surely not Impossible just maybe Largely Impractical

raw bay
#

I'll cook something horrible then

grave crown
willow slate
# flint wave

i'm not sure if this is what you meant but this has the same issue

grave crown
#

update to my issue: you can take items out of oddity packs using the touchscreen

compact dock
#

github is giving a 404 error, what happened?

smoky lichen
compact dock
#

ah

flint wave
young egret
#

ODDITY API IS REEEAAAALLLLL

flint wave
#

oddity api is fake and gay

#

(/positive)

pastel quartz
#

oddityapi is back

#

this is a good thing

late garden
#

My crops are watered nature is healing

severe apex
#

i wanna keep updated so im sending a msg here

flint wave
#

me when "Follow Post"

raw bay
#

I want to increase the message counter of this forum by one so im sending a msg here