msw-general
MSW General — Foundation Skill
The foundation skill for MSW (MapleStory Worlds) creation, integrating shared tools, domain knowledge, platform rules, and file authoring. Every other MSW skill depends on it.
Core Principle: Visual Polish
MSW is a game creation platform. The goal is not a prototype where logic merely runs — it is a polished game players can enjoy.
So whatever entity you create — monster, NPC, tower, item, background object — search for and apply appropriate resources (sprites, animations, sounds) that match its role and personality. Do not leave the default sprite in place or leave SpriteRUID empty.
Resource application principle when creating an entity:
- After creating the entity, use the
msw-searchskill to find sprites/animations that fit it - Apply the RUID of the found resource to
SpriteRendererComponentso the entity is visually represented - If there is combat, also set hit/explosion effects; if there is interaction, set sound effects
Functionality implemented != finished. A polished game requires appropriate resources plus visual presentation.
When making a .model — catalog first
Do not start a new .model from an empty file. The skill-local models/ folder contains validated templates organized by category — monsters (ChaseMonster/MoveMonster/StaticMonster), NPC (StaticNPC), players (Player/DefaultPlayer), terrain (Foothold/Ladder/Rope/Portal), map objects (MapObject/SkeletonMapObject/ItemAsset), particles (BasicParticle/SpriteParticle/AreaParticle/AnimationPlayer), sound (Sound/SoundEffect), tile map containers (TileMap/RectTileMap), UI (UIButton/UIText/UISprite/UIGroup, etc.), external media (WebSprite/YoutubePlayerWorld).
Workflow: pick the closest template from the catalog → Read → replace the 3 identifiers (EntryKey, Id, Name) → customize Components/Values → save under a typed subfolder of RootDesk/MyDesk/Models/ (e.g. Models/Monsters/{Name}.model, never directly under MyDesk/) → refresh. Detailed catalog and substitution procedure: references/model.md §2.
Every template includes a consistent
MODNativeTypeassembly string — this avoids the most common mistake of writing ValueType by hand and producing a silent failure.
For a monster, start with
models/MonsterCanonical.modeland references/monster.md. The other monster templates (ChaseMonster/MoveMonster/StaticMonster) leaveActionSheetempty and use defaults that silently fail (uppercase keys,SortingLayer="Default",IsLegacy=true).
Placing multiple entities — model first
If the same entity is going to appear twice or more in a map (5 monsters, 10 trees, 3 portals, …), author a .model first and place each instance via modelId rather than copy-pasting inline @components.
| Instance count of same composition | Choice |
|---|---|
| 1 (truly one-off decoration in a single map) | inline @components is acceptable |
| ≥2 | .model + modelId instances (default) |
Spawned at runtime (SpawnByModelId) |
.model is required regardless of count |
Why this is the default:
- Edit once, propagate everywhere — change
SpriteRUID/HP/ActionSheetin the model and every instance updates. Inline copies require touching N entities each time. - Smaller, reviewable
.mapdiffs —modelIdinstances carry onlyTransformoverrides; inline copies bloat the map by hundreds of lines per entity. - Avoids drift — five inline copies silently diverge (one gets
IsLegacy: true, another forgetsSortingLayer: "MapLayer0"). The model anchors the canonical values. - Required for
SpawnByModelId— without a registered model id, dynamic spawning fails.
Workflow:
- Author
.modelunderRootDesk/MyDesk/Models/{Category}/{Name}.model(see folder rule above). - In
.mapEntities[], each instance setsmodelId+origin.entry_idto the same id, with onlyTransformComponent(and any per-instance overrides) in@components. refresh.
Details and the inline-vs-modelId comparison: references/entity.md "Two-Step Map Editing Workflow", references/model.md §1.
Entity Work Preflight — MUST
If the task involves an entity in any way, you must read references/entity.md first. No exceptions.
Map Work Preflight (do this BEFORE any map work)
Before starting any map-related task — entity placement, spawn, movement scripts, model authoring, tile edits, etc. — you must complete these two steps in order:
- Identify the target map — its path (
./map/{mapname}.map), its root entity, and its location in the Hierarchy. - Open that
.mapfile directly and readMapComponent.TileMapModeas a number. Keep the value in mind for the rest of the session.
| Value | Mode | Required Body | Runtime log on mismatch / missing Body |
|---|---|---|---|
0 |
TileMap (MapleTile, side-view + Foothold) | RigidbodyComponent |
[LEA-3004] MissingComponent : Entity에 'RigidbodyComponent'가 없습니다. |
1 |
RectTileMap (RectTile, top-down) | KinematicbodyComponent |
[LEA-3004] MissingComponent : Entity에 'KinematicbodyComponent'가 없습니다. |
2 |
SideViewRectTileMap (SideViewRectTile, side-view tile) | SideviewbodyComponent |
[LEA-3004] MissingComponent : Entity에 'SideviewbodyComponent'가 없습니다. |
Never start map work without knowing the current TileMapMode. The three modes differ completely in Body component, gravity, collision, and event stacks. A mismatch is almost never a compile-time error — it shows up either as a silent failure (entity doesn't move / passes through walls / invisible) or as one of the three [LEA-3004] MissingComponent runtime logs above. Whenever you see one of those three messages, suspect a TileMapMode ↔ entity Body mismatch first.
Details: references/platform.md §4 (mapping + check protocol), references/platform.md §11 (troubleshooting table), references/entity.md "Map Work Preflight".
8 Core Rules (must memorize)
- If you don't align TileMapMode ↔ Body mapping, the entity will not move (no error) or raises
[LEA-3004] MissingComponentat runtime → references/platform.md §4 - User scripts only work as a
.mlua+.codeblockpair —.codeblockis generated by Maker Refresh - If
SpriteRUIDis an empty string, the entity is invisible on screen (no error) - When calling
SpawnByModelId, not passing a map entity (self.Entity.CurrentMap) asparentcauses a runtime error - Coordinates are in world units (1 unit = 100 px). Pixel values are off by 100x
- Maker only scans
RootDesk/— user files placed inGlobal/will not be recognized - Do not modify
.d.mluaor.codeblock. For.map/.ui/.model, prefer dedicated builders/editors over direct JSON editing - CoreVersion is
26.3.0.0— do not work if there is a mismatch
MCP Tool Quick Reference (msw-maker-mcp)
| Tool | Purpose |
|---|---|
| play / stop | Enter / exit play mode |
| refresh | Sync Maker after file change (not allowed during play) |
| logs / clear_logs | Read / clear runtime and build logs |
| screenshot | Call only when explicitly requested by the user |
| keyboard_input / mouse_input | Simulate input in play mode |
Usage limits, parameters, async behavior detail → references/mcp-tools.md On MCP call failure / "MCP connection" / "API Key" requests →
msw-env-setupskill
Per-task routing — which reference to read
Environment / domain understanding
| What you want to know | File to read |
|---|---|
| MCP tool detail (parameters, constraints, async) | references/mcp-tools.md |
| World instance, Room, workspace, hierarchy, file paths, play mode | references/workspace.md |
Platform rules / map / physics
| What you want to know | File to read |
|---|---|
| TileMapMode ↔ Body, file pairs, coordinate system, layers, SpriteRUID, spawn rules | references/platform.md §1-8 |
| MapleTile/RectTile/SideViewRectTile physics, movement, collision per map type | references/platform.md §9 |
| Troubleshooting (not visible / not moving / floating in air / passing through walls, etc.) | references/platform.md §11 |
.directory, ID generation, EntryKey, .config, CoreVersion |
references/platform.md §2,14-16 |
File authoring (.map / .model / .ui / .dataset)
| Task | File to read |
|---|---|
| File authoring routing / shared principles | references/authoring.md |
.map tile maps and tile sets (TileMapMode, tileMap, .tileset) |
references/tile.md |
.model templates (components, Properties, Values, Children) |
references/model.md |
.map entity placement / spawn / hierarchy |
references/entity.md |
.map JSON schema detail |
references/entity/map-schema.md |
.model JSON schema detail |
references/model/model-schema.md |
.ui authoring (anchors, UITransform, button/text/image/scroll) |
references/ui.md |
.ui schema, component API, enums, real-world patterns |
references/ui/ui-schema.md, ui/ui-components.md, ui/ui-enums.md, ui/ui-patterns.md |
.userdataset / .localedataset authoring |
references/dataset.md |
Template catalog when creating a new .model (monsters/NPCs/players/terrain/UI/sound, etc.) |
references/model.md §2.1 → models/*.model |
Monster authoring (canonical 11 components, ActionSheet lowercase keys stand/move/attack/hit/die/jump, HitComponent / IsLegacy / SortingLayer required overrides) |
references/monster.md → models/MonsterCanonical.model |
Absolute Principles (apply to every task)
- If the task involves an entity, read references/entity.md first. No exceptions.
- Visual polish — never leave
SpriteRUIDempty. Usemsw-searchto find resources. refreshafter every file change (if in play mode,stopfirst).- Never modify
Environment/*.d.mlua— API definitions are read-only. - Never create or modify
.codeblockby hand — Makerrefreshgenerates it from.mlua. - Do not create new user files in
Global/— Maker will not recognize them. User files belong underRootDesk/MyDesk/. - Edit large files partially — never overwrite a
.map/.model/.uiin full. - Entity reference binding (Entity/EntityRef property) — the AI injects the UUID string directly. Do not ask the user to drag in Maker.
- Stop work on CoreVersion mismatch — first verify
CoreVersioninGlobal/WorldConfig.configis26.3.0.0. - Call
screenshotonly when the user explicitly requests it. Never call it automatically after task completion. - If a workflow step fails mid-flow, stop later steps — fix the root cause first.
- Two-or-more = make a model. Whenever the same entity composition is placed ≥2 times in a map, author a
.modelfirst and instance it viamodelId. Inline@componentsduplication is reserved for genuine one-off entities. - Models live in typed subfolders. Save new
.modelfiles under a category subfolder ofRootDesk/MyDesk/Models/(e.g.Models/Monsters/,Models/NPCs/,Models/Terrain/,Models/MapObjects/,Models/Particles/,Models/UI/) — never directly underMyDesk/orModels/. When a needed subfolder does not exist, create it together with a.directoryfile at the same level (see references/platform.md §2).
Related Skills
| Skill | Purpose |
|---|---|
msw-env-setup |
.mcp.json creation, API Key setup, MCP server connection |
msw-scripting |
.mlua authoring, @Component/@Logic, ExecSpace, @Sync, lifecycle, playtest / debugging |
msw-search |
Vector search for RUIDs, assets, docs, API |
msw-defaultplayer |
Player model, movement speed, jump force, HP, camera |
msw-avatar |
Avatar costume slots, equipment |
More from msw-git/msw-ai-coding-plugins-official
msw-search
MSW search integration — (1) vector search for API docs and implementation guides (msw-guide-mcp or curl against mlua_Document_Retriever / mlua_API_Retriever), (2) REST API search for resources (sprite / animation / sound / resource pack / avatar). Use for 'find details, examples, or related APIs not in .d.mlua', 'need a SpriteRUID', 'monster sprite', 'background image', 'find a sound', 'avatar rendering', etc. Keywords: document search, API details, examples, guide, retriever, resource, sprite, animation, sound, RUID, resource pack, avatar.
25msw-scripting
Authoring MSW scripts (.mlua) plus integrated playtest and debugging. Covers mlua syntax, annotations (@Component/@Logic/@ExecSpace/@Sync), lifecycle, exec spaces, property sync, event system, file workflow, build-log inspection, error classification, and the test/debug loop. Keywords: script, mlua, lua, Component, Logic, annotation, ExecSpace, Sync, event, play, test, debug, lifecycle.
25msw-defaultplayer
MSW DefaultPlayer(캐릭터) 관리. DefaultPlayer.model 파일 직접 조회/수정, 컴포넌트 추가/제거, 이동 속도/점프력/HP/카메라 설정, 맵 모드별 이동 컴포넌트. Use for DefaultPlayer model, player components, movement speed, jump force, HP, camera, physics. Keywords: player, DefaultPlayer, speed, jump, HP, camera, gravity, 플레이어, 캐릭터, 이동속도, 점프력, 중력, 카메라, 체력, 부활.
25msw-costume
MSW 아바타 코스튬 관리. 코스튬 조회/적용, CostumeManagerComponent 17슬롯, 아바타 유틸리티. DefaultPlayer뿐 아니라 모든 엔티티(NPC, 몬스터 등)에 적용 가능. Use for avatar costume get/set, CostumeManagerComponent 17 equip slots, avatar utilities. Keywords: costume, avatar, equip, slot, 코스튬, 아바타, 장비, 꾸미기, 모자, 상의, 하의, 무기.
23msw-avatar
MSW 아바타 관리 — 코스튬(CostumeManagerComponent 17슬롯) + 애니메이션 3계층 파이프라인(StateComponent → AvatarStateAnimationComponent → AvatarRendererComponent). State 키(대문자)/AvatarBodyActionStateName(소문자)/MapleAvatarBodyActionState enum/스프라이트 액션 ID(swingO1, shoot1) 4단계 구분, IsLegacy/ActionSheet/StateToAvatarBodyActionSheet 두 시스템, PlayerControllerComponent 자동 상태 전이와 ActionStateChangedEvent 충돌 시 RemoveActionSheet/SetActionSheet/BodyActionStateChangeEvent로 해결. DefaultPlayer뿐 아니라 모든 엔티티(NPC, 몬스터 등)에 적용 가능. Use for avatar 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, ActionStateChangedEvent, BodyActionStateChangeEvent, RemoveActionSheet, SetActionSheet, StateToAvatarBodyActionSheet, AvatarStateAnimationComponent, AvatarRendererComponent, MapleAvatarBodyActionState, PlayerControllerComponent, 아바타, 코스튬, 애니메이션, 상태, 동작, 장비, 무기, 공격, 활, 칼, 사격, 휘두르기, 커스텀 액션, 자동 재생 차단, 매핑 변경.
3msw-combat-system
MSW 전투 시스템 통합 가이드. Attack→Hit 파이프라인, 데미지 모델, i-frame, 넉백, Hit Stop, Camera Shake, Sprite Flash, SFX, 사망/부활, 데미지 스킨, 히트 이펙트, 아바타 전투 모션, 커스텀 이벤트, AI FSM 까지 MSW 네이티브 API 기반 2D 다장르 대응. '공격', '피격', '데미지', '전투', '몬스터', '히트', '이펙트', '크리티컬', '투사체', '데미지 스킨', '넉백', '히트스톱', '콤보', 'HP바' 등.
3