#Custom item attributes

1 messages · Page 1 of 1 (latest)

scenic aurora
#

Hi

tiny whale
#

hi

#

so if you want to do luck damage strength or even speed

#

i think a custom variable for each player is better

#

on items i think nbt tags is the best way to store data

#

im not sure about that tho bc i havent looked it alot yet

scenic aurora
#

The problem with NBT tags is I would end up having to have one for every stat on an item

#

and I can't store the operation

tiny whale
#

wait

#

if u mean that u have many tags i think you could store everything in 1 tag

#

still not sure

scenic aurora
#

I need to store an operation and a value like the vanilla attribute system since I might want to do +15 health, +25% health or 2x health

tiny whale
#

i think if you could make a custom itemstack or sth and put the values there it would be better

scenic aurora
tiny whale
#

depends on how proffesional and good you want it to be

#

you can do either vanilla variables or nbt tags

#

and there are apis for nbt tags

#

so ig u can use them

scenic aurora
#

I was trying to make a custom PDC data type

tiny whale
tiny whale
cloud saddle
#

you can store them instead of health as healthMultiplier or such and you can calculate them at the end

#

after you calculated the other values that are just numbers

scenic aurora
#

ohh

#

ok

cloud saddle
#

for example you loop through the inventory and calculate the total damage number the player will deal then gather all damageMultiplier, add them and do damage * damageMultiplier

scenic aurora
#

Yeah

#

I guess I'll just have to do that and give up using a single nbt tag

tiny whale
#

also xpdz do you know if theres any way to put variables on an item without nbt tags

scenic aurora
#

by nbt tag I mean PDC

scenic aurora
cloud saddle
tiny whale
#

wait itemstacks have uuids?

#

idk exactly what it is i may go check itater

#

later

cloud saddle
#

if im not mistaken Hypixel Skyblock also gives items UUIDs

scenic aurora
tiny whale
#

but then they cant be stacked

cloud saddle
#

That's a good point

scenic aurora
#

Hmm. I probably wouldn't be stacking items that give you stat modifiers anyway so that might work