Drop - NekomaDev/LiteFish GitHub Wiki
Fishing mechanics
The mini-game always starts with a Common chance
After successfully completing the mini-game, the player has a chance to upgrade to the next rarity (the odds change in expressions.json)
We have a chance of common->rare 50% and rare-epic 25%. Example: A player successfully completes a mini-game, receives a reward from the Common category and has a 50% chance to upgrade to the next rarity. If the chance works, the player starts the mini-game anew with the characteristics of a new rare drop and so on
Create drop
The drop itself is added through the game menu for convenience /lfish menu -> category -> rare -> put item to add
Then an object is created in dropData.json
{
"dropsItem": [
{
"id": 1718981082259,
"displayName": "COD",
"rarityId": 0,
"level_required": 0,
"amount": 1,
"chance": 0.0,
"health": 3,
"giveExp": 5,
"dataBase64": "rO0ABXNyABpvcmcuYnVra2l0LnV0aWwuaW8uV3JhcHBlcvJQR+zxEm8FAgABTAADbWFwdAAPTGphdmEvdXRpbC9NYXA7eHBzcgA1Y29tLmdvb2dsZS5jb21tb24uY29sbGVjdC5JbW11dGFibGVNYXAkU2VyaWFsaXplZEZvcm0AAAAAAAAAAAIAAkwABGtleXN0ABJMamF2YS9sYW5nL09iamVjdDtMAAZ2YWx1ZXNxAH4ABHhwdXIAE1tMamF2YS5sYW5nLk9iamVjdDuQzlifEHMpbAIAAHhwAAAAA3QAAj09dAABdnQABHR5cGV1cQB+AAYAAAADdAAeb3JnLmJ1a2tpdC5pbnZlbnRvcnkuSXRlbVN0YWNrc3IAEWphdmEubGFuZy5JbnRlZ2VyEuKgpPeBhzgCAAFJAAV2YWx1ZXhyABBqYXZhLmxhbmcuTnVtYmVyhqyVHQuU4IsCAAB4cAAADnR0AANDT0Q\u003d",
"randomDuration": false,
"randomEnchants": false,
"miniGame": true,
"commands": [
"/money add %player_name% 500",
"/exp add %player_name% 500"
],
"script": [
"before:effect DARKNESS 10 1",
"before:effect SLOW 10 5",
"before:playsound ENTITY_EVOKER_PREPARE_ATTACK 1 0.5",
"before:msg\u003d{#830FBD}A monster rises from the depths",
"hit:particle BOBBER GLOW_SQUID_INK",
"hit:playsound ENTITY_EVOKER_AMBIENT 1 0.01",
"hit:playsound ENTITY_LIGHTNING_BOLT_THUNDER 1 1",
"miss:effect WITHER 5 3",
"miss:playsound ENTITY_EVOKER_HURT 1 0.01" ]
}
]
}
displayName
- custom name. If you want it to be applied, you need to enable the setting "custom_display_name"
: true
in config.json
level_required
- the required level at which a given fish can catch
commands
- commands are executed when catching fish
script
- scripts for customizing a mini-game with a given fish
Most settings are configured through the menu
Treasure
When a treasure drops, a barrel is initialized, which is filled with a pre-added drop. Each position has an individual chance of appearing in the treasure. The barrel disappears 30 seconds after the appearance (can be changed in the config)
Group of items
Allows you to create a group of specific items for use in multiple categories. When this group drops out, a random item is selected from it
Natural Modifications
.
1 - A certain height range at which fishing takes place
2 - Weather (Rain or Thunderstorm)
3 - Time of day (Night or Day)
4 - Full moon
Baits
You can add a bait chance modifier to a specific catch. To do this, go to the bait settings and set the additional chance of this fish appearing if this bait is used
Script
Allows you to add interactive while the player is fishing
The event is located at the beginning of the expression and determines when the script should work.
Event | Description |
---|---|
before | Player started fishing |
after | Player has successfully caught a fish |
hit | Successfully hit a position in a minigame |
miss | Missed a position in a minigame |
List of available functions.
Function | Description |
---|---|
effect [EFFECT_NAME] [duration] [lvl] | Adds the given PotionEffect to the player |
playsound [SOUND_NAME] [volume] [pitch] | Plays a sound in the world |
particle [PLAYER / BOBBER] [PARTICLE_NAME] | PLAYER / BOBBER - determines the location where the particles will spawn |
command [YOUR_COMMAND] | Executes a command on behalf of the player. Supports Placeholders and Player Name [PLAYER_NAME] |
@command [YOUR_COMMAND] | Executes a command on behalf of the server. Supports Placeholders and Player Name [PLAYER_NAME] |
msg [YOUR_MESSAGE] | Sends a message to the player. Supports HEX text {#HEX} |