Skip to content

2. First Reward

Pieter edited this page Jan 18, 2023 · 4 revisions

2.1 Create your first custom fish

2.1.1 Open up rewards.yml

Navigate to the /plugins/CustomFishing folder and open the rewards.yml file. The following default configuration will be available:

## ================================================================================#
##  ------------------------------------------------------------------------------ #
##                                      TOOLS                                      #
##                      Variables are indicated with $example$                     #
##  ------------------------------------------------------------------------------ #
## ================================================================================#
# 
# LENGTH IN CM
# TIER EXP INCREASE IN PERCENT
Rewards:
    '1':
        Settings:
            Odds: 100
            Base-Exp: 1
            Tier-Exp-Increase: 1
            Min-Length: 10
            Max-Length: 100
        Display-Item:
            Material: player skull
            Name: Shrimp
            CustomModelData: ''
            NBT: '{SkullOwner:{Id:[I;-136113858,1739476752,-1734587434,1470085214],Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZTM5NmQwNWMyNWM2MDZlMWFjZjRkMjEwNTNjNmE4ZjhiOWYyZTRmM2RmYjI4Njc3NDg3NmZiZWYzNTNmYzhkZSJ9fX0="}]}}}'
    '2':
        Settings:
            Odds: 50
            Base-Exp: 5
            Tier-Exp-Increase: 5
            Min-Length: 50
            Max-Length: 500
        Display-Item:
            Material: player skull
            Name: Jelly Fish
            CustomModelData: ''
            NBT: '{SkullOwner:{Id:[I;1530531909,1988838351,-1694938012,2021217404],Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWQwNzI3MzJkYjcwZmRhZjBiMmFhZTY3YmM0MTViZTE1MzAwYWIzMzZhMTRmMTk5YTRmNDEzMGRiNDM1NTFhMiJ9fX0="}]}}}'
    '3':
        Settings:
            Odds: 25
            Base-Exp: 10
            Tier-Exp-Increase: 10
            Min-Length: 100
            Max-Length: 1000
        Display-Item:
            Material: player skull
            Name: Shark
            CustomModelData: ''
            NBT: '{SkullOwner:{Id:[I;256567980,523716603,-2038951551,223618077],Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjg2ZGYwMWY1MTU1NmJhOGM4ZTc4MWIwYmIwZjhkNjk0OTZiZjQwYTg4NDVhOWEzZDQ1NjYzOGQ5YjI0MmVlNiJ9fX0="}]}}}'

2.1.2 Reward ID

Each reward needs a unique ID. This is the ID which will be used throughout the skript to be able to select the proper item, lores and other settings. This ID has to be numeric and unique. You can't have two identical reward IDs.

For example:

Rewards:
    '1':
        Settings:
            ...
        Display-Item:
            ...

2.1.3 Reward Settings

The reward settings determine the reward characteristics. You can indicate the odds to catch it, the exp gain, the exp increase per tier and much more. Please reuse the settings format from the default rewards when creating new rewards to avoid formatting mistakes. The minimum and maximum length, together with the fish tier, will determine the value the fish will get in the /fisherman menu. Formula: amount of fish * price per centimeter (config.yml) * length

For example:

Rewards:
    '1':
        Settings:
            Odds: 100
            Base-Exp: 1
            Tier-Exp-Increase: 1
            Min-Length: 10
            Max-Length: 100
        Display-Item:
            ...

2.1.4 Reward Display Item

The display item settings determine which physical item ingame the reward represent. In the default case, the reward is a player skull with a custom skin. Skull skins can be set using the NBT setting. You can fill in the nbt data for the skin here. You can use https://minecraft-heads.com/ for example to find appropriate skull textures. The Custom settig can be used to add CustomModelData to the items. Leave empty (= '') if not used, same holds for NBT values. Additionally, the lore can be customized to your liking. Note: lore is available in config.yml under the Rewards section. You can use the following placeholders inside of your lore:

  • $player$ = the player who caught the fish
  • $length$ = the length of the fish
  • $tier$ = the tier of the fish

For example:

Rewards:
    '1':
        Settings:
            ...
        Display-Item:
            Material: player skull
            Name: Shrimp
            CustomModelData: ''
            NBT: '{SkullOwner:{Id:[I;-136113858,1739476752,-1734587434,1470085214],Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZTM5NmQwNWMyNWM2MDZlMWFjZjRkMjEwNTNjNmE4ZjhiOWYyZTRmM2RmYjI4Njc3NDg3NmZiZWYzNTNmYzhkZSJ9fX0="}]}}}'

And that is it! Easy right?