Ground (functions)

From PMDOWiki
Revision as of 19:48, 17 January 2026 by Imbion (talk | contribs)

The ground functions are used for various tasks on ground maps.

Hide

Hides an entity. Argument order is GROUND:Hide(entityName).

Arguments

Name Type Technical Type Purpose
entityName String System.String The name of the entity to hide.

Unhide

Unhides an entity. Argument order is GROUND:Unhide(entityName).


Arguments

Name Type Technical Type Purpose
entityName String System.String The name of the entity to unhide.

CreateObject

TODO: WIP. Argument order is GROUND:CreateObject(objType, instName, x, y, w, h).


Arguments

Name Type Technical Type Purpose
objType (undocumented) (undocumented) The type of object to create.
instName (undocumented) (undocumented) The name to create the object with.
x (undocumented) (undocumented) (undocumented)
y (undocumented) (undocumented) (undocumented)
w (undocumented) (undocumented) (undocumented)
h (undocumented) (undocumented) (undocumented)


CreateCharacter

TODO: WIP. Argument order is GROUND:(charType, instName, x, y, actionFunc, thinkFunc).

Arguments

Name Type Technical Type Purpose
objType (undocumented) (undocumented) The type of character to create.
instName (undocumented) (undocumented) The name to create the character with.
x (undocumented) (undocumented) (undocumented)
y (undocumented) (undocumented) (undocumented)
actionFunc (undocumented) (undocumented) (undocumented)
thinkFunc (undocumented) (undocumented) (undocumented)

RemoveObject

Deletes an object from the ground map, identified by its instance name. Argument order is GROUND:RemoveObject(instName).

Arguments

Name Type Technical Type Purpose
instName String System.String The instance name of the object.

Returns

Returns true if succeeded, false otherwise.

RemoveCharacter

Deletes a character from the ground map, identified by its instance name. Argument order is GROUND:RemoveCharacter(instName).

Arguments

Name Type Technical Type Purpose
instName String System.String The instance name of the character.

Returns

Returns true if succeeded, false otherwise.

CreateCharacterFromCharData

Creates a ground character, given a dungeon character. Argument order is GROUND:CreateCharacterFromCharData(instName, dunCh, x, y, dir).

Arguments

Name Type Technical Type Purpose
instName String System.String The instance name to give the character
dunCh Dungeon Character RogueEssence.Dungeon.Character Character data to create from
x Integer System.Int32 X coordinate of the character
y Integer System.Int32 Y coordinate of the character
dir Direction the character will face, defaults to Dir8.Down

RefreshPlayer

Reloads the controllable player's character data to be the current team's leader.

SetPlayer

Sets the controllable player to use new character data. Argument order is GROUND:SetPlayer(charData).

Arguments

Name Type Technical Type Purpose
charData Character Data RogueEssence.Dungeon.CharData The new character data to use for the player

SpawnerDoSpawn

Make the specified spawner run its spawn method. Argument order is GROUND:SpawnerDoSpawn(spawner).

Arguments

Name Type Technical Type Purpose
spawner String System.String The name of the spawner to run the spawn method of.

Returns

The ground character spawned.

SpawnerSetSpawn

Sets the character to the specified spawner. Argument order is GROUND:SpawnerSetSpawn(spawner, chara).

Arguments

Name Type Technical Type Purpose
spawner The spawner to set the character to, by name
chara Character Data RogueEssence.Dungeon.CharData The character to spawn.

CharTurnToChar

Makes a character turn to face another character instantly. Argument order is GROUND:CharTurnToChar(turner,turnTo).

Arguments

Name Type Technical Type Purpose
turner Ground Character RogueEssence.Ground.GroundChar The character that is turning.
turnTo Ground Character RogueEssence.Ground.GroundChar The character to turn to.

CharTurnToCharAnimated

Makes a character do an animated turn to face another character over the specified time. Clockwise or counter-clockwise are chosen based on the closest direction. Waits until the operation is completed. Argument order is GROUND:CharTurnToCharAnimated(turner, turnTo, dur).

Arguments

Name Type Technical Type Purpose
turner Ground Character RogueEssence.Ground.GroundChar Character that is turning
turnTo Ground Character RogueEssence.Ground.GroundChar Character to turn to
dur Integer System.Int Time spent on each direction, in frames

Example


CharTurnToCharAnimated(charFrom, charTo, 3)

EntTurn

Makes a ground entity turn to face a direction. Argument order is GROUND:EntTurn(entity, dir).

Arguments

Name Type Technical Type Purpose
entity Ground Entity RogueEssence.Ground.GroundEntity
dir Direction ogueElements.Dir8 The direction to face.

CharAnimateTurn

Makes a character do an animated turn to face a chosen direction over the specified time. Must specify clockwise or counter-clockwise. Waits until the operation is completed. Argument order is GROUND:CharAnimateTurn(chara, dir, dur, isCounterClockwise).

Arguments

Name Type Technical Type Purpose
entity Ground Entity RogueEssence.Ground.GroundEntity
dir Direction RogueElements.Dir8 The direction to face.
name=isCounterClockwise type=Boolean techt=System.Bool purp=false if clockwise, true if counter-clockwise

}}

Example


GROUND:CharTurnToCharAnimated(charFrom, Dir8.Left, 3, true)

CharAnimateTurnTo

Makes a character do an animated turn to face a chosen direction over the specified time. Waits until the operation is completed. Argument order is GROUND:CharAnimateTurnTo(chara, dir, dur).

Arguments

Name Type Technical Type Purpose
chara (undocumented) (undocumented) The character to turn
dir (undocumented) (undocumented) The direction to turn to
dur (undocumented) (undocumented) The time spent in each intermediate direction, in frames

Example


CharAnimateTurnTo(charFrom, Dir8.Left, 3)

GROUND:TeleportTo(RogueEssence.Ground.GroundEntity,System.Int32,System.Int32,RogueElements.Dir8,System.Int32)

Repositions the ground entity in a specified location.


Arguments

  • ent: The ground entity to reposition
  • x: The X coordinate of the destination
  • y: The Y coordinate of the destination
  • direction: The direction to point the entity. Defaults to Dir8.None, which leaves it untouched.
  • height: None

GROUND:MoveInDirection

Make ground character move in a direction.


Arguments

  • chara: Character to move
  • direction: Direction to move in
  • duration: Duration of movement, in frames
  • run: True if using a running animation, false otherwise
  • speed: Speed in pixels per frame

Example


GROUND:MoveInDirection(player, Dir8.Down, 24, false, 2)

GROUND:MoveToPosition

Make ground character move to a position.


Arguments

  • chara: Character to move
  • x: X coordinate of destination
  • y: Y coordinate of destination
  • run: True if using a running animation, false otherwise
  • speed: Speed in pixels per frame

Example


GROUND:MoveInDirection(player, 200, 240, false, 2)

GROUND:MoveToMarker

Make ground character move to a ground marker.


Arguments

  • chara: Character to move
  • mark: GroundMarker object ot move to
  • run: True if using a running animation, false otherwise
  • speed: Speed in pixels per frame

Example


GROUND:MoveInDirection(player, marker, false, 2)

GROUND:MoveObjectToPosition

Make ground object move to a position.


Arguments

  • ent: Ground Entity to move
  • x: X coordinate of destination
  • y: Y coordinate of destination
  • speed: Speed in pixels per frame

Example


GROUND:MoveInDirection(player, 200, 240, 2)

GROUND:AnimateInDirection

Make a ground character move in a direction with custom animation


Arguments

  • chara: Character to move
  • anim: Name of the animation
  • animDir: Direction of animation
  • direction: Direction to move in
  • duration: Duration of movement, in frames
  • animSpeed: Speed of animation, where 1.0 represents normal speed
  • speed: Speed movement, in pixels per frame

Example


GROUND:AnimateInDirection(player, "Hurt", Dir8.Down, 24, 0.5, 2)

GROUND:AnimateToPosition

Make a ground entity move to a position with custom animation


Arguments

  • ent: Entity to move
  • anim: Name of the animation
  • animDir: Direction of animation
  • x: X coordinate of the destination
  • y: Y coordinate of the destination
  • animSpeed: Speed of animation, where 1.0 represents normal speed
  • speed: Speed movement, in pixels per frame
  • height: Height of the destination

Example


GROUND:AnimateToPosition(player, "Hurt", Dir8.Down, 200, 240, 0.5, 2, 0)

GROUND:CharSetEmote(RogueEssence.Ground.GroundChar,System.String,System.Int32)

Make a character emote on the ground map.


Arguments

  • chara: Character to emote
  • emoteid: ID of the emote
  • cycles: The number of times to play the emote.

GROUND:CharSetDrawEffect(RogueEssence.Ground.GroundChar,RogueEssence.Dungeon.DrawEffect)

Sets the ground character's draw effect to become invisible, shaking, still, etc.


Arguments

  • chara: Target ground character.
  • effect: The draw effect.

GROUND:CharEndDrawEffect(RogueEssence.Ground.GroundChar,RogueEssence.Dungeon.DrawEffect)

Sets the ground character's draw effect to become invisible, shaking, still, etc.


Arguments

  • chara: Target ground character.
  • effect: The draw effect.

GROUND:CharGetAnimFallback(RogueEssence.Ground.GroundChar,System.String)

Gets the fallback animation for the character.


Arguments

  • chara: None
  • anim: The anim to get the fallback anim of.

Returns

The fallback animation, as a string. Blank if there is none. Will return anim if anim already exists.

GROUND:CharGetAnim(RogueEssence.Ground.GroundChar)

Gets a character's current animation as a string.


Arguments

  • chara: None

GROUND:CharGetAnimPoint(RogueEssence.Ground.GroundChar,RogueEssence.Content.ActionPointType)

Gets the chosen action point of the character at this specific frame.


Arguments

  • chara: None
  • actionPoint: The ype of action point to retrieve the coordinates for.

Returns

The location of the action point in absolute coordinates on the map.

GROUND:CharSetAnim(RogueEssence.Ground.GroundChar,System.String,System.Boolean)

Set a character's animation.


Arguments

  • chara: Character to animate
  • anim: Name of the animation
  • loop: Whether to loop the animation

GROUND:CharEndAnim(RogueEssence.Ground.GroundChar)

Stops a character's current animation, reverting them to default idle.


Arguments

  • chara: Character to stop animating

GROUND:CharWaitAnim

Makes the character perform an animation and waits until it's over.


Arguments

  • ent: Character to animate
  • anim: Animation to play

Example


GROUND:CharWaitAnim(player, "Hurt")

GROUND:CharSetAction(RogueEssence.Ground.GroundChar,RogueEssence.Ground.GroundAction)

Set a character's action.


Arguments

  • chara: Character to perfom the action
  • action: The action to perform

GROUND:CharWaitAction

Makes the character perform an action and waits until it's over.


Arguments

  • ent: Character to animate
  • action: Action to perform

Example


GROUND:CharWaitAction(player, action)

GROUND:ObjectSetAnim(RogueEssence.Ground.GroundObject,System.Int32,System.Int32,System.Int32,RogueElements.Dir8,System.Int32)

Sets a ground object's animation. After it finishes, it will return to the default animation.


Arguments

  • obj: The object to animate
  • frameTime: The duration of each frame of animation
  • startFrame: The start frame of animation
  • endFrame: The end frame of animation
  • dir: The direction of the animation
  • cycles: The number of times to repeat the animation

GROUND:ObjectSetDefaultAnim(RogueEssence.Ground.GroundObject,System.String,System.Int32,System.Int32,System.Int32,RogueElements.Dir8)

Sets a ground object's default animation.


Arguments

  • obj: The object to animate
  • animName: The name of the animation
  • frameTime: The duration of each frame of animation
  • startFrame: The start frame of animation
  • endFrame: The end frame of animation
  • dir: The direction of the animation

GROUND:ObjectWaitAnimFrame

Waits for the object to reach a specific frame before continuing.


Arguments

  • obj: The object ot wait on
  • frame: The frame of animation to wait on.

Example


GROUND:WaitObjectAnim(fountain, 3)

GROUND:PlayVFX(RogueEssence.Content.FiniteEmitter,System.Int32,System.Int32,RogueElements.Dir8)

Plays a VFX using a finite emitter that generates BaseAnims.


Arguments

  • emitter: The VFX emitter
  • x: X position
  • y: Y Position
  • dir: Direction to orient the VFX, defaults to Down

GROUND:PlayVFX(RogueEssence.Content.FiniteEmitter,System.Int32,System.Int32,RogueElements.Dir8,System.Int32,System.Int32)

Plays a VFX that has a start position and an end position. It uses a finite emitter that generates BaseAnims.


Arguments

  • emitter: The VFX emitter
  • x: Start X position
  • y: Start Y Position
  • dir: Direction to orient the VFX, defaults to Down.
  • xTo: End X position
  • yTo: End Y position

GROUND:PlayVFXAnim(RogueEssence.Content.BaseAnim,RogueEssence.Content.DrawLayer)

Plays a VFX using just a BaseAnim


Arguments

  • anim: The animation to play
  • layer: The layer to put it on

GROUND:MoveScreen(RogueEssence.Content.ScreenMover)

Plays a screen-moving effect.


Arguments

  • mover: The screen mover.

GROUND:HandoutEXP

Gives a character a set amount of EXP. Also handles leveling up and learning new moves.


Arguments

  • character: The characters to level up.
  • experience: The amount of EXP to gain.

GROUND:LevelUpChar

Levels up a character a certain amount of times all at once. Also handles learning new moves.


Arguments

  • character: The characters to level up.
  • numLevelUps: The number of level ups.

GROUND:AddMapStatus(System.String)

Adds a mapstatus to the ground map. Map statuses only have an aesthetic effect in ground maps.


Arguments

  • statusIdx: The ID of the Map Status

GROUND:RemoveMapStatus(System.String)

Removes a map status from the ground map.


Arguments

  • statusIdx: The ID of the Map Status to remove.