msw-sprite-ruid
msw-git/msw-ai-coding-plugins-official
Native RUID support for sprite and animation rendering with thumbnail:// prefix for icons and previews.
What is msw-sprite-ruid?
Enables direct assignment of sprite and animationclip RUIDs to SpriteRendererComponent (world) and SpriteGUIRendererComponent (UI), plus thumbnail:// prefix for static resource previews. Use when rendering sprites, animations, or item icons in world or UI contexts.
- Assign sprite or animationclip RUIDs directly to SpriteRendererComponent.SpriteRUID (world) and SpriteGUIRendererComponent.ImageRUID (UI)
- Render static thumbnail images from any resource type (sprite, animationclip, skeleton, avataritem) using thumbnail:// prefix
- Display avatar item icons in inventory slots, shop listings, and UI previews
- Support single looping animations for background effects and props without requiring animator components
- Handle multi-state animations via StateAnimationComponent + ActionSheet for complex behaviors
How to install msw-sprite-ruid
npx skills add https://github.com/msw-git/msw-ai-coding-plugins-official --skill msw-sprite-ruidHow to use msw-sprite-ruid
- 1.For world sprites: assign the sprite or animationclip RUID directly to SpriteRendererComponent.SpriteRUID as a plain string
- 2.For UI images: assign the RUID to SpriteGUIRendererComponent.ImageRUID using DataRef(ruid) in runtime Lua code
- 3.To render a static thumbnail, prepend thumbnail:// to any resource RUID before assignment
- 4.For multi-state animations, use StateAnimationComponent + ActionSheet instead of direct RUID assignment
- 5.Use msw-search skill to find avatar item and resource RUIDs before assigning them
Use cases
- Assigning an animationclip RUID to a background decoration or idle effect sprite renderer
- Creating inventory slot icons by prepending thumbnail:// to an avataritem RUID
- Displaying a skeleton or avataritem as a static preview image in a shop UI
- Rendering item icons in equip preview panels without animation
- Setting a sprite RUID directly on a world entity's SpriteRendererComponent at runtime
- Game developers building inventory and shop UIs
- Programmers implementing character or item preview systems
- Developers working with sprite-based animations and static thumbnails
- Teams managing avatar items and costume systems
msw-sprite-ruid FAQ
skeleton and avataritem RUIDs require the thumbnail:// prefix to render. Without it, they fail silently. Prepend thumbnail:// to the RUID before assignment.
Direct assignment plays live animation (for animationclip) or renders the sprite. The thumbnail:// prefix renders a static preview image from any resource type, useful for icons and previews.
Use DataRef(ruid) in runtime Lua: self.Entity.SpriteGUIRendererComponent.ImageRUID = DataRef("thumbnail://" .. avatarItemRuid). The { DataId: ... } object form is only for .ui/.model JSON files.
No. thumbnail:// produces a static image only. For multi-state animations (stand/move/attack), use StateAnimationComponent + ActionSheet and assign the animationclip RUID directly without the prefix.
No. If msw-search returned a sprite RUID that is already an icon or thumbnail image, assign it directly without the prefix. The prefix is for converting source resources into thumbnails, not for already-thumbnail results.
Full instructions (SKILL.md)
Source of truth, from msw-git/msw-ai-coding-plugins-official.
name: msw-sprite-ruid description: "SpriteRendererComponent.SpriteRUID (world) and SpriteGUIRendererComponent.ImageRUID (UI) — native RUID type support (sprite / animationclip direct playback), thumbnail:// prefix for rendering avataritem / skeleton / animationclip as static thumbnail image, avatar item icon in inventory / shop / UI slot. Use when: assigning any RUID to a sprite renderer component, displaying an avatar item or resource as a thumbnail or icon, using animationclip directly in a renderer, rendering inventory item icons, displaying a thumbnail image in a world entity. Keywords: SpriteRUID, ImageRUID, thumbnail://, animationclip, RUID apply, RUID assign, thumbnail, item icon, sprite RUID, RUID to renderer"
MSW Sprite RUID
Rules for assigning a RUID to SpriteRendererComponent.SpriteRUID (world) or
SpriteGUIRendererComponent.ImageRUID (UI).
Native type support
Both components accept a sprite or animationclip RUID directly — no extra
animator component required.
| Component | Property | Value form (runtime .mlua) | Native RUID types |
|---|---|---|---|
SpriteRendererComponent (world) | SpriteRUID | plain string | sprite, animationclip |
SpriteGUIRendererComponent (UI) | ImageRUID | DataRef("...") | sprite, animationclip |
ImageRUID is a DataRef: in runtime .mlua, assign DataRef(ruid).
Use { DataId: ruid } only in .ui / .model JSON or builder patch data.
SpriteRUID remains a plain string.
-- World: sprite or animationclip RUID both work
self.Entity.SpriteRendererComponent.SpriteRUID = ruid
-- UI: sprite or animationclip RUID both work
self.Entity.SpriteGUIRendererComponent.ImageRUID = DataRef(ruid)
A skeleton / avataritem RUID assigned without the thumbnail:// prefix
fails silently (no error, nothing renders).
animationclip: single animation vs multi-state
- Single looping animation (background deco, idle effect, prop): set
SpriteRUIDorImageRUIDdirectly to theanimationclipRUID. - Multi-state (stand / move / attack / hit / die): use
StateAnimationComponent+ActionSheet. Seemsw-general/references/monster.md.
thumbnail:// prefix — static thumbnail from any resource
Prepend thumbnail:// to SpriteRUID or ImageRUID to render a static
thumbnail image from any resource — useful for icons, preview images, and item
thumbnails.
thumbnail://<32-char hex RUID>
Accepted types: sprite · animationclip · skeleton · avataritem
-- World thumbnail (any resource type)
self.Entity.SpriteRendererComponent.SpriteRUID = "thumbnail://" .. anyRuid
-- UI thumbnail (any resource type)
self.Entity.SpriteGUIRendererComponent.ImageRUID = DataRef("thumbnail://" .. anyRuid)
Primary use case: avataritem icons
avataritem RUIDs cannot render without thumbnail://. With the prefix they
become item icons for inventory slots, shop listings, and equip previews.
slotEntity.SpriteGUIRendererComponent.ImageRUID = DataRef("thumbnail://" .. avatarItemRuid)
Search avatar item RUIDs with the msw-search skill (searchAvatarItems).
Common pitfalls
skeleton/avataritemdirectly intoSpriteRUID/ImageRUIDwithout prefix → silently invisible.thumbnail://= static image only. For live animation, assign theanimationclipRUID directly (no prefix).- Runtime
.mluausesImageRUID = DataRef("..."); the{ "DataId": "..." }object form is.ui/.modelJSON only (the prefix goes insideDataId, not a separate field). Do not use the table form in runtime code — the LSP rejects it as aDataReftype mismatch. CostumeManagerComponent.Custom*Equip,StateAnimationComponent.ActionSheet, andSkeletonRendererComponent.SkeletonRUIDdo not acceptthumbnail://.- Do not prepend
thumbnail://to a RUID that was already retrieved as a thumbnail or icon image frommsw-search. The prefix converts a source resource into its thumbnail — applying it to an already-thumbnail sprite is logically redundant. If the search query targeted an icon / thumbnail image and returned aspriteRUID, assign that RUID directly without any prefix. - To search for RUIDs use the
msw-searchskill —searchAvatarItemsfor avatar items;searchResourcesfor everything else.
Related skills
More from msw-git/msw-ai-coding-plugins-official and the wider catalog.

msw-ui-system
Complete MSW UI system: design guide, component API, builder, and runtime patterns for `.ui` files.

msw-avatar
Manage avatar costumes (17 equip slots) and animation state mapping for any entity.

msw-behaviourtree
End-to-end authoring for MSW `.behaviourtree` files with automatic spec generation and validation.

msw-combat-system
Complete MSW 2D combat system integration covering attack resolution, damage, hit reactions, game feel, and AI FSM.

karpathy-guidelines
Behavioral guidelines to reduce common LLM coding mistakes through explicit assumptions, simplicity, surgical changes, and verifiable success criteria.

context-engineering-collection
Comprehensive guidance for building production AI agent systems through context engineering, multi-agent coordination, and reliable operating loops.