A sprite sheet is the walking character. It is a PNG file in the NPC's sprites/ folder, chosen by file name. Nothing about it is set in TOML, except the optional sleeping pose below. The face shown during dialogue is a separate image: see Portraits.
NPCs/Rei/
└── sprites/
├── Default.png
├── Hospital.png
├── summer.png
└── Hospital_Summer.png
Default.png is the main sprite sheet. The other files are variants that change by place, season or festival: see Image variants.
Step 1: Make the sprite sheet#
- The sheet is 64 pixels wide: 4 columns of frames, each 16 wide and 32 tall.
- Each row is one direction, in this order: down, right, up, left.
- The columns of a row are the walking frames for that direction.
- Frames are numbered from the top left, left to right, so frame 0 is the first cell of row 1, frame 4 is the first cell of row 2, and so on (
frame = row × 4 + column, counting from 0).
A sheet 128 pixels tall holds the four walking rows and is enough for an NPC who cannot marry.
Extra poses for a marriageable NPC#
A marriageable NPC needs more frames, so the sheet is taller (320 pixels tall holds ten rows).
| Pose | Frame | Where it is |
|---|---|---|
| Spouse kiss | 28 | First cell of row 8 (x 0, y 224) |
| Wedding: facing the guests | 36 | Row 10, first cell (x 0, y 288) |
| Wedding: turning to the farmer | 37 | Row 10, second cell (x 16, y 288) |
| Wedding: the kiss | 38 | Row 10, third cell (x 32, y 288) |
Draw the wedding outfit in frames 36, 37, and 38. The ceremony shows the spouse in these frames of the normal sprite sheet. They are not in a separate wedding image. For the wedding text and the wedding portrait, see Marriage and Portraits.
If a frame is empty, or the sheet ends before it, the NPC becomes invisible during that pose. NPC Helper 2 checks these frames for every marriageable NPC, in Default.png and in every variant. It warns and names the empty or missing frame. Placeholder sheets created by the command-line tool are 320 pixels tall so they include the wedding frames.
A sleeping pose#
A married NPC goes to the bed in the farmhouse at night, and an NPC with a bed stop in her schedule goes to bed too. The game only shows her asleep when she has a sleeping pose. Without one she stands at the bed. Draw the pose in any free frame, and give its number as SleepFrame in [Home] of the NPC file:
[Home]
Map = "Hospital"
X = 9
Y = 7
SleepFrame = 52
The game's own villagers use a standing pose with the eyes closed, so a copy of the front-facing frame with closed eyes is enough. Frame 52 (row 14, first cell: x 0, y 416) is a good choice because nothing else uses it. A sheet 448 pixels tall has room for it.
NPC Helper 2 warns when the sleep frame is empty or outside the sheet, because the NPC would be invisible while she sleeps. A marriageable NPC with no SleepFrame gets a note in the log.
Replacing the sprite from another mod#
Someone else can give your NPC another sprite sheet, or add outfits, in an outfit pack. A sprites/Default.png in that pack replaces yours for the whole NPC, so it must have the frames described above. NPC Helper 2 checks the sheet it ends up using for the kiss, wedding and sleeping frames, and warns about each empty one. It does not check outfits that come from another mod. See Replacing images from other mods.
Step 2: Check your sprites#
- Save as PNG. Use transparency for the area around the character.
- Check the size: 64 wide, with frames 16 by 32.
- Start the game and check the log. A message like
No sprite image foundmeanssprites/Default.pngis missing. - Walk the NPC in each direction.
Then make the face images in Portraits.
Translating#
Images are not translated. Only text and data are. See Localization.