metadata_templates.lua: they appear in the item editor of the /inventory admin menu, where you can assign them to any item. See the Metadata guide for how templates are assigned to items.
Templates are kept in memory only. They are removed when your script stops and lost when jaksam_inventory restarts, so register them every time your script starts.
Parameters
Callback parameters
Return value
NoneNotes
- Server side only, as metadata is always generated by the server
- If your template ID is the same as one in
metadata_templates.lua, yours replaces it while your script is running, and the original one comes back when your script stops - While a template is not registered (your script hasn’t started yet, or has stopped), items using it are still added normally, only without that metadata field, and the server console shows a warning
