msw-git/msw-ai-coding-plugins-official

msw-sprite-ruid

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,…

Voir la source
Document Skill original

Rendu depuis le dépôt source en conservant titres, exemples, code, tableaux, liens et images.

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.

ComponentPropertyValue form (runtime .mlua)Native RUID types
SpriteRendererComponent (world)SpriteRUIDplain stringsprite, animationclip
SpriteGUIRendererComponent (UI)ImageRUIDDataRef("...")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.

lua
-- 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 SpriteRUID

or ImageRUID directly to the animationclip RUID.

  • Multi-state (stand / move / attack / hit / die): use StateAnimationComponent

\+ ActionSheet. See `msw-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

lua
-- 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.

lua
slotEntity.SpriteGUIRendererComponent.ImageRUID = DataRef("thumbnail://" .. avatarItemRuid)

Search avatar item RUIDs with the msw-search skill (searchAvatarItems).


Common pitfalls

  • skeleton / avataritem directly into SpriteRUID / ImageRUID without prefix → silently invisible.
  • thumbnail:// = static image only. For live animation, assign the animationclip RUID directly (no prefix).
  • Runtime .mlua uses ImageRUID = DataRef("..."); the { "DataId": "..." } object form is .ui / .model JSON only (the prefix goes inside DataId, not a separate field). Do not use the table form in runtime code — the LSP rejects it as a DataRef type mismatch.
  • CostumeManagerComponent.Custom*Equip, StateAnimationComponent.ActionSheet, and SkeletonRendererComponent.SkeletonRUID do not accept thumbnail://.
  • Do not prepend thumbnail:// to a RUID that was already retrieved as a thumbnail or icon image from msw-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 a sprite RUID, assign that RUID directly without any prefix.
  • To search for RUIDs use the msw-search skill — searchAvatarItems for avatar items; searchResources for everything else.
du même dépôt

Autres Skills

Tous les Skills
msw-git
Communauté

msw-avatar

MSW avatar management — costume (CostumeManagerComponent, 17 slots) + animation 3-layer pipeline (StateComponent → AvatarStateAnimationComponent → AvatarRendererComponent). Four-level distinction: State key (uppercase) / AvatarBodyActionStateName (lowercase) / MapleAvatarBodyActionState enum / sprite action ID (swingO1, shoot1). Two mapping systems via IsLegacy/ActionSheet/StateToAvatarBodyActionSheet. PlayerControllerComponent auto-transition conflicts with ActionStateChangedEvent resolved via RemoveActionSheet/SetActionSheet/BodyActionStateChangeEvent. Applies to any avatar-bearing entity (NPC, monster, etc.), not only DefaultPlayer. Use for costume get/set, 17 equip slots, animation state mapping, action override, weapon-specific attack motion, custom shoot/cast/dance action. Keywords: avatar, costume, animation, state, action, shoot, swing, weapon, equipment, custom action, block auto playback, remap.

installations
5
GitHub Stars
33
Mis à jour
29 juil.
msw-git
Communauté

msw-behaviourtree

Authors MSW .behaviourtree files end-to-end and maintains the project-specific authoring spec (.behaviourDocs/bt-spec.md). Scans every .codeblock whose paired .mlua extends ActionNode/DecoratorNode/CompositeNode to build a compact catalog of custom action/decorator/composite UUIDs, propertyKey names, and version-stamped MODNativeType strings. Then generates the full tree: RootNode → Nodes graph, Blackboard variables, nodeProperties wiring, and self-validates parent/child consistency. Triggers: 'create behaviourtree', 'new BT', 'add a behaviour tree', 'BT node graph', '비헤이비어 트리 만들어', '.behaviourtree 생성', 'SequenceNode SelectorNode', 'Blackboard variable', 'definitionId codeblock', 'startNodeId', 'build BT spec', 'refresh bt-spec', 'generate behaviourtree catalog', 'BT 스펙 생성', 'bt-spec.md 만들어', 'rescan BT nodes'.

installations
5
GitHub Stars
33
Mis à jour
29 juil.
msw-git
Communauté

msw-combat-system

MSW combat system integration guide. Covers the Attack→Hit pipeline, damage model, i-frame, knockback, Hit Stop, Camera Shake, Sprite Flash, SFX, death/revive, damage skin, hit effect, avatar combat motion, custom events, and AI FSM — all based on MSW native APIs for 2D multi-genre coverage. Keywords: attack, hit, damage, combat, monster, hit effect, critical, projectile, damage skin, knockback, hit stop, combo, HP bar, collision, contact hit, TriggerComponent.

installations
5
GitHub Stars
33
Mis à jour
29 juil.
msw-git
Communauté

msw-defaultplayer

MSW DefaultPlayer (character) management. Use the msw-general ModelBuilder to inspect/patch DefaultPlayer.model and Player.model, add/remove components, configure movement speed / jump force / HP / camera, and per-map-mode movement components. Use for DefaultPlayer model, player components, movement speed, jump force, HP, camera, physics. Keywords: player, DefaultPlayer, speed, jump, HP, camera, gravity, revive, respawn, character.

installations
5
GitHub Stars
33
Mis à jour
29 juil.