#Dumb Backpack System

1 messages · Page 1 of 1 (latest)

thick orchid
twilit void
#

Ohhh I see now

pulsar storm
#

I like the part where you can put a backpack inside a backpack into a backpack while in a backpack deep inside a backpack.

#

How do you handle the data if an item is destroyed? Did you use ItemStack dynamicProperty?

thick orchid
thick orchid
proven vale
#

Idk how that gui works just by interactions without chest

thick orchid
proven vale
#

Oh yeah seems like it because the ui keeps reopening

thick orchid
proven vale
#

That's cool

pulsar storm
# thick orchid What do you mean if an item is destroyed?

Please tell me how you save the data or a way to find the abandoned container identifier. When I say Item is destroyed, I mean: erased to the creative tab, burned by lava, or any action that deletes this Item.

If you're using the ItemStack (the backpack item) as the key reference unique ID for the backpack container. By deleting this item, there will be no longer a matching ItemStack to find the unique ID of this backpack container. From what I find, there's no way to know which backpack container identifier is lost this way.

thick orchid
# pulsar storm Please tell me how you save the data or a way to find the abandoned container id...

I just save my data to a SQL database. If an item is "destroyed" I can just bring it back as it sits in a SQL database. You could start a whole new world and I'd still be able to bring it back.

I create a custom unique id for every item. Not every itemstack every item. I can make any item be anything. Want a sword to be a backpack, not a problem, want it to be a potion sure. The item the player holds in their hand can be anything you want it be.

quiet shell
thick orchid
#

Hold your horses right there. I wouldn't ever call myself a fanatic developer. More like trash developer lol

pulsar storm
# thick orchid I just save my data to a SQL database. If an item is "destroyed" I can just brin...

If an item is "destroyed", you will not know what unique ID it was storing (Assuming the unique ID is used to link the itemStack to your database). In that case, how does your database handle it?

basically, the database will keep building up data if this scenario continues to happen, there's a risk of deleting the data since we don't know if the backpack's unique ID is no longer accessible or just being stored for a long time.

#

"Bringing back the Item" sounds pretty straightforward, but how would you do it without accidentally duplicating the item if it still exists?

thick orchid
pulsar storm
#

How do you know the item is "destroyed"? Surely, you're not going to just check player inventory for each tick right?

#

Trying to solve method to save itemstack data on an item safely lmao

thick orchid
thick orchid
pulsar storm
proven vale
#

Is this a debate

#

🍿

thick orchid
thick orchid
pulsar storm
thick orchid
pulsar storm
thick orchid
pulsar storm
#

Is this Script-API or actual plugin?

thick orchid
pulsar storm
#

You know I'll just summarize what I was trying to point out:

  • Each ItemStack has a unique ID (that you implemented) representing its functionality and data
  • Once this ItemStack was put into a container, dropped to the ground, or any action that removed the item from the player, there's no way to know this action unless you check each container or check for a dropped item. (Basically, determine what inventory update happened)
  • Without the information above, the unique ID of that Item can be said in an "inaccessible" or "Unknown" state, where its condition cannot be confirmed by the Script-API since we don't know if the item was just being stored in a container or "destroyed".
  • Here's the problem, if it is destroyed, the data associated with that Item would become irrelevant, but there's No way to know it was destroyed since detecting such precise inventory update is not possible with Script-API. An Item could also be "destroyed" if it was dropped to the ground, despawned, or exploded.
  • Data that become irrelevant or abandoned would build up in the database, you may delete some to free up space, but by doing so, it risks deleting item data that is still functional.
pulsar storm
#

Ah, so you tank it. That's one way to ignore the problem.

thick orchid
pulsar storm
#

I mean with an SQL database, it's almost infinite, but for dynamicProperty based database, it's a pain.

thick orchid
pulsar storm
#

haha 😂

thick orchid
#

One problem I know I'll be facing is SQL indexing

#

But there are methods for resolving that issue

pulsar storm
#

Good luck, bro, It felt like I was questioning an obvious question lol

thick orchid
mental spade
#

Yo, Is this use script?

thick orchid