msw-ai-tf/maplestory-worlds-creator-docs huggingface dataset:
MapleAvatarItemCategory

Indicates the avatar item classification of MapleStory.

# Members

[{"Name":"Invalid","Value":"0","Desc":"Undefined state. Used for error detection."},{"Name":"Body","Value":"1","Desc":"An item equipped in the avatar body slot."},{"Name":"Head","Value":"2","Desc":"Can't use this item. The color will be automatically matched to the body color."},{"Name":"Hair","Value":"3","Desc":"An item equipped in the avatar hair slot."},{"Name":"Face","Value":"4","Desc":"An item equipped in the avatar face slot."},{"Name":"Cap","Value":"5","Desc":"An item equipped in the avatar cap slot."},{"Name":"Cape","Value":"6","Desc":"An item equipped in the avatar cape slot."},{"Name":"Coat","Value":"7","Desc":"An item equipped in the avatar coat slot."},{"Name":"Glove","Value":"8","Desc":"An item equipped in the avatar gloves slot."},{"Name":"Longcoat","Value":"9","Desc":"An item equipped in the avatar long coat slot. Uses coat and pants slots."},{"Name":"Pants","Value":"10","Desc":"An item equipped in the avatar pants slot."},{"Name":"Shield","Value":"11","Desc":"An item equipped in the avatar shield slot. Uses the sub weapon slot."},{"Name":"Shoes","Value":"12","Desc":"An item equipped in the avatar shoes slot."},{"Name":"OneHandedWeapon","Value":"13","Desc":"An item equipped in the avatar 1H weapon slot."},{"Name":"TwoHandedWeapon","Value":"14","Desc":"An item equipped in the avatar 2H weapon slot. Uses 1H weapon and the sub-weapon slots."},{"Name":"SubWeapon","Value":"15","Desc":"An item equipped in the avatar sub weapon slot."},{"Name":"FaceAccessory","Value":"16","Desc":"An item equipped in the avatar face accessory slot."},{"Name":"EyeAccessory","Value":"17","Desc":"An item equipped in the avatar eyes accessory slot."},{"Name":"EarAccessory","Value":"18","Desc":"An item equipped in the avatar ears accessory slot."},{"Name":"Ear","Value":"19","Desc":"An item equipped in the avatar ears slot."}]

# Methods

[{"index":"MapleAvatarItemCategory CastFrom(number value) (Static)","0":"Converts numbers to the applicable type."}]

[{"index":"MapleAvatarItemCategory CastFrom(string value) (Static)","0":"Converts strings to the applicable type."}]
TagComponent

You can find specific Entities by the tag added to the Entity. Use EntityService to find tags.

# Properties

[{"index":"SyncList Tags (Sync)","0":"Sets tag list. Multiple tags can be set."}]

##### inherited from Component:

[{"index":"boolean Enable (Sync)","0":"Checks whether Component is activated or not."}]

[{"index":"boolean EnableInHierarchy (ReadOnly) (HideFromInspector)","0":"Displays whether this Component is Enable in the hierarchy. If Entity Enable is false regardless of Component Enable, returns false."}]

[{"index":"Entity Entity (ReadOnly)","0":"The Entity that owns this component."}]

# Methods

[{"index":"void AddTag(string tag)","0":"Adds tag value."}]

[{"index":"void RemoveTag(string tag)","0":"Deletes tag value."}]

##### inherited from Component:

[{"index":"boolean IsClient()","0":"Returns whether the current execution environment is a client or not."}]

[{"index":"boolean IsServer()","0":"Returns whether the current execution environment is a server or not."}]

# Examples

The following is an example of a game with the goal to reach the finish line within a set amount of time. The Qualified Tag is added when the character enters the area. The winner is displayed after 10 seconds by changing the player's NameTag with the qualified tag.
    
    
    @Component
    script QualifiedPlayerMarker extends Component
        @ExecSpace("ServerOnly")
        method void OnBeginPlay()
        local showWinner = function()
        	local winners = _EntityService:GetEntitiesByTag("Qualified")
    
        	for i = 1, #winners do
        		local nametag = winners[i].NameTagComponent
        		nametag.FontColor = Color.green
        		nametag.FontSize = 4
        		nametag.Name = "★ Qualified ★"
        	end
        end
    
        _TimerService:SetTimerOnce(showWinner, 10.0)
        end
    
        @EventSender("Self")
        handler HandleTriggerEnterEvent(TriggerEnterEvent event)
        -- Parameters
        local TriggerBodyEntity = event.TriggerBodyEntity
        --------------------------------------------------------
    
        if TriggerBodyEntity.PlayerComponent == nil then
        	return
        end
    
        TriggerBodyEntity.TagComponent:AddTag("Qualified")
        end
    end
    

# SeeAlso

  * NameTagComponent
  * PlayerComponent
  * TriggerEnterEvent
  * EntityService
  * TimerService
  * [EntityService to Search for Entities](/docs?postId=201)
SpriteTypeOverlayLightInfo

The information about a Sprite-type light source that will spawn in the map.

# Properties

[{"index":"Color Color","0":"The color of the light source."}]

[{"index":"Entity Instigator","0":"An entity that belongs to the map where a light source will be added."}]

[{"index":"float Intensity","0":"The intensity of the light source."}]

[{"index":"float Lifetime","0":"The amount of time the light source will display. The created light source will automatically disappear upon reaching the specified time. However, when a value equal to or lower than 0 is input, the light source will remain indefinitely."}]

[{"index":"int32 LightOrder","0":"Determines the rendering order of a light source light texture. The light source with a smaller number will be rendered first, and then, the larger number light source will be rendered on top. Operates when OverlapOperation is set to AlphaBlend. Global-type light sources don't have LightOrder as an exception."}]

[{"index":"boolean Loop","0":"Whether the spotlight will be played repeatedly. If a single-frame sprite is false, it disappears immediately."}]

[{"index":"OverlayLightOverlapOperation OverlapOperation","0":"How to calculate a light source. Global-type light sources don't have OverlapOperation."}]

[{"index":"float PlayRate","0":"The play speed of an animation clip resource that is used for a Sprite-type light source. The larger the value, the faster the play speed."}]

[{"index":"string SpriteRUID","0":"The RUID of the sprite that will be drawn by a Sprite-type light source."}]

[{"index":"Vector3 WorldPosition","0":"The world's spacial coordinates for the light source."}]

[{"index":"Vector3 WorldScale","0":"The world's spatial scale where the light source will be applied."}]

[{"index":"float WorldZRotation","0":"The world's spatial z-axis-based rotation value for where the light source will be applied."}]

# Constructors

[{"index":"SpriteTypeOverlayLightInfo(Entity instigator)","0":"Initializes SpriteTypeOverlayLightInfo to the specified value."}]

[{"index":"SpriteTypeOverlayLightInfo(Entity instigator, float lifetime, Vector3 worldPosition, float worldZRotation, Vector3 worldScale, Color color, float intensity, OverlayLightOverlapOperation overlapOperation, int32 lightOrder, string spriteRUID, float playRate, boolean loop)","0":"Initializes SpriteTypeOverlayLightInfo to the specified value."}]
table

# Functions

[{"index":"string concat(table table, string sep = \"\", integer i = 1, integer j = #table) (Static)","0":"Connects to the table elements to make a string. You can define the range and the classification symbols placed between each element."}]

[{"index":"void insert(table table, any value) (Static)","0":"Adds value to the end of the table."}]

[{"index":"void insert(table table, integer pos, any value) (Static)","0":"Adds a value to the specified position."}]

[{"index":"any remove(table table, integer pos = #table) (Static)","0":"Removes the value from the table and returns the value of the removed element. Removes the value at the specified position if pos is also delivered."}]

[{"index":"void sort(table table, func comp) (Static)","0":"Arranges the table. Arranges the table according to comp."}]

[{"index":"void sort(table table) (Static)","0":"Arranges the table."}]

[{"index":"table move(table a1, integer f, integer e, integer t, table a2 = a1) (Static)","0":"Assigns table elements from the table a1 to the table a2. Works on the same task as multiple assignments such as a2[t], · · · = a1[f], · · · , a1[e]. After assigning table elements, it returns a2."}]

[{"index":"table pack(any... args) (Static)","0":"Returns a new table with all the arguments in the field \"n\" after saving all the arguments in numeric key sequence."}]

[{"index":"any... unpack(table table, integer i = 1, integer j = #table) (Static)","0":"Returns each element from t. You can specify the start index in i and the last index in j."}]

[{"index":"table keys(table table) (Static)","0":"Returns the defined table's key list."}]

[{"index":"table values(table table) (Static)","0":"Returns the defined table's value list."}]

[{"index":"void clear(table table) (Static)","0":"Sets all key values in the defined table to nil."}]

[{"index":"void initialize(table t1, table t2) (Static)","0":"Initializes t1 with the elements of t2."}]

[{"index":"table create(integer size, any value = nil) (Static)","0":"Creates an array table of the input size. Resets the table's value with value."}]
AttachedSpriteTypeOverlayLightInfo

The Sprite-type light source information that will spawn as a child of an entity.

# Properties

[{"index":"Color Color","0":"The color of the light source."}]

[{"index":"float Intensity","0":"The intensity of the light source."}]

[{"index":"float Lifetime","0":"The amount of time the light source will display. The created light source will automatically disappear upon reaching the specified time. However, when a value equal to or lower than 0 is input, the light source will remain indefinitely."}]

[{"index":"int32 LightOrder","0":"Determines the rendering order of a light source light texture. The light source with a smaller number will be rendered first, and then, the larger number light source will be rendered on top. Operates when OverlapOperation is set to AlphaBlend. Global-type light sources don't have LightOrder as an exception."}]

[{"index":"Vector3 LocalPosition","0":"The parent entity's spatial coordinates for where the light source will be placed."}]

[{"index":"Vector3 LocalScale","0":"The parent entity's spatial scale where the light source will be applied to."}]

[{"index":"float LocalZRotation","0":"The parent entity's spatial z-axis-based rotation value for where the light source will be applied."}]

[{"index":"boolean Loop","0":"Whether the spotlight will be played repeatedly. If a single-frame sprite is false, it disappears immediately."}]

[{"index":"OverlayLightOverlapOperation OverlapOperation","0":"How to calculate a light source. Global-type light sources don't have OverlapOperation."}]

[{"index":"Entity ParentEntity","0":"An entity that will have a created light source added to it."}]

[{"index":"float PlayRate","0":"The play speed of an animation clip resource that is used for a Sprite-type light source. The larger the value, the faster the play speed."}]

[{"index":"string SpriteRUID","0":"The RUID of the sprite that will be drawn by a Sprite-type light source."}]

# Constructors

[{"index":"AttachedSpriteTypeOverlayLightInfo(Entity parentEntity)","0":"Initializes AttachedSpriteTypeOverlayLightInfo to the specified value."}]

[{"index":"AttachedSpriteTypeOverlayLightInfo(Entity parentEntity, float lifetime, Vector3 localPosition, float localZRotation, Vector3 localScale, Color color, float intensity, OverlayLightOverlapOperation overlapOperation, int32 lightOrder, string spriteRUID, float playRate, boolean loop)","0":"Initializes AttachedSpriteTypeOverlayLightInfo to the specified value."}]
AI Skill Set Installation

## Preparation

There are some necessary preparations for using AI skill sets.

  * All LocalWorkspace, ExtendedScriptFormat for the creator world must be activated.
  * The AI agent that the creator will use, such as , , or  must be installed and subscribed to.
  * For macOS, the MapleStory World client that fits Apple Silicon(arm64) or Intel(x86_64) must be installed. In the event that the Gatekeeper blocks the unsigned/external download binary execution when launching it for the first time on macOS, you can go to System Settings > Privacy and Security to ensure the item has the permission to be launched.



##### Reference Guide

  * [LocalWorkspace](docs/?postId=1165)
  * [AI ToolKit](/docs?postId=1374%7B%22target%22:%22_blank%22%7D)
  * 



### Node.js Installation

To use the AI skill set, [Node.js](https://nodejs.org%7B%22target%22:%22_blank%22%7D) must be pre-installed using a method suitable for the creator's OS environment. For Windows, Node.js is automatically installed when linking the AI skill set. For macOS, the creator must download or install it with the `brew install node` command.

> Learn More If the auto installation doesn't happen in Windows, you can do so manually using the `winget install OpenJS.NodeJS.LTS` command.

## AI Skill Set Installation

### Auto Install

As a default, the download begins when you press the [Link] button in AI ToolKit Settings - AI Skill Set. Once the install is complete, the link button will change to [Link Complete]. [png](17794154980639e63d9751e8b4385a037fd2bbd9ad433)

### Manual Install

If you press [Link] from the AI skill set and it doesn't auto-install, you can manually download the AI skill set as needed. When you manually install it, you must use `.gitignore` to exclude it from configuration control for it to function properly.

  1. Download or clone [msw-ai-coding-plugins-official](https://github.com/MSW-Git/msw-ai-coding-plugins-official%7B%22target%22:%22_blank%22%7D) to the creator's world local workspace.
  2. Add the path of msw-ai-coding-plugins-official that was downloaded to the world project's `.gitignore`.
  3. Restart the MCP and confirm whether the installation is complete.
World Instances

# Course Introduction

Let's learn about the concept, creation, and destruction of world instances. To fully understand world instances, it is recommended that you have a firm grasp of rooms first. Related reading: [Creating Instance Maps](/docs/?postId=540).

# World Instances

A world instance is a real entity based on world information created by the Maker. World instances are executed independently, and static rooms and instance rooms are configured according to the creator's production method.

> Tip All world instances within attached to a given world will use one DataStorage.

[png](1679291060113a0eff84f08214ed49d8a58ab3ba25664)

#### Communication Between World Instances

Since each World instance is executed individually, if you need to communicate between World instances or forward an event, you must use [RoomService](/apiReference/Services/RoomService) and [WorldInstanceService](/apiReference/Services/WorldInstanceService). For details on how to use it, refer to [World Instance Communication](/docs?postId=999).

# Creating and Destroying World Instances

During a world's launch phase, creators set the world's max number of players. This number is one of the criteria for creating new world instances. For example, if 100 users connect to a world where the maximum number of players is set to 10, then 10 world instances will be created. The criterion for destroying a world instance is when a user leaves. If all users quit playing and there are none remaining, the world instance is automatically destroyed. After a certain amount of time has elapsed since the world instance is created, it prepares for expiry. This means new users will not be able to connect to this instance. The world instance will continue to operate with the currently connected users until they all quit playing. [png](1679291087805feeafc80d6894e21bb6fa7acd50caf64)

#### User Assignment of World Instances

Which world instance a new user is assigned to is predicated on the number of people in one world instance. When there are no world instances active, a new world instance is created and incoming users will be sent to that world instance until it is full. Once the first world instance is full, a new instance will be created and the cycle continues. If you are running multiple World instances and users leave the World, vacancies will occur. At this point, a new World instance is no longer created when a new user connects. Instead, new users are sent to the World instance that has the most users among the available World instances. World instances that have started preparing for retirement are not included, even if the number of users is the highest. [png](167929120294711f23765789448a4a0b99bacfb91db09)
AIWanderComponent

AI that makes monsters wander around. Added automatically when StateComponent is not present.

# Properties

##### inherited from AIComponent:

[{"index":"string BehaviourTreeId (ReadOnly)","0":"The unique identifier of the behavior tree entry."}]

[{"index":"Blackboard BlackBoard (ReadOnly)","0":"This is the data store that is used in the AI behavior tree. It's managed in key-value pairs, and data is shared between behavior tree nodes."}]

[{"index":"boolean IsLegacy (ReadOnly)","0":"Sets whether to support the legacy system. Previous systems must use the ExclusiveExecutionWhenRunning property in order to set the node as Running. The legacy system is no longer supported and will be deleted at a later date."}]

[{"index":"boolean LogEnabled (ReadOnly)","0":"Outputs execution information into a log when the value is true while BehaviorTree runs. Operates in Maker mode only."}]

[{"index":"UpdateAuthorityType UpdateAuthority (ReadOnly)","0":"Update permission. Executed on the specified location (Client or Server)."}]

##### inherited from Component:

[{"index":"boolean Enable (Sync)","0":"Checks whether Component is activated or not."}]

[{"index":"boolean EnableInHierarchy (ReadOnly) (HideFromInspector)","0":"Displays whether this Component is Enable in the hierarchy. If Entity Enable is false regardless of Component Enable, returns false."}]

[{"index":"Entity Entity (ReadOnly)","0":"The Entity that owns this component."}]

# Methods

##### inherited from AIComponent:

[{"index":"BTNode CreateLeafNode(string nodeName, func -> BehaviourTreeStatus onBehaveFunction)","0":"Creates an Action node. Calls function that had been passed to onBehaveFunction when the node is executed. Parameter of onBehaveFunction is delta, which means time per frame."}]

[{"index":"BTNode CreateNode(string nodeType, string nodeName = nil, func -> BehaviourTreeStatus onBehaveFunction = nil)","0":"Creates an Action node based on BTNodeType. The nodeType is the type name of BTNodeType. If the onBehaveFunction isn't nil, the function that was passed to the onBehaveFunction will be called instead of functions OnInit() and OnBehave() of the BTNodeType. The parameter of the onBehaveFunction is delta, which means time per frame."}]

[{"index":"void SetRootNode(BTNode node)","0":"Sets the node as the top-level node."}]

##### inherited from Component:

[{"index":"boolean IsClient()","0":"Returns whether the current execution environment is a client or not."}]

[{"index":"boolean IsServer()","0":"Returns whether the current execution environment is a server or not."}]

# SeeAlso

  * StateComponent
FreeformTypeOverlayLightInfo

The information about a Freeform-type light source that will spawn in the map.

# Properties

[{"index":"Color Color","0":"The color of the light source."}]

[{"index":"float FalloffDistance","0":"Determines how much the light will stretch from FreeformPoints if the light source is a Freeform-type. The larger the value, the larger the size."}]

[{"index":"float FalloffIntensity","0":"Controls the softness of the curves when the light source starts to disappear. The larger the value, the more blurred and softer the edge looks. The smaller the value, the sharper and clearer the edge looks."}]

[{"index":"List FreeformPoints","0":"Points that define the shape of a Freeform-type light source. The number of points can't exceed 2,000."}]

[{"index":"Entity Instigator","0":"An entity that belongs to the map where a light source will be added."}]

[{"index":"float Intensity","0":"The luminous intensity of the light source."}]

[{"index":"float Lifetime","0":"The amount of time the light source will display. The created light source will automatically disappear upon reaching the specified time. However, when a value equal to or lower than 0 is input, the light source will remain indefinitely."}]

[{"index":"int32 LightOrder","0":"Determines the rendering order of a light source light texture. The light source with a smaller number will be rendered first, and then, the larger number light source will be rendered on top. Operates when OverlapOperation is set to AlphaBlend. Global-type light sources don't have LightOrder as an exception."}]

[{"index":"OverlayLightOverlapOperation OverlapOperation","0":"How to calculate a light source. Global-type light sources don't have OverlapOperation."}]

[{"index":"Vector3 WorldPosition","0":"The world space coordinates of the light source."}]

[{"index":"Vector3 WorldScale","0":"The world's spatial scale where the light source will be applied."}]

[{"index":"float WorldZRotation","0":"The world's spatial z-axis-based rotation value where the light source will be applied."}]

# Constructors

[{"index":"FreeformTypeOverlayLightInfo(Entity instigator)","0":"Initializes FreeformTypeOverlayLightInfo to the specified value."}]

[{"index":"FreeformTypeOverlayLightInfo(Entity instigator, float lifetime, Vector3 worldPosition, float worldZRotation, Vector3 worldScale, Color color, float intensity, OverlayLightOverlapOperation overlapOperation, int32 lightOrder, List freeformPoints, float falloffDistance, float falloffIntensity)","0":"Initializes FreeformTypeOverlayLightInfo to the specified value."}]