• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!
Resource icon

v21.1 Loot table system 1.1.1

This resource pertains to version 21.1 of Pokémon Essentials.
Pokémon Essentials Version
v21.1 ✅
The Loot Table System plugin provides a customizable framework for creating rewards in Pokémon Essentials. It allows developers to define rewards of various types, configure selection logic with weights and chances, and add additional rules like fallback rewards, conditions, and time limits. The system supports Pokémon, items, money, and Essentials built-in minigame Triple Triad Cards, with a easy customizable reward screen for players.

How it works
You can set up a loot table wich is just an array of reward types and other extra parameters an example could be
{ pokemon: :PIKACHU, chance: 0.2, level: 30, nature: :HASTY }
This would add a Pikachu reward to the loot table that has a 20% to be added as a reward for the player. After a loot table has been created you can call the startRewardScreen("Example_Loot_Name", minimum_rewards) where the first parameter is the name of the loot table and the second one is for what the least number of entries a player can recieve. There You can also add 3 more parameter to choose the textures the sceen should use and the colors of the name and buttons displayed.

Parameters in the plugin
:Item:
quantity: Specifies the number of items in the reward stack

:pokemon:
level: Specifies the Pokémon's level.
gender: true = male, false = female, nil = genderless.
form: Specifies what form the pokemon is using.
nature: Specifies the nature.
ability: Specifies the ability.
moves: Specifies the Pokémon's moves.
shiny: true = shiny, false = not shiny.
shiny_odds: Specifies the odds for shiny.
super_shiny: true = super shiny, false = not super shiny.
super_shiny_odds: Specifies the odds for super shiny.
ivs: Custom IV values for each stat.
iv_range: Randomize IVs within a range for each stat.

:Rules:
can_get_multible: Allows the reward to be selected over and over again even if player already owns that entry
no_limit: Multiple copies of this reward can appear on the reward screen

:Extra:
time_limit: Specifies a time window during which the reward is available.
-> start: The start date and time in "YYYY-MM-DD HH:MM:SS" format.
-> end: The end date and time in "YYYY-MM-DD HH:MM:SS" format.
conditions: An array of conditions (if statements) that must all be met for the reward to appear. These can use any custom logic.
fallback: Specifies an alternative reward if the primary reward cannot be given.

Example of how a loot table can be constructed
"Example" => [
{ item: :POTION, weight: 10, can_get_multible: true, no_limit: true },
{ item: :SUPERPOTION, weight: 5, can_get_multible: true, no_limit: true },
{ item: :RARECANDY, weight: 1, can_get_multible: true },
{ pokemon: :PIKACHU, weight: 4, level: 50, can_get_multible: true, no_limit: true, gender: true },
{ pokemon: :MEWTWO, weight: 6, shiny_odds: 16, can_get_multible: true, form: 1 },
{ pokemon: :GROUDON, weight: 2, shiny: true, can_get_multible: false },
{ pokemon: :SANDSLASH, weight: 10, shiny: false },
{ pokemon: :SANDSLASH, weight: 10, shiny: false, form: 1 },
{ pokemon: :SLAKING, chance: 0.02, ability: :HUGEPOWER, nature: :ADAMANT, moves: [:EARTHQUAKE, :EXTREMESPEED] },
{ money: 2000, weight: 3 },
{ money: 5000, weight: 2 },
{ money: 10000, weight: 1 },
{ card: :LUCARIO, weight: 5, no_limit: true, time_limit: { start: "2024-12-13", end: "2024-12-20" } },
{ pokemon: :DARKRAI, chance: 0.8, can_get_multible: false, fallback: { card: :DARKRAI, can_get_multible: true } }
]
Credits
Amareev
Author
Amareev
Downloads
10
Views
10
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from Amareev

Latest updates

  1. Added yearly time

    Added so you can setup rewards that will come up each year between specified time instead of...
Back
Top