Jump to content

Welcome back

This is a new trip

  • 0
Sign in to follow this  
Mad4life

Add drop rate to items

Question

Hello guys ,,, please can anyone tell me how to add drop rate to items? am using Power-ps sources and client .. i will be thankful // 

More info server is (Pi) 

add me on discord Mad4Life#6115

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

This is done in various ways. One way to do this is to take a seed (a random value) and compare that against drop categories e.g (common (10%), uncommon (30%), rare( 50%) etc.). Once you have determined what level of drop the user has landed, you then take another seed to select the item within a category based off its loot drop chance.

e.g if the user landed on a rare drop chance: (DDS (30%), DFS (3%))

Each drop has two factors, the drop chance category, and the item drop within that category.

A user may get a seed of 100% for the category (giving them a chance at the best loot possible) but the second factor may come in at a low value thus not producing anything.

An item drop chance percentage can be calculated by applying the chance of hitting the relative category with the chance of hitting said item.

 

Another way to calculate drops would be to replicate the formula that OSRS uses (however I think this is overkill for an RSPS as the player count is so low and the effort required is so high, but it depends on what you want your implementation to be):

Please login or register to see this link.

Edited by KieranDevvs
Additional reasoning.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×