Post your inventory/item based questions here

Post Reply
User avatar
Extex
Member
Posts: 244
Joined: Wed Mar 14, 2018 23:14
GitHub: Extex101
In-game: Extex

Post your inventory/item based questions here

by Extex » Post

Post any questions you have about inventories or items on this topic

Let's start it off with my question:

Example: I have 4 items let's just call them, A, B, C, D

I want these different items to be stackable into each other.
So when A with 2 items is stacked into B, C, or D with 12 items.
It will become 14 of A

And when split, it will split into random item of the A, B, C, D items

Example gif:
Image
NOTE: At the end of the gif the stacks are being split
Attachments
ezgif-2-5458d7970f82.gif
ezgif-2-5458d7970f82.gif (103.26 KiB) Viewed 147 times
Creator of jelys_pizzaria and motorbike, and player of persistent kingdoms. RIP

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: Post your inventory/item based questions here

by Krock » Post

Combine different items: Currently impossible. Needs engine changes to implement this first.

Split items randomly: Impossible. There must be at least a pseudo-random sequence so that the client can predict the stack splitting. Additionally this means that the source and destination ItemStacks are no longer equal.

This idea is incompatible with the engine functions. Please implement it yourself if you really need it. Some mods work around this problem by adding a craft recipe to convert one to another.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
Extex
Member
Posts: 244
Joined: Wed Mar 14, 2018 23:14
GitHub: Extex101
In-game: Extex

Re: Post your inventory/item based questions here

by Extex » Post

OK wasn't that important anyway.

Another question:
How would I entirely empty a nodes inventory into a player?
It's only about 3 items
Creator of jelys_pizzaria and motorbike, and player of persistent kingdoms. RIP

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests