Skip to content

tutorial

nixie123 edited this page Nov 2, 2024 · 17 revisions

Before get started, can't help apply resourcepack,

but can help set them up if using itemsadder or oraxen.

How-to-install

and will use economy plugin with vault as an example, so install it if you can.

If you applied the resourcepack successfully, you should see something like this.

Will be applying images, layouts, heads, and some features to it.

1. Applying fonts

First of all, will get a TTF font and apply it.

  1. put files with extensions like ttf and otf in the fonts folder.

  1. create a yml file in the texts folder (You can name all the files you create however you want.)

  1. in “texts/example.yml”, enter the following
example_font:
  file: example.ttf
  scale: 16

For more information, see the following Link

2-1. Putting text on the screen

  1. create yml file in the layouts folder.

  2. enter the following

example_layout:
  texts:
    1:
      name: example_font
      pattern: "text"
      x: 0
      y: 0

When set font above, we set the font ID to 'example_font'

name is the font to use and the pattern is the content to put in it.

Similarly, the layout has an ID of 'example_layout'

cannot be viewed directly on the screen, so need to set up a hud or popup to output it.

  1. Create yml file in the huds folder and enter the following
example_hud:
  layouts:
    1:
      name: example_layout
      x: 50
      y: 50

In the hud file, name refers to the layout ID to be output.

The coordinates simply mean that it is centered, for more information, read the feature wiki.

  1. Add a line to config.yml and do “/hud reload”
default-hud:
- test_hud
- example_hud

This is the hud that will be displayed by default.

  1. Then reapply the resource pack. If you are using itemsadder, enter “/iazip”

  2. It looks great! To learn more about text layout, check out the wiki

2-2. To output the PlaceholderAPI

  1. Return to the layout again and modify the pattern content. vault_money
pattern: "[vault_money]"

This is a PAPI built into BetterHud and can be found at the following link for more information

  1. Good, patterns can mix papi and plain text. Set it up like this
pattern: "[vault_money]$"

If you do “/hud reload”, it will look like this.

  1. Let's use the operations feature.
pattern: "[vault_money@t + 50]$"

won't use it to display money, but will find plenty of uses for it. [wiki]

3. Putting image on the screen

Let's start with an image that exists in the hud by default.

Just like did with the font, layout, and hud, we need to give the image an ID.

have omitted the image, but you can put it in your assets folder.

  1. Create a yml file in the images folder and fill it with the following
example_image:
  type: single
  file: air_bar.png
  1. Back in the layout, enter the following
example_layout:
  texts:
    1:
      name: example_font
      pattern: "[vault_money@t + 50]$"
      x: 0
      y: 0
  images:
    1:
      name: example_image
      x: 0
      y: -10

Can just do “/hud reload” for the x-coordinate, but will need to reapply the resourcepack for the y-coordinate.

  1. Reapply the resourcepack after “/hud reload”

4. Putting head on the screen

If you've made it this far, you should have a basic idea of the structure of the HUD. Yeah, that's just the way it is.

  1. Create a yml file in your heads folder and enter the following The pixel option indicates the size of the head pixels.
example_head:
  pixel: 4
  1. Back in layout, enter the following
  texts:
    1:
      name: example_font
      pattern: "[vault_money@t + 50]$"
      x: 0
      y: 0
  images:
    1:
      name: example_image
      x: 0
      y: -10
  heads:
    0:
      name: example_head
      x: 0
      y: 20

  1. Reapply the resourcepack after “/hud reload”
Clone this wiki locally