Skip to content

Commit

Permalink
add health icon info to character doc
Browse files Browse the repository at this point in the history
also testing the github action
  • Loading branch information
ThatRozebudDude committed Nov 18, 2024
1 parent 5b58e24 commit 10b9c86
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/Creating-a-New-Character.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,26 @@ The following functions can only be used by texture atlases:
- `label`: The name of the frame label that the animation starts at.
- `length`: How long the animation is in frames. The animation will end after this many frames have been played.

## Custom Health Icon

To add a new health icon to a character, you have to create an image with the same name as `info.iconName` in the `images/ui/healthIcons/` folder. A health icon has to include 3 parts: a neutral icon, a losing icon, and a winning icon, in that order. They must be layed out next to each other horizontally. The icon can be any resolution as long as each part is the same resolution since the game automatically divides the icon image up into 3 equal width parts. You can also include a JSON file with the same name as the icon to adjust a few properites about it. It can contain the following fields:

- `antialiasing`: A boolean that determines whether to apply antialiasing to the icon. Week 6 icons set this to false.
- `offset`: An object with an `x` and `y` field that are used to reposition the icon.
- `x`: Amount in pixel to reposition the icon horizontally.
- `y`: Amount in pixel to reposition the icon vertically.

If you are making a 150 x 150 icon like what base game uses, make a JSON file with the following properties to have it be aligned the same way it would normally be aligned in base game.

```json
{
"offset": {
"x": 10,
"y": -10
}
}
```

## Extra Character Info

That is all you really need to know to set up a basic character, however there are more options you can use to create more advanced characters. None of these fields need to manually be set but they can help make a character more interesting.
Expand Down

0 comments on commit 10b9c86

Please sign in to comment.