Back to Skills

msw-ui-system

MSW `.ui` single entry point — design + component API + builder + runtime. Anchor/pivot/RectTransform, UIGroup/CanvasGroup hierarchy, layout recipes (HUD/popup/toast/menu/inventory/scroll-list), full API tables for ButtonComponent/TextComponent/SpriteGUIRendererComponent/ScrollLayoutGroup/GridView/TextInput/Slider/Mask/AvatarGUIRenderer + UI enums (AlignmentType/OverflowType/ImageType/FillAmount), `.mlua` runtime patterns (popup open-close, toast, HP bar, GridView, drag, tab, cooldown, world nam

30stars2forksUpdated 6/29/2026

Security Assessment

Safe(100/100)
Security Score100/100

About msw-ui-system

A single entry point for everything related to MSW (MapleStory Worlds) .ui work, bundling design guidance, component API and enum reference, builder invocation, and runtime .mlua patterns into one skill. It covers the RectTransform model (anchor, pivot, anchoredPosition), the UIGroup/CanvasGroup hierarchy and z-ordering, layout recipes for HUDs, popups, toasts, menus, inventory grids, and scroll lists, and full API tables for components such as ButtonComponent, TextComponent, SpriteGUIRendererComponent, ScrollLayoutGroup, GridView, TextInput, Slider, Mask, and AvatarGUIRenderer, alongside UI enums like AlignmentType, OverflowType, ImageType, and FillAmount. Runtime topics include popup open/close, toast fade, HP bars, GridView, drag, tabs, cooldowns, and world nametags, plus the caveat that UI is client-only and nil on the server with no RPC.

The skill is organized as a router: based on request keywords it branches to sub-reference documents — ui-fundamentals for coordinates and anchors and mobile/safe-area concerns, ui-hierarchy for UIGroup/displayOrder/CanvasGroup, component-api for component selection and property/method/enum tables, layout-recipes for ready-made layouts, runtime-patterns for .mlua behavior, and ui-sound for click and hover SFX. The component-api reference is required reading before any .mlua access to UI component fields, and the builder protocol lives in a shared msw-general/references/builder-protocol.md document alongside the .map MapBuilder and .model ModelBuilder because the cross-flows are interlocked.

A strict set of global rules governs mutations. All .ui creation and modification must go through scripts/msw_ui_builder.cjs, and even reads must use UIBuilder.read/find/listEntities rather than grep or cat, since direct file access is blocked by a registered guard to preserve UUID, ValueType, and @components consistency. Other rules forbid setting Position directly (use anchoredPosition), mixing fixed-anchor offsets with anchoredPosition, and leaving .mlua property-default UUIDs unsynced after the builder mints new ones — bindings are auto-injected via b.write with a bind option or b.injectBindings. The recommended ten-step workflow runs from clarifying intent and checking a design guide through builder preflight, recipe matching, building, binding injection, automatic lint via ui_lint.cjs, preview, a sound pass for interactive buttons, and an engine refresh. Touch targets are required to be at least 88x88 for mobile.

FAQ

How must .ui files be created or edited?

Only through scripts/msw_ui_builder.cjs. Directly editing the .ui JSON is forbidden because it breaks UUID, ValueType, and @components consistency and causes silent drops.

How do I read an existing .ui file?

Through the builder, using UIBuilder.read/load/snapshot/find/listEntities. Direct Read and shell tools like cat, grep, sed, or awk on .ui files are blocked by a registered guard.

Why does my text stick to the left after I tried to center it?

Because the TextComponent Alignment default is UpperLeft(0). The doc flags verifying this default as the cause of roughly 95% of such complaints; you must set the alignment explicitly.

Can UI logic run on the server?

No. UI is client-only; UI components are nil on the server and there is no RPC. This is called out as a runtime caveat in the runtime-patterns reference.

What is the minimum recommended button touch target?

At least 88x88 to support mobile. The skill also suggests wiring click and hover SFX for any interactive button via the ui-sound reference unless the button is purely decorative.

All Files

43 files
references/layout-recipes.md11.4 KB
View
references/component-api.md37.4 KB
View
references/runtime-patterns.md15.5 KB
View
references/templates/scripts/ui-structure.cjs8.6 KB
View
references/templates/style-1-black/DefaultGroup.ui11.2 KB
View
references/templates/style-1-black/HUDGroup.ui101.9 KB
View
references/templates/style-1-black/ruid-map.md3.5 KB
View
references/templates/style-1-black/ToastGroup.ui8.5 KB
View
references/templates/style-2-diary/Popupbutton.mlua2.6 KB
View
references/templates/style-2-diary/PopupGroup.ui398.8 KB
View
references/templates/style-2-diary/structure.md3.8 KB
View
references/templates/style-2-diary/TrashBin.ui3.0 KB
View
references/templates/style-3-wood/DefaultGroup.ui11.1 KB
View
references/templates/style-3-wood/Popupbutton.mlua5.0 KB
View
scripts/ui_recipe.cjs13.2 KB
View
references/templates/scripts/ruid-lookup.cjs4.5 KB
View
references/templates/style-1-black/ButtonGroup.ui43.4 KB
View
references/templates/style-1-black/Popupbutton.mlua3.9 KB
View
references/templates/style-1-black/structure.md4.9 KB
View
references/templates/style-2-diary/HUDGroup.ui53.1 KB
View
references/templates/style-2-diary/Popupbutton.ui30.0 KB
View
references/templates/style-2-diary/ruid-map.md3.8 KB
View
references/templates/style-2-diary/ToastGroup.ui3.0 KB
View
references/templates/style-3-wood/ButtonGroup.ui76.8 KB
View
references/templates/style-3-wood/HUDGroup.ui138.1 KB
View
references/templates/style-3-wood/ruid-map.md5.9 KB
View
references/templates/style-3-wood/ToastGroup.ui8.1 KB
View
references/templates/style-4-blue/DefaultGroup.ui29.4 KB
View
references/templates/style-4-blue/Popupbutton.mlua5.3 KB
View
references/templates/style-4-blue/structure.md4.8 KB
View
references/templates/templates.md8.5 KB
View
references/ui-hierarchy.md8.8 KB
View
scripts/msw_ui_builder.cjs77.8 KB
View
scripts/preview_ui_layout.cjs7.4 KB
View
references/templates/style-3-wood/structure.md3.5 KB
View
references/templates/style-4-blue/ButtonGroup.ui82.3 KB
View
references/templates/style-4-blue/HUDGroup.ui96.6 KB
View
references/templates/style-4-blue/ruid-map.md7.2 KB
View
references/templates/style-4-blue/ToastGroup.ui8.1 KB
View
references/ui-fundamentals.md18.3 KB
View
references/ui-sound.md3.3 KB
View
scripts/ui_lint.cjs25.8 KB
View
SKILL.md9.9 KB
View

Install msw-ui-system

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill