msw-scripting

Author, validate, and debug MapleStory Worlds .mlua scripts with playtest workflows.

Updated Sep 11, 2026
One-click install
npx skills add https://github.com/yoongang02/MapleFist --skill msw-scripting-yoongang02
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: msw-scripting
Source: https://github.com/yoongang02/MapleFist/tree/main/.agents/skills/msw-scripting
Command: npx skills add https://github.com/yoongang02/MapleFist --skill msw-scripting-yoongang02

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing MapleStory Worlds scripts requires platform-specific knowledge that general Lua experience does not cover: mlua annotations, execution spaces, property sync, and the event system. Guessing APIs or applying Unity-style patterns produces code that compiles but silently fails at runtime, and this Skill prevents those failures with verified workflows. ## Core Features & Use Cases - Script Authoring Rules: Enforces correct use of @Component/@Logic declarations, ExecSpace annotations, lifecycle methods, property sync (@Sync, SyncTable), and the event system (ConnectEvent, @EventSender). - API Verification Workflow: Requires checking engine API signatures in Environment/NativeScripts .d.mlua files before writing code, with LSP diagnostics after every edit. - Playtest & Debug Loop: Provides a structured verify checklist covering build logs, runtime logs, log-evidence requirements, and DataStorage cost-safe patterns. - Use Case: When asked to add a monster AI component to a MapleStory Worlds project, the Skill searches existing scripts first, verifies API signatures, writes the .mlua in the correct feature folder, refreshes the Maker, and validates via build and runtime logs. ## Quick Start Ask the AI to create a new MapleStory Worlds component script, such as a monster chase AI, and have it verify the result through build and runtime logs.

Frequently Asked Questions about msw-scripting

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a MapleStory Worlds script in mlua?

Declare a script with @Component or @Logic, define properties, and implement lifecycle methods like OnBeginPlay and OnUpdate with the correct @ExecSpace annotation. Always verify API signatures in Environment/NativeScripts .d.mlua files before writing code.

What is the difference between @Component and @Logic in MSW?

@Component scripts attach to an entity and access it via self.Entity, while @Logic scripts are world-wide singletons accessed as _ScriptName with no self.Entity. Choose based on lifetime: map-scoped or actor-scoped behavior uses @Component, world-persistent state uses @Logic.

Why does my MSW script compile but do nothing at runtime?

Common causes include guessing API names, applying Unity patterns like physics colliders for touch input, or mismatched @ExecSpace on method overrides. Verify signatures against .d.mlua files and check runtime logs for silent failures.

How do I sync properties between server and client in MapleStory Worlds?

Mark properties with @Sync for server-to-all-clients replication or @TargetUserSync for per-user data. Collections require SyncTable declared without a default literal, and client-side reactions use the ClientOnly OnSyncProperty callback.

Can I call DataStorage every frame in MapleStory Worlds?

No, DataStorage calls consume Credit per request and must be event-driven, never inside OnUpdate or short timers. Use a cache with dirty-check and debounced flush, and Batch operations for multiple keys.