Shows wielded items in-world.
Modern alternative to
- Relies less on deprecated engine APIs, doesn't aim to support older MT versions
- Supports colored items. Works well with
- Supports glow (for environmental lighting use a wielded light mod)
- Indicates size of stacks
- Provides a proper API for mods to use
- Rotates the model instead of the texture
Code written by appgurueu and licensed under the MIT license.
All within the
visible_wielditem global variable.
Returns a table with fields
position (unit: metric/nodes),
rotation (unit: degrees) and
scale (number, unit: metric/nodes) based on model attachments and item tweaks.
Table. Keys are model media (file) names, values are tables with field
scale. The special field
default is used for default attachment settings based on
character.b3d if no model attachments are specified for a player model or if the specified attachment settings are incomplete.
Table of tweaks applied based on the item. Subtable entries have strings as keys and tweak tables with fields
scale as values.
positions are added up,
rotations are properly composed,
scale is multiplied.
Applies tweaks based on item type. Possible keys are
Tweaks for a key are applied if the item has an item group with that name.
Tweaks for a single item, by full item name.