-
Notifications
You must be signed in to change notification settings - Fork 7
tutorial
Since this plugin requires a resourcepack, let's configure the related settings first.
You can find the following content in the BetterDamage/config.yml file:
pack-path: BetterDamage/build
pack-type: zip # folder, zip
Currently, the resource pack is set to build.zip inside the BetterDamage folder.
You can change pack-type to folder if you prefer, but since I'm using Nexo, I'll only modify the pack-path.
pack-path: Nexo/pack/external_packs/BetterDamage
I won’t be providing alternative methods, so you’ll need to handle them on your own.
The structure of this plugin is very simple.
In this tutorial, we will follow this structure exactly as it is.
Damage images are displayed in bitmap format, with each position fixed as [0 1 2 3 4 5 6 7 8 9].
The horizontal size of the image is fixed at 10 times the vertical size, and each character is allocated a vertical size.
Creating images can be tedious, so let's download a pre-made example image instead.
Save the file as img.png and place it in the BetterDamage/assets folder.
Now, we need to register the created image.
Go to the BetterDamage/images folder and create a yml file with any name.
I'll name mine tuto_image.yml
tuto_image:
file: "img.png"
space: 5
The file field should point to the path of the image we just created, and space controls the spacing between characters.
Negative values are also allowed.
This part is crucial as it involves formulas, allowing for custom elements.
However, for simplicity, let's just increase the font size and make the y value rise.
Create a yml file in the BetterDamage/effects folder, just like you did with the images folder.
Since you've set the image to tuto_image, let's input it like this:
tuto_effect:
image: tuto_image
duration: 20
interval: 2
color: "#FFFFFF"
transformation:
position:
x: 0
y: t * 0.1
z: 0
rotation:
x: 0
z: 0
y: 0
scale:
x: 3
y: 3
z: 3
The damage will be displayed for 20 ticks and its position will be updated every 2 ticks.
The color option will only work if the image's color is in the white color range. For now, let's skip it and try it later.
We're almost there.
Just like we did earlier, create a yml file in the BetterDamage/skins folder and enter the following content.
For more detailed information about the skins, refer to the comments in default_skin.yml later.
tuto_skin:
skins:
bukkit_damage: tuto_effect
All settings are complete.
Now, let's register with the default-skin and check it.
Adjust the following options in BetterDamage/config.yml:
default-effect: none
default-skin: tuto_skin
Since default-skin and default-effect cannot be used together, one of them should not be used.
To deactivate, use a name that is not valid (e.g., none, blahblah).
Now, run /bd reload and reapply the resourcepack.








