Перейти к содержимому

Иконки инвентаря

Выбери пропы из игры или закинь свои PNG, затем обрежь, добавь отступы, измени размер и экспортируй чистый пак иконок для ox_inventory, qb-inventory или любого другого инвентаря, с готовым списком предметов для вставки.

Этот инструмент и его описание пока на английском.

ГенераторыИнвентарь, Иконки, СкачатьЧитать документацию

How to use it

  1. Pick props from the game pictures (search, click as many as you want, then Add) or drop your own PNG, JPG or WebP files anywhere on the page.
  2. Set the icon size, padding and look once for the whole pack. The big preview shows the selected icon, and a single icon can get its own background and padding settings.
  3. Fill in the items table. The item name is the file name too, so the image and the item always match.
  4. Pick your inventory and download the zip. It has the icons in the right folder, the item list to paste and a short README.

A pack of a few hundred icons stays smooth. Nothing is uploaded.

Where the files go

InventoryIconsItems
ox_inventoryox_inventory/web/images/ox_inventory/data/items.lua
qb-inventoryqb-inventory/html/images/qb-core/shared/items.lua
ps-inventoryps-inventory/html/images/qb-core/shared/items.lua
qs-inventoryqs-inventory/html/images/qs-inventory/shared/items.lua
codem-inventorycodem-inventory/html/itemimages/codem-inventory/config/itemlist.lua
ESX Legacy (no ox)your inventory UI's image folderitems table in the database

ox_inventory builds the picture path as web/images/<item name>.png unless the item sets client.image, so WebP exports add that line for every item. The qb style lists (qb, ps, qs, codem) store the full file name in image. After adding items, restart the inventory, and for qb-core based inventories restart qb-core as well (or the server).

Sizes

The stock icons of ox_inventory and qb-inventory are 100x100 PNG, and the inventory scales them to the slot. 128 is a good default, and 256 looks crisper on 1440p and 4K screens. The game prop pictures here are 160 px, so picking 256 or 512 upscales them. For sharp, hand made item art in high resolution, get it from Item Icons (18,000 item images) and drop the files here to trim and name them. Keep an eye on the pack size too: every icon is loaded by the inventory UI, and a few hundred 512 px PNGs add up.

Background removal

  • Auto only touches pictures without any transparency along the border, like photos and screenshots. Prop pictures and cut out PNGs are left alone.
  • Remove from the edges flood fills from the border with the corner colours. White parts inside the object stay, as long as they do not touch the background.
  • Remove one colour everywhere is a chroma key: good for green screen shots, but it also eats that colour inside the object.
  • Raise the tolerance when a halo stays around the object, lower it when parts of the object disappear. Busy or textured backgrounds need a real cut out in an image editor.

Item fields

  • Weight is in grams for ox, qb, ps, qs and codem. The ESX items table stores whole numbers in the unit of Config.MaxWeight (kg by default), so grams are rounded to kg with a minimum of 1.
  • Stack maps to stack in ox and to unique = not stack in the qb style lists.
  • Rarity exists in qs-inventory (rare, changes the slot colour) and in the ESX table (rare 0 or 1). qs items made from props also get object, the prop dropped in the world.
  • Usable, close on use and description map to useable, shouldClose / close and description. What happens when an item is used is still up to your scripts.

Sources