Loot Rewards and Chances
Chance Explained
Each item in the loot table has a chance value. This is the probability (in percentage) of the item being selected during the looting process.
The
chance
value for an item represents the likelihood that it will appear, compared to other items in the loot table.
For example:
"Drink water" has a 15% chance of being selected.
"308win" has a 5% chance of being selected.
"Bag camper" has a 20% chance of being selected.
Why the Total Chance Cannot Exceed 100%
The total of all chance values in a loot table must not exceed 100%. This is because the system generates a random number between 1 and 100 to decide which item will drop. If the total chance exceeds 100%, the logic becomes inconsistent, leading to errors or unintended behavior.
Example of Correct Configuration:
Total chance: 30% + 50% + 20% = 100%. This configuration works as intended.
Example of Incorrect Configuration:
Total chance: 60% + 50% + 20% = 130%. This exceeds 100% and will cause errors.
When the total chance is below 100%, the system will generate "empty" slots for the remaining percentage. For instance, if the total
Ensure Total Chance โค 100%:
Always double-check that the total chance for each loot type does not exceed 100%.
If the total is below 100%, players may find empty slots.
How to get empty loot?
When the total chance is less than 100%, the system fills the remaining percentage with "empty" slots. These empty slots represent unsuccessful loot attempts, simulating a more realistic and less predictable looting experience.
Example with Empty Slots:
Total chance: 40% + 30% = 70%.
Thereโs a 30% chance of finding nothing in each iteration.
The loop Feature
The loop
feature controls how many times the loot logic runs for a single loot interaction. Each iteration of the loop gives players another chance to receive an item. This creates the possibility of receiving multiple items from a single lootable entity.
How it works:
The script runs the loot logic
loop
times.For each iteration, the system checks the item's chance and decides whether the item will drop.
Example:
In this case, the loot system will run 3 iterations.
On each iteration, the script will randomly decide whether to drop "drink water" (30% chance) or "308win" (15% chance).
Purpose of the loop
Feature:
Increases the chances of obtaining multiple items during a single loot interaction.
Adds variability to looting outcomes, making the process more dynamic and rewarding.
Use loop
Wisely:
Avoid setting excessively high loop values (e.g., 10+), as this can make looting too easy and unbalanced.
Recommended values: 1 to 5 loops for a balanced experience.
Combining loop
with loopIncrease
loop
with loopIncrease
The loopIncrease
feature works with predefined zones (Config.lootIncreaseZones
) to give players even more chances to loot additional items.
Example:
In regular zones, the loot logic runs 3 times.
In lootIncreaseZones, the script adds
loopIncrease
to the default loop value, making it 5 iterations.
This makes looting in specific zones more rewarding and encourages players to explore high-risk or high-reward areas.
Refresh Time
The refreshTime
determines how long (in minutes) it takes for a lootable entity to reset and become lootable again.
Example:
Players can loot car wrecks every 10 minutes.
After being looted, the entity enters a cooldown period where it cannot be interacted with.
Last updated