(Need Idea) Client-Side Loot, Different loot for each player

How can I go about client-side loot. Like on many games such as Trove and Path of Exile (iirc), by client-sided loot I do not in any way mean that the loot will drop to the client and will be picked up and send info to the server, but to actually have different loot for each player, like:
Player 1 Picks up [Gold]
Player 2 should still see the gold there and be able to pick it up as well.

I have an idea to create a loot-pool once the ‘enemy is killed’ or something, and then send to each client their own loot pool. Would that be a good idea?

Kind of a bad idea, this could most likely be exploited. Just have the loot pile be server side, and have values in there indicating which player can redeem it. Maybe you can also have a keybind that states who can redeem it and they can for say press E , then it fires the server and if that user can claim the loot then give it to them.

( Reason it can be exploited is because the client can just make a bunch of loot for themselves and then tell the server that the loot was created and basically have infinity resources. Unless you made some table keeping track which player has what it’s completely unnecessary )

1 Like

Good, but what if I want each player to have their own loot displayed separately?

Do you want the loot to be the same for every player?

Then fire all clients and make that specific loot invisible, and then for that player specifically make it visible ( :FireAllClients({Loot = loot,PlayerWhoOwns = player}). Also don’t forget to have server sided checks if you’re going to use this method, to lessen exploiters who will try to make it visible and redeem it , IE; have values in the loot indicating which player(s) own it, like I said earlier.

1 Like

That could be one way.

After you added this, it seems more like a viable option.

It depends, since there will be random loot from the enemy (like 3-5 bones, 5 feathers) and I want player one to get the bones and player 2 should get the feathers. (Pretty much different loot for every player)

So just randomize the loot for the players , fireallclients telling who owns what loot, make it invisible for their client if they don’t own it, and then make it visible for the person who owns it. After that once they redeem it in the server check who owns the loot, and give them their rewards.

2 Likes