Items, clothing and animations

Items

The project's inventory items with pictures, their settings and entry code, giving an item to Player 1 and usable items in mechanics.

You open items on the left bar: Items. The middle shows a grid of items with their pictures, the way the inventory sees them. The item you click shows on the right, in Selection.

What it needs

Items live in the project’s inventory resource, and the studio reads and writes them through its adapter. Without an inventory resource with an adapter, the tab says what is missing instead of the list. Resources → What the project can do shows the missing capability and lets you make an adapter (chapter Capabilities). The studio has no inventory of its own to stand in.

The list works while the server runs, because the inventory resource reads it.

The list

  • Above the grid are the kinds: All, Items, Weapons, Ammo, Weapon attachments. Only the kinds the project has show up.
  • Search works on the label and on the name in code.
  • No picture (n) leaves only items without a picture.
  • New item opens an empty form. The name in code is lowercase letters, digits and _ (e.g. tyre).

The picked item

  • Add picture… or Change picture… takes a PNG, JPG or WEBP file. The studio saves it where the inventory resource keeps its pictures and restarts that resource.
  • Give to Player 1 with the Amount field gives the item to Player 1’s character in the game.
  • Delete item asks before it deletes. Players who have it are left with an item the inventory does not know.

You change the entry in two tabs.

Settings is a form in sections: Basics (label, description, weight, stacking, consumption), Use, Animation, Prop in hand, Blocked while in use, Status after use and Durability. A weapon has wear per shot, ammo and a throwable option; a weapon attachment has its kind, GTA components and the time to put it on.

Lua code shows the whole entry including functions. An entry with functions can only be changed here, because the form does not save them. Save code checks that the file loads.

An entry from the inventory resource’s file is saved in the studio’s own block. The resource’s file stays as it is and survives an update of the resource.

A usable item

In Use, tick Usable: runs mechanics with the target “przedmiot”. Using the item from the inventory then runs the mechanics that have this item as their target and use as their trigger (chapter Mechanics). The same section sets the use time with a progress bar, the text on the bar and a notification after use.

Claude

Claude changes items over MCP: item_info (the entry and where it comes from), item_define (single fields, the whole entry or its Lua code), item_image, item_remove.

A question this page does not answer? Ask it on Discord.

Webexe Studio

Click to see it at 100%.