Zero Sievert

Custom Sprite Framework allows you add or replace existing game sprite by using a specific naming convention and allows you to define their frame count, origin values, collision bounding boxesand animation speed. It scans the folder inside "zero sievert/mods/textures/" to find all the png files.
It will replace the game's internal sprite if the name of the sprite matches the game's internal sprite name. If the name does not match, it will instead adds the sprite into the game'ssprite assets, which can be referenced by their spritename.
In order to modify the sprite's properties, i've setup a set of prefix in which you can define the sprite properties using this naming convention :
SpriteName_fcountN_xorgN_yorgN_bboxN_speedN_bleftN_brightN_bbotN_btopN.pngĀ 

The N in each prefixes in the naming convention corresponds to a numerical value that you can define for the sprite's properties. Here's a glossary
that explains each prefixes is :

  • SpriteName: Self-explanatory
  • fcount: Indicates the number of sub-images a sprite has.
  • xorg and yorg: Define the sprite's origin values.
  • bbox: Stands for the sprite's collision mask, the values can be 0, 1, or 2.
  • speed: Used for sprites with multiple sub-images to set their animation speed in frames per second.
  • Directional bounding boxes: Only used if bbox is set to 2, for manual collision with user-defined values.

In order to replace a sprite, you need a png sprite file that's named the same as the game sprite assets name, for example placing s_item_bread.png at the mods/textures/ directory will replace the bread sprite as is. If you plan on modifying their sprite properties you can add the extra prefixes like this
s_item_bread_fcount1_xorg6_yorg9.png

I have set a default values for the prefixes if you didn't define any of them. The default values of each prefixes being :
Fcount = 1
xorg and yorg = 0
bbox = 0
speed = 15
all directional bbox = 0

Common issue that you might encounter :
  • Invisible or broken sprite are caused by incorrect fcount values such as 0 or if it has more or less than the sprite sub-image has
  • Weapon sprite cannot be dragged from the inventory Most of the inventory sprite uses bbox values of 1, that should fix it

Article information

Added on

Edited on

Written by

yajneS

0 comments