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

Can touch the UIEntity and have control over its behavior when touching.

# Properties

##### 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 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."}]

# Events

[{"index":"UITouchBeginDragEvent","0":"An event that occurs when a mouse drag starts on the UI Entity."}]

[{"index":"UITouchDownEvent","0":"An event that occurs when a touch or a mouse button input is made on the UI Entity."}]

[{"index":"UITouchDragEvent","0":"An event that occurs when an ongoing mouse drag input is being made on the UI Entity."}]

[{"index":"UITouchEndDragEvent","0":"An event that occurs when a mouse drag input ends on the UI Entity."}]

[{"index":"UITouchEnterEvent","0":"An event that occurs when a touch or mouse input enters the UI Entity."}]

[{"index":"UITouchExitEvent","0":"An event that occurs when a touch or mouse input leaves the UI Entity."}]

[{"index":"UITouchUpEvent","0":"An event that occurs when a touch or mouse input is released on the UI Entity."}]
MaskComponent

Makes only certain areas of the child UI Entity visible using a mask.

# Properties

[{"index":"RectOffset Padding","0":"Sets the free space on the top, bottom, left, and right of the mask."}]

[{"index":"MaskShape Shape","0":"Specifies the shape of the mask."}]

[{"index":"Vector2Int Softness","0":"Determines the area to blur naturally from the edge area of the mask."}]

##### 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 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

When initializing a UI Entity, padding is added to the mask, reducing the visible area. This is an example of setting `Softness` and processing the softness of the edge of the child entity.
    
    
    @Component
    script MaskVisualConfigurator extends Component
        @ExecSpace("ClientOnly")
        method void OnInitialize()
        self.Entity.MaskComponent.Softness = Vector2Int(10, 10)
        self.Entity.MaskComponent.Padding = RectOffset(10, 10, 10, 10)
        end
    end
    

# SeeAlso

  * RectOffset
  * Vector2Int
SortingLayerChangedEvent

This event occurs when changing the component's SortingLayer.  
  
This event is triggered by the API below.

  * AreaParticleComponent (Space;Server,Client)
  * AvatarRendererComponent (Space;Server,Client)
  * BasicParticleComponent (Space;Server,Client)
  * ButtonComponent (Space;Server,Client)
  * ClimbableSpriteRendererComponent (Space;Server,Client)
  * LineRendererComponent (Space;Server,Client)
  * PixelGUIRendererComponent (Space;Server,Client)
  * PixelRendererComponent (Space;Server,Client)
  * PolygonRendererComponent (Space;Server,Client)
  * RawImageRendererComponent (Space;Server,Client)
  * ScrollLayoutGroupComponent (Space;Server,Client)
  * SkeletonRendererComponent (Space;Server,Client)
  * SliderComponent (Space;Server,Client)
  * SpriteGUIRendererComponent (Space;Server,Client)
  * SpriteParticleComponent (Space;Server,Client)
  * SpriteRendererComponent (Space;Server,Client)
  * TextComponent (Space;Server,Client)
  * TextGUIRendererComponent (Space;Server,Client)
  * TextGUIRendererInputComponent (Space;Server,Client)
  * TextInputComponent (Space;Server,Client)
  * TextRendererComponent (Space;Server,Client)
  * WebSpriteComponent (Space;Server,Client)
  * WebViewComponent (Space;Server,Client)
  * YoutubePlayerGUIComponent (Space;Server,Client)
  * YoutubePlayerWorldComponent (Space;Server,Client)



# Properties

[{"index":"string SortingLayer","0":"Changed SortingLayer."}]

# Constructors

[{"index":"SortingLayerChangedEvent(string sortingLayer = nil)","0":"Initializes the specified SortingLayerChangedEvent."}]
PolicyService

Provides the ability to look up policy information for each region.

# Methods

[{"index":"PolicyInfo GetPolicyInfoForUserAndWait(string userId) (ServerOnly) (ReleaseOnly) (Yield)","0":"Loads policy information for the region the user lives in. If it fails, nil will be returned. Script executions are suspended during operation. This function only works in the release environment. If executed in the Maker, nil will be returned."}]

[{"index":"void GetPolicyInfoForUserAsync(string userId, func callbackFunction) (ServerOnly) (ReleaseOnly)","0":"Loads policy information for the region the user lives in. The function passed to the callbackFunction is called after loading. If it fails, nil will be returned. This operation is performed asynchronously. If executed in a World still in progress, nil will be returned. Parameter callbackFunction is the PolicyInfo which indicates policy information. This function only works in the release environment. If executed in the Maker, nil will be returned."}]

##### inherited from Service:

[{"index":"EventHandlerBase ConnectEvent(string key, IScriptFunction eventHandler)","0":"Links events. When a key-type event occurs in this service, a handler is notified. The handler receives event parameters."}]

[{"index":"EventHandlerBase ConnectEvent(Type eventType, IScriptFunction eventHandler)","0":"Links events. This service notifies a handler when an eventType event occurs. The handler receives event parameters."}]

[{"index":"boolean DisconnectEvent(string key, EventHandlerBase eventHandler)","0":"Disconnects the event with the key-type event and the handler."}]

[{"index":"boolean DisconnectEvent(Type eventType, EventHandlerBase eventHandler)","0":"Disconnects the eventType event from its handler."}]

[{"index":"void SendEvent(EventType sendEvent)","0":"Generates an event."}]
RevoluteJoint

Connect the two Entities at a point and have them rotate around that point. It is used by adding it to Joints of RevoluteJointComponent.

# Properties

[{"index":"boolean CollideConnected","0":"Sets whether two Entities connected by a Joint will collide with each other."}]

[{"index":"Vector2 LocalAnchorA","0":"Set the Anchor of the Entity with JointComponent. Use relative coordinates based on the Entity."}]

[{"index":"Vector2 LocalAnchorB","0":"Set the Anchor of the Entity connected by Joint. Use relative coordinates based on the Entity."}]

[{"index":"float LowerAngle","0":"Sets the minimum relative angle of two Entities connected by a Joint."}]

[{"index":"float MaxMotorTorque","0":"Sets the maximum strength applicable to the motor of joint to reach the target motor speed."}]

[{"index":"boolean MotorEnable","0":"Set whether to use the Joint's motor function. If true, the value of MotorSpeed is affected."}]

[{"index":"float MotorSpeed","0":"Set the target motor speed of the Joint."}]

[{"index":"EntityRef TargetEntityRef","0":"Set the Entity to be connected with a Joint."}]

[{"index":"float UpperAngle","0":"Sets the maximum relative angle of two Entities connected by a Joint."}]

[{"index":"boolean UseLimits","0":"Set whether to limit the relative angle of two Entities connected by a Joint. If true, the LowerAngle and UpperAngle values are affected."}]

# Constructors

[{"index":"RevoluteJoint()","0":"Initializes RevoluteJoint to the default value."}]

[{"index":"RevoluteJoint(RevoluteJoint joint)","0":"Initializes RevoluteJoint to the same value as the specified joint."}]
RawImageRendererComponent

Provides a function to output RawImage.

# Properties

[{"index":"boolean IgnoreMapLayerCheck","0":"Does not automatically replace when designating the Map Layer name into the SortingLayer."}]

[{"index":"string MaterialId (Sync)","0":"Specifies the Id of the material to be applied to the renderer."}]

[{"index":"int32 OrderInLayer","0":"Determines the priority within the same Layer. A higher number indicates higher priority."}]

[{"index":"string SortingLayer","0":"When two or more Entities overlap, the priority is determined by the Sorting Layer."}]

##### 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 ChangeMaterial(string materialId)","0":"Replaces the material to be applied to the renderer."}]

[{"index":"void SetRawImage(RawImage rawImage) (ClientOnly)","0":"Draws the RawImage. Does not draw anything if nil is passed."}]

##### 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."}]

# Events

[{"index":"OrderInLayerChangedEvent","0":"This event occurs when changing the Component's OrderInLayer."}]

[{"index":"SortingLayerChangedEvent","0":"This event occurs when changing the component's SortingLayer."}]
DataStorageVersionPages

Provides a feature of inquiring about the data versions of DataStorage.

# Properties

[{"index":"boolean IsLastPage (ReadOnly)","0":"Checks whether the current page is the last."}]

# Methods

[{"index":"table GetCurrentPageDatas() (ServerOnly)","0":"Gets a data version list of the current page."}]

[{"index":"int32 LoadNextPageAndWait() (ServerOnly) (Yield)","0":"Loads the next page and returns the error code. Can move to the loaded page using the MoveToNextPageAndWait function. Suspends script executions during performance."}]

[{"index":"void MoveToNextPageAndWait() (ServerOnly) (Yield)","0":"Goes to the next page. Script executions are suspended during the operation."}]

# Examples

This is an example of traversing through pages.
    
    
    @Component
    script DataPageCrawler extends Component
        @ExecSpace("ServerOnly")
        method void OnBeginPlay()
            while true do
            	local datas = pages:GetCurrentPageDatas()
            	for _, data in pairs(datas) do
            		-- You can inquire the creation time and version value using DataStorageVersionInfo.
            		log(data.CreateTime)
            		log(data.Version)
            	end
            
            	-- You can check if the current page is the last page using the IsLastPage property.
            	if pages.IsLastPage == true then
            		return
            	end
            
            	-- Preloads the data for the next page and stops the inquiry if the next page is invalid.
            	local loadResultCode = pages:LoadNextPageAndWait()
            	if loadResultCode ~= 0 then
            		return
            	end
            
            	-- Moves to the next page.
            	pages:MoveToNextPageAndWait()
            end
        end
    end
    

# SeeAlso

  * DataStorageVersionInfo
  * DataStorageService
PrismaticJoint

Make two Entities move relative only along a specific axis. It is used by adding it to Joints of PrismaticJointComponent.

# Properties

[{"index":"boolean CollideConnected","0":"Sets whether two Entities connected by a Joint will collide with each other."}]

[{"index":"Vector2 LocalAnchorA","0":"Set the Anchor of the Entity with JointComponent. Use relative coordinates based on the Entity."}]

[{"index":"Vector2 LocalAnchorB","0":"Set the Anchor of the Entity connected by Joint. Use relative coordinates based on the Entity."}]

[{"index":"Vector2 LocalAxis","0":"Sets the limit axis for PrismaticJoint. Use relative coordinates based on the Entity."}]

[{"index":"float LowerTranslation","0":"Sets the minimum relative axis movement range of two Entities connected by a Joint."}]

[{"index":"float MaxMotorForce","0":"Sets the maximum strength applicable to the motor of joint to reach the target motor speed."}]

[{"index":"boolean MotorEnable","0":"Set whether to use the Joint's motor function. If True, the Joint is affected by the MotorSpeed value."}]

[{"index":"float MotorSpeed","0":"Set the target motor speed of the Joint."}]

[{"index":"EntityRef TargetEntityRef","0":"Set the Entity to be connected with a Joint."}]

[{"index":"float UpperTranslation","0":"Sets the maximum relative axis movement range of two Entities connected by a Joint."}]

[{"index":"boolean UseLimits","0":"Set whether to limit the relative axis movement range of two Entities connected by a Joint."}]

# Constructors

[{"index":"PrismaticJoint()","0":"Initializes PrismaticJoint to the default value."}]

[{"index":"PrismaticJoint(PrismaticJoint joint)","0":"Initializes PrismaticJoint to the same value as the specified joint."}]
MobileVibratorService

Vibrates the mobile device. It can be called when the vibration function is supported in the mobile device and the user device.

# Methods

[{"index":"boolean IsHWSupported() (ClientOnly)","0":"Returns whether the device supports a vibration function."}]

[{"index":"void Vibrate() (ClientOnly)","0":"Vibrates the mobile device."}]

##### inherited from Service:

[{"index":"EventHandlerBase ConnectEvent(string key, IScriptFunction eventHandler)","0":"Links events. When a key-type event occurs in this service, a handler is notified. The handler receives event parameters."}]

[{"index":"EventHandlerBase ConnectEvent(Type eventType, IScriptFunction eventHandler)","0":"Links events. This service notifies a handler when an eventType event occurs. The handler receives event parameters."}]

[{"index":"boolean DisconnectEvent(string key, EventHandlerBase eventHandler)","0":"Disconnects the event with the key-type event and the handler."}]

[{"index":"boolean DisconnectEvent(Type eventType, EventHandlerBase eventHandler)","0":"Disconnects the eventType event from its handler."}]

[{"index":"void SendEvent(EventType sendEvent)","0":"Generates an event."}]

# Examples

This is an example of vibrating the mobile device when a UI button is pressed.
    
    
    @Component
    script ButtonVibrator extends Component
        @EventSender("Self")
        handler HandleButtonClickEvent(ButtonClickEvent event)
        --------------- Native Event Sender Info ----------------
        -- Sender: ButtonComponent
        -- Space: Client
        ---------------------------------------------------------
    
        -- Parameters
        local Entity = event.Entity
        ---------------------------------------------------------
        if _MobileVibratorService:IsHWSupported() then
        -- Vibrate the mobile device.
        	_MobileVibratorService:Vibrate()
        end
        end
    end
    

# SeeAlso

  * [Utilizing the Mobile Device Vibration Function](/docs?postId=833)
Test Servers

# Course Introduction

Testing is essential to reliably updating the content of an already-released world. In order to detect and fix unexpected bugs in advance, creators can test various situations by opening a test server and distributing server keys to a limited number of people. Today, we will look at how to create, connect to, and close a test server.

# Creating a Test Server

Go to the detailed information page of a World released by creators. Press the [⋯] button to open the context menu and click the [Open Test Server] menu. [png](168388306793000e3385abc3845c1bedfee355bc6139b)

You can enter the test server or copy the server key in the pop-up window that opens afterward. [png](1678952437542b433e6cb0b4642d29859720fd0e58da6)

# Connecting to a Test Server

Click Join Test Server to connect to the test server. [png](16838831058084e2aff9938fc4bfa8420e5871b89ebc8)

Only those who have entered the server key in the Join Server window can connect to the test server. [png](1678952466075b82cb5eadbf744b1818e6c99f67180aa)

# Closing a Test Server

After the test is over, creators can close the test server. There are two ways to close the test server.

  * From the context menu on the World Details page
  * From directly inside the test server



[{"index":"World Details Page","0":"[png](1683883126287767cf3fed4234778ad1a85cc208d0030)"},{"index":"Test server","0":"[png](1678948554540846dd9f0284242a493994244bdc8131a)"}]

When the test server is closed, the server key is also destroyed.
OrderInLayerChangedEvent

This event occurs when changing the Component's OrderInLayer.  
  
This event is triggered by the API below.

  * AreaParticleComponent (Space;Server,Client)
  * AvatarRendererComponent (Space;Server,Client)
  * BasicParticleComponent (Space;Server,Client)
  * ButtonComponent (Space;Server,Client)
  * ClimbableSpriteRendererComponent (Space;Server,Client)
  * LineRendererComponent (Space;Server,Client)
  * PixelGUIRendererComponent (Space;Server,Client)
  * PixelRendererComponent (Space;Server,Client)
  * PolygonRendererComponent (Space;Server,Client)
  * RawImageRendererComponent (Space;Server,Client)
  * RectTileMapComponent (Space;Server,Client)
  * ScrollLayoutGroupComponent (Space;Server,Client)
  * SkeletonRendererComponent (Space;Server,Client)
  * SliderComponent (Space;Server,Client)
  * SpriteGUIRendererComponent (Space;Server,Client)
  * SpriteParticleComponent (Space;Server,Client)
  * SpriteRendererComponent (Space;Server,Client)
  * TextComponent (Space;Server,Client)
  * TextGUIRendererComponent (Space;Server,Client)
  * TextGUIRendererInputComponent (Space;Server,Client)
  * TextInputComponent (Space;Server,Client)
  * TextRendererComponent (Space;Server,Client)
  * TileMapComponent (Space;Server,Client)
  * WebSpriteComponent (Space;Server,Client)
  * WebViewComponent (Space;Server,Client)
  * YoutubePlayerGUIComponent (Space;Server,Client)
  * YoutubePlayerWorldComponent (Space;Server,Client)



# Properties

[{"index":"int32 OrderInLayer","0":"Changed OrderInLayer."}]

# Constructors

[{"index":"OrderInLayerChangedEvent(int32 orderInLayer = 0)","0":"Initializes OrderInLayerChangedEvent to the specified value."}]
User

The user's information.

# Properties

[{"index":"NexonOtpStateType NexonOtpState (ReadOnly)","0":"Indicates whether the user uses Nexon OTP."}]

[{"index":"string Nickname (ReadOnly)","0":"The player's nickname."}]

[{"index":"string Nugu (ReadOnly)","0":"A random value used to differentiate users who accessed the MapleStory Worlds service from the same network environment. The Nugu value is randomly recreated after a set period of time, and a previously-created value may be reused. A reused value may point to other identifiers. It can only be used in a server execution space, and the Nugu value is always empty in the client execution space."}]

[{"index":"string ProfileCode (ReadOnly)","0":"This player's profile code."}]

[{"index":"AccountTrustLevel UserAccountTrustLevel (ReadOnly)","0":"Indicates the user's authentication level."}]

[{"index":"string UserId (ReadOnly)","0":"The user's unique identifier. It can be used in the targetUserId parameter of the Client execution space control function."}]

# Methods

[{"index":"AccountRegion GetAccountRegion() (ServerOnly)","0":"Shows the region where the user account was registered. Can be used when trying to categorize accounts by region. The maker always returns AccountRegion.Unknown.For example, different content can be provided based on region, or the start and end time for world events can be set differently."}]

# Examples

The following is an example of outputting the Nugu value of a specific user.
    
    
    @Component
    script UserNuguLogger extends Component
        method void Server(string userId)
        ---@type table
        local users = _UserService.Users
        local user = users[userId]
    
        if user == nil then
        	return
        end
    
        log("user.Nugu: ".. user.Nugu)
        end
    end
    

# SeeAlso

  * AccountRegion
SortableDataStorageItemPages

Provides a feature of inquiring about the data saved in SortableDataStorage.

# Properties

[{"index":"boolean IsLastPage (ReadOnly)","0":"Checks whether the current page is the last."}]

# Methods

[{"index":"table GetCurrentPageDatas() (ServerOnly)","0":"Gets a data list of the current page."}]

[{"index":"int32 LoadNextPageAndWait() (ServerOnly) (Yield)","0":"Loads the next page and returns the error code. Can move to the loaded page using the MoveToNextPageAndWait() function. Suspends script executions during performance."}]

[{"index":"void MoveToNextPageAndWait() (ServerOnly) (Yield)","0":"Goes to the next page. Script executions are suspended during the operation."}]

# Examples

This is an example of code of traversing through pages.
    
    
    @Component
    script PaginatedDataLoader extends Component
        @ExecSpace("ServerOnly")
        method void OnBeginPlay()
            while true do
            	local datas = pages:GetCurrentPageDatas()
            	for _, data in pairs(datas) do
            		-- You can inquire the key, version, tag, and value using SortableDataStorageItem.
            		log(data.KeyInfo.Key)
            		log(data.KeyInfo.Tag)
            		log(data.KeyInfo.Version)
            		log(data.Value)
            	end
            
            	-- You can check if the current page is the last page using the IsLastPage property.
            	if pages.IsLastPage == true then
            		return
            	end
            
            	-- Preloads the data for the next page and stops the inquiry if the next page is invalid.
            	local loadResultCode = pages:LoadNextPageAndWait()
            	if loadResultCode ~= 0 then
            		return
            	end
            
            	-- Moves to the next page.
            	pages:MoveToNextPageAndWait()
            end
        end
    end
    

# SeeAlso

  * SortableDataStorageItem