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

Provides the ability to access data tables.

# Methods

[{"index":"string GetCell(string name, int32 row, int32 col)","0":"Loads data from the corresponding row, row, and column, col, in the DataSet for which their names are name."}]

[{"index":"string GetCell(string name, int32 row, string columnName)","0":"Loads data from the corresponding row, row, and column name, columnName, in the DataSet for which their names are name."}]

[{"index":"int32 GetRowCount(string name)","0":"Returns the number of DataSet rows with name as their name."}]

[{"index":"UserDataSet GetTable(string name)","0":"Loads DataSet with name as their name."}]

##### 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 reading data from DataSet. Below is the DataSet used in the example.

Name: SampleDataSet

[{"name":"mod1","level":"1","hp":"50"},{"name":"mod2","level":"2","hp":"100"},{"name":"mod3","level":"3","hp":"150"}]
    
    
    @Component
    script DataSetReader extends Component
        @ExecSpace("ServerOnly")
        method void OnBeginPlay()
        log(_DataService:GetRowCount("SampleDataSet")) -- 3
        log(_DataService:GetCell("SampleDataSet", 3, 3)) -- 150
        log(_DataService:GetCell("SampleDataSet", 2, "name")) -- mod2
    
        local dataSet = _DataService:GetTable("SampleDataSet")
        log(dataSet:GetRowCount()) -- 3
        log(dataSet:GetCell(1, 1)) -- mod1
        log(dataSet:GetCell(2, "level")) -- 2
    
        for i = 1, dataSet:GetRowCount() do
            log(dataSet:GetCell(i, "name"), dataSet:GetCell(i, "level"), dataSet:GetCell(i, "hp"))
        end
    
        -- mod1     1   50
        -- mod2     2   100
        -- mod3     3   150
        end
    end
    

# SeeAlso

  * [Editing Data](/docs?postId=69)
UIBasicParticleComponent

Provides the function to set and control the default particles used in UI.

# Properties

[{"index":"UIBasicParticleType ParticleType","0":"Set the type of particle to be created."}]

##### inherited from UIBaseParticleComponent:

[{"index":"boolean AutoRandomSeed","0":"Sets whether to create a new random seed whenever particle emission begins."}]

[{"index":"Color Color","0":"Corrects the color of the particles to be rendered."}]

[{"index":"boolean IsEmitting (ReadOnly) (HideFromInspector)","0":"Indicates whether new particles are being emitted."}]

[{"index":"Vector2 LocalScale","0":"This indicates particle size."}]

[{"index":"boolean Loop","0":"Sets whether the particle will play on repeat."}]

[{"index":"float ParticleCount","0":"Set the number of particles."}]

[{"index":"float ParticleLifeTime","0":"Set the particle duration."}]

[{"index":"float ParticleSize","0":"Set the particle size."}]

[{"index":"float ParticleSpeed","0":"Set the particle speed."}]

[{"index":"boolean PlayOnEnable","0":"Set whether to play particles when the particle component is set to Enable."}]

[{"index":"float PlaySpeed","0":"Set the play speed of particles."}]

[{"index":"boolean Prewarm","0":"If set to Enable, the maximum number of particles is loaded, and the particles play naturally."}]

[{"index":"integer RandomSeed","0":"Sets the random seed used to determine creation position, emission direction, speed, etc. when particle is played."}]

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

[{"index":"void Play() (ClientOnly)","0":"Play stopped particles."}]

[{"index":"void Stop() (ClientOnly)","0":"Stops the particle from playing."}]

##### 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":"ParticleEmitEndEvent","0":"This event is raised by BaseParticleComponent when emission of the particle has been completed."}]

[{"index":"ParticleEmitStartEvent","0":"The event that takes place when particle emission begins."}]

[{"index":"ParticleLoopEvent","0":"If the Loop property is enabled, this event is fired when the particle's emission cycle returns and the emission repeats."}]
Lua Profiling Summary

# Course Introduction

Let's take a look at what information is available in the Lua Profiling Summary Report.

##### Reference Guide

[Optimize Using Lua Profiler](/docs/?postId=762)

# Lua Profiling Summary Report

Clicking File - Export Report in the Lua Profiler lets you export the Lua Profiling Summary Report to XML. The following is a list of the information available in the Summary Report:

[{"Item":"Name","Description":"Context name"},{"Item":"FrameCount","Description":"Number of frames measured"},{"Item":"StartTime","Description":"Profiling Start Tick"},{"Item":"EndTime","Description":"Profiling Stop Tick  Tick read in 10 ns increments Profiling time can be calculated as (EndTime - StartTime) \/ 10,000,000 seconds"},{"Item":"AvgElapsedTime","Description":"Average time per frame (in ms)"},{"Item":"PeakElapsedTime","Description":"Max. time per frame (in ms)"},{"Item":"AvgNetworkSend","Description":"Average network Tx traffic per frame (in bytes)"},{"Item":"PeakNetworkSend","Description":"Max. network Tx traffic per frame (in bytes)"},{"Item":"AvgNetworkRecv","Description":"Average network Rx traffic per frame (in bytes)"},{"Item":"PeakNetworkRecv","Description":"Max. network Rx traffic per frame (in bytes)"},{"Item":"AvgManagedObjectCount","Description":"Average number of objects managed by Lua"},{"Item":"PeakManagedObjectCount","Description":"Max. number of objects managed by Lua"},{"Item":"AvgTotalLuaMemory","Description":"Average amount of memory used by Lua (in bytes)"},{"Item":"PeakTotalLuaMemory","Description":"Max. amount of memory used by Lua (in bytes)"},{"Item":"SampleSummary","Description":"Profiling summary call tree for each sample"}]

# Sample Profiling Summary

The following is a list of the information available in SampleSummary:

[{"Item":"Name","Description":"Name of sample"},{"Item":"Category","Description":"Type of sample"},{"Item":"CallCount","Description":"Number of calls"},{"Item":"AvgElapsedTime","Description":"Average execution time for samples (in ms)"},{"Item":"PeakElapsedTime","Description":"Max. execution time for samples (in ms)"},{"Item":"AvgSelfElapsedTime","Description":"Average execution time for samples (in ms), excluding the execution time of child samples"},{"Item":"PeakSelfElapsedTime","Description":"Max. execution time for samples (in ms), excluding the execution time of child samples"},{"Item":"AvgLuaMemory","Description":"Average volume of Lua memory assigned (in bytes)"},{"Item":"PeakLuaMemory","Description":"Max. volume of Lua memory allocated (in bytes)"},{"Item":"AvgSelfLuaMemory","Description":"Average volume of Lua memory allocated, excluding that of Lua memory allocated by child samples (in bytes)"},{"Item":"PeakSelfLuaMemory","Description":"Max. volume of Lua memory allocated, excluding that of Lua memory allocated by child samples (in bytes)"},{"Item":"AvgNetworkUsage","Description":"Average network Tx traffic (in bytes)"},{"Item":"PeakNetworkUsage","Description":"Max. network Tx traffic (in bytes)"}]
EmotionalType

Indicates the facial expression of the avatar.

# Members

[{"Name":"Invalid","Value":"0","Desc":"This is not a valid state."},{"Name":"Hit","Value":"1","Desc":"Shows the face of the avatar in a hit state."},{"Name":"Smile","Value":"2","Desc":"Shows the face of the avatar in a smiling state."},{"Name":"Troubled","Value":"3","Desc":"Shows the face of the avatar in a troubled state."},{"Name":"Cry","Value":"4","Desc":"Shows the face of the avatar in a crying state."},{"Name":"Angry","Value":"5","Desc":"Shows the face of the avatar in an angry state."},{"Name":"Bewildered","Value":"6","Desc":"Shows the face of the avatar in a bewildered state."},{"Name":"Stunned","Value":"7","Desc":"Shows the face of the avatar in a stunned state."},{"Name":"Vomit","Value":"8","Desc":"Shows the face of the avatar in a vomiting state."},{"Name":"Oops","Value":"9","Desc":"Shows the face of the avatar in an absurd state."},{"Name":"Cheers","Value":"10","Desc":"Shows the face of the avatar in an extreme state."},{"Name":"Chu","Value":"11","Desc":"Shows the face of the avatar in a kissing state."},{"Name":"Wink","Value":"12","Desc":"Shows the face of the avatar in a winking state."},{"Name":"Pain","Value":"13","Desc":"Shows the face of the avatar in a pained state."},{"Name":"Glitter","Value":"14","Desc":"Shows the face of the avatar with glittering eyes."},{"Name":"Despair","Value":"15","Desc":"Shows the face of the avatar in a despairing state."},{"Name":"Love","Value":"16","Desc":"Shows the face of the avatar in a love state."},{"Name":"Shine","Value":"17","Desc":"Shows the face of the avatar in a shining state."},{"Name":"Blaze","Value":"18","Desc":"Shows the face of the avatar in a fire state."},{"Name":"Hum","Value":"19","Desc":"Shows the face of the avatar in a blurry state."},{"Name":"Bowing","Value":"20","Desc":"Shows the face of the avatar in a bowing state."},{"Name":"Hot","Value":"21","Desc":"Shows the face of the avatar in a hot state."},{"Name":"Dam","Value":"22","Desc":"Shows the face of the avatar in a teasing state."},{"Name":"qBlue","Value":"23","Desc":"Shows the face of the avatar in a pale state."},{"Name":"Default","Value":"24","Desc":"Represents the avatar's default facial expression."}]

# Methods

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

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

Indicates tween operation.

# Properties

[{"index":"boolean AutoDestroy","0":"Sets whether to destroy automatically after tween is completed."}]

[{"index":"int32 CurrentLoopCount (ReadOnly)","0":"Indicates the number of times for repeating plays set in tween. The value is 1 upon the first play."}]

[{"index":"float Delay","0":"Sets the play delay in the Tween's total play time.A Tweener with a length of 5 seconds and a Delay of 2 seconds will play the Tween for only 3 seconds."}]

[{"index":"EaseType EaseType","0":"Sets the motion type of the current Tweener."}]

[{"index":"boolean IsPlaying (ReadOnly)","0":"Checks whether the current Tweener is playing or not."}]

[{"index":"int32 LoopCount","0":"Defines the number of repeating plays of tween. In the case of -1, it repeats infinitely."}]

[{"index":"TweenLoopType LoopType","0":"Sets the repeating type of the current Tweener.Restart: Repeats only the sequential play of Tween.PingPong: Repeats the sequential and reverse plays of Tween."}]

[{"index":"float ProgressRate (ReadOnly)","0":"Indicates the play progress status of the current tween. 0 refers to play start, and 1 refers to play completed status."}]

# Methods

[{"index":"void Complete()","0":"Completes tween immediately."}]

[{"index":"void Destroy()","0":"Destroys tween."}]

[{"index":"void Pause()","0":"Pauses tween."}]

[{"index":"void Play()","0":"Plays tween."}]

[{"index":"void Restart()","0":"Restarts tween from the beginning."}]

[{"index":"void Resume()","0":"Resumes tween. If Tween hasn't started, it will operate the same as Start()."}]

[{"index":"void Reverse()","0":"Exchanges the start value for the end value."}]

[{"index":"void Rewind()","0":"Returns tween to the initial state."}]

[{"index":"void SetAutoDestroy(boolean autoDestroy) (Deprecated)","0":"This function is deprecated. Use the AutoDestroy property."}]

[{"index":"void SetDelay(float seconds) (Deprecated)","0":"This function is deprecated. Use the Delay property."}]

[{"index":"void SetEaseType(EaseType type) (Deprecated)","0":"This function is deprecated. Use the EaseType property."}]

[{"index":"void SetLoopCount(int32 loopCount) (Deprecated)","0":"This function is deprecated. Use the LoopCount property."}]

[{"index":"void SetLoopType(TweenLoopType type) (Deprecated)","0":"This function is deprecated. Use the LoopType property."}]

[{"index":"void SetOnEndCallback(func callback)","0":"Sets the callback function to be called after tween is completed."}]

[{"index":"void Stop()","0":"Stops tween."}]
MapComponent

You can manage the map and change its unique properties.

# Properties

[{"index":"float AirAccelerationXFactor","0":"Corrects the speed mid-air for Entities with RigidbodyComponents on the map. The higher the value is, the faster the speed in the air."}]

[{"index":"float AirDecelerationXFactor","0":"Adjusts how fast the X-axis movement stops if no input is received while Entities with RigidbodyComponents are in mid-air."}]

[{"index":"float FallSpeedMaxXFactor","0":"Corrects the X-axis maximum speed limit mid-air for Entities with RigidbodyComponents on the map."}]

[{"index":"float FallSpeedMaxYFactor","0":"Corrects the Y-axis maximum speed limit mid-air for Entities with RigidbodyComponents on the map."}]

[{"index":"float Gravity","0":"Corrects the gravity value of Entities with RigidbodyComponent on the map."}]

[{"index":"boolean IsDynamicMap (ReadOnly) (HideFromInspector)","0":"Indicates whether the map is dynamically created."}]

[{"index":"boolean IsInstanceMap","0":"Sets whether the instance map will be used."}]

[{"index":"Vector2 LeftBottom (Sync)","0":"The bottom-left value of the map area."}]

[{"index":"Vector2 RightTop (Sync)","0":"The top-right of the map area."}]

[{"index":"TileMapMode TileMapMode (ReadOnly)","0":"Checks the tilemap mode of the map."}]

[{"index":"boolean UseCustomBound (Sync)","0":"Shows whether you will directly define and use the map area. You can define it using the LeftBottom and RightTop properties. When false, it will use the area that was automatically created based on the map's form. Works only when TileMapMode is MapleTile."}]

[{"index":"float WalkAccelerationFactor","0":"Sets the Factor for the movement speed of Entities with RigidbodyComponent within the map. The maximum speed cannot exceed the WalkSpeed for the RigidbodyComponent, which regulates the maximum speed."}]

[{"index":"float WalkDrag","0":"Corrects the tile friction of Entities with RigidbodyComponents on the map. The lower the value is, the better the tile slides."}]

##### 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":"Vector2, Vector2 GetBound()","0":"Gets the map area composed of LeftBottom and RightTop."}]

##### 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."}]
Making a Moving Foothold

# Course Introduction

Let's make a moving foothold to add more fun. You can use CustomFootholdComponent's IsDynamicFoothold property to create a moving foothold of your own. Please refer to [Making Foothold](/docs/?postId=71%7B%22target%22:%22_self%22%7D) to learn the basics of creating footholds.

# Making a Moving Foothold

To make a moving foothold, you have to create one using CustomFootholdComponent. To make the basic CustomFootholdComponent move, you have to adjust the properties of IsDynamicFoothold and RigidbodyMovementOption.

[{"Property Name":"IsDynamicFoothold","Description":"Activate to make a moving foothold."},{"Property Name":"RigidbodyMovementOption","Description":"Set what kind of inertia will be applied to player entity standing on the moving foothold.RelativeX: Apply inertia in x axis, not in y axis. If player moves in the opposite direction of the foothold, speed decreases. If it moves in the same direction, speed increases. Absolute: Constant speed regardless of direction."}]

[{"index":"RelativeX","0":"[gif](16466307010962640bc0dca2b4ba28d72e8138ee4a5cf)"},{"index":"Absolute","0":"[gif](1646633877812d9fd5ab7b34d468abc8018984875cdf5)"}]

#### Use Example

  1. Add CustomFootholdComponent to the object you'll use as a foothold to create a foothold.
  2. Activate CumstomFootholdComponent - IsDynamicFoothold.
  3. Select CumstomFootholdComponent, and set RigidbodyMovementOption to RelativeX.  
[png](16820538852880d9d1813790d4636b5b483c6f0b7e885)
  4. Add a new component and add it to the foothold object.
  5. Open the Script Editor of the new component, and write the following to set the time and range of movement. If you only put x value for `TransformComponent:Translate(0,0)`, the movement will be horizontal, and vertical if only a y value is entered. Entering both values will make the movement diagonal.


    
    
    @Component
    script VerticalCyclicMovement extends Component
        @Sync
        property number totalTime = 0
    
        @ExecSpace("ServerOnly")
        method void OnUpdate(number delta)
        self.totalTime = self.totalTime + delta
        if self.totalTime > 0 and self.totalTime <= 5.0 then
            self.Entity.TransformComponent:Translate(0,0.009)
        elseif self.totalTime > 5.0 and self.totalTime <= 10.0 then
            self.Entity.TransformComponent:Translate(0,-0.009)
        elseif self.totalTime > 10 then
            self.totalTime = 0
        end
        end
    end
WeldJointComponent

Create and delete WeldJoint. Controls the relative movement and rotation of connected rigid bodies.

# Properties

[{"index":"SyncList Joints (Sync) (ReadOnly)","0":"Set Joint information."}]

##### 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":"int32 AddJoint(Entity targetEntity, Vector2 localAnchorA, Vector2 localAnchorB)","0":"Add Joint. Return index on success, -1 on failure"}]

[{"index":"void DestroyJoint(int32 index)","0":"Removes the Joint whose sequence number corresponds to the index."}]

[{"index":"int32 GetJointsCount()","0":"Return the number of Joints."}]

[{"index":"void SetCollideConnected(int32 index, boolean collideConnected)","0":"Set the CollideConnected value of the Joint whose sequence number corresponds to index."}]

[{"index":"void SetLocalAnchorA(int32 index, Vector2 localAnchorA)","0":"Set the LocalAnchorA value of the Joint whose sequence number corresponds to index."}]

[{"index":"void SetLocalAnchorB(int32 index, Vector2 localAnchorB)","0":"Set the LocalAnchorB value of the Joint whose sequence number corresponds to index."}]

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

#### AddJoint

This is an example of adding Joint to the WeldJointComponent.
    
    
    @Component
    script SnowBodyWelder extends Component
        @ExecSpace("ServerOnly")
        method void Connect(Entity target)
        self.Entity.WeldJointComponent:AddJoint(target, Vector2(0, -1), Vector2.zero)
        end
    
        @EventSender("Self")
        handler HandlePhysicsContactBeginEvent(PhysicsContactBeginEvent event)
        --------------- Native Event Sender Info ----------------
        -- Sender: PhysicsColliderComponent
        -- Space: Server, Client
        ---------------------------------------------------------
    
        -- Parameters
        local ContactedBodyEntity = event.ContactedBodyEntity
        ---------------------------------------------------------
        if ContactedBodyEntity.Name == "SnowBody" and self.Entity.WeldJointComponent:GetJointsCount() == 0 then
        	self:Connect(ContactedBodyEntity)
        end
        end
    end
    

# SeeAlso

  * PhysicsColliderComponent
  * PhysicsContactBeginEvent
  * [Applying Physics to Entities ](/docs?postId=761)
  * [Using Physics](/docs?postId=757)
  * [Using Various Physics Joints](/docs?postId=760)