Ground (functions): Difference between revisions
Created page with "{{Cleanup}} == GROUND:Hide(System.String) == Hides an entity. === Arguments === * <code>entityname</code>: The name of the entity to hide. == GROUND:Unhide(System.String) == Unhides an entity. === Arguments === * <code>entityname</code>: The name of the entity to unhide. == GROUND:CreateObject(System.String,System.String,System.Int32,System.Int32,System.Int32,System.Int32) == TODO: WIP === Arguments === * <code>objtype</code>: None * <code>instancename<..." |
No edit summary |
||
| Line 1: | Line 1: | ||
The ground functions are used for various tasks on ground maps. | |||
== | == Hide == | ||
Hides an entity. {{FuncUsage|nmspace=GROUND|nm=Hide|args=entityName}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=entityName | |||
|type=String | |||
|techt=System.String | |||
|purp=The name of the entity to hide. | |||
}} | |||
|} | |||
== Unhide == | |||
Unhides an entity. {{FuncUsage|nmspace=GROUND|nm=Unhide|args=entityName}} | |||
== | |||
Unhides an entity. | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=entityName | |||
|type=String | |||
|techt=System.String | |||
|purp=The name of the entity to unhide. | |||
}} | |||
|} | |||
== CreateObject == | |||
TODO: WIP. {{FuncUsage|nmspace=GROUND|nm=CreateObject|args=objType, instName, x, y, w, h}} | |||
TODO: WIP | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=objType | |||
|type=(undocumented) | |||
|techt=(undocumented) | |||
|purp=The type of object to create. | |||
}} | |||
== | {{ArgRow | ||
|name=instName | |||
|type=(undocumented) | |||
|techt=(undocumented) | |||
|purp=The name to create the object with. | |||
}} | |||
{{ArgRow | |||
|name=x | |||
|type=(undocumented) | |||
|techt=(undocumented) | |||
|purp=(undocumented) | |||
}} | |||
{{ArgRow | |||
|name=y | |||
|type=(undocumented) | |||
|techt=(undocumented) | |||
|purp=(undocumented) | |||
}} | |||
{{ArgRow | |||
|name=w | |||
|type=(undocumented) | |||
|techt=(undocumented) | |||
|purp=(undocumented) | |||
}} | |||
{{ArgRow | |||
|name=h | |||
|type=(undocumented) | |||
|techt=(undocumented) | |||
|purp=(undocumented) | |||
}} | |||
|} | |||
== CreateCharacter == | |||
TODO: WIP. {{FuncUsage|nmspace=GROUND|nm=|args=charType, instName, x, y, actionFunc, thinkFunc}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=objType | |||
|type=(undocumented) | |||
|techt=(undocumented) | |||
|purp=The type of character to create. | |||
}} | |||
{{ArgRow | |||
|name=instName | |||
|type=(undocumented) | |||
|techt=(undocumented) | |||
|purp=The name to create the character with. | |||
}} | |||
{{ArgRow | |||
|name=x | |||
|type=(undocumented) | |||
|techt=(undocumented) | |||
|purp=(undocumented) | |||
}} | |||
{{ArgRow | |||
|name=y | |||
|type=(undocumented) | |||
|techt=(undocumented) | |||
|purp=(undocumented) | |||
}} | |||
{{ArgRow | |||
|name=actionFunc | |||
|type=(undocumented) | |||
|techt=(undocumented) | |||
|purp=(undocumented) | |||
}} | |||
{{ArgRow | |||
|name=thinkFunc | |||
|type=(undocumented) | |||
|techt=(undocumented) | |||
|purp=(undocumented) | |||
}} | |||
|} | |||
== RemoveObject == | |||
== | |||
Deletes an object from the ground map, identified by its instance name. {{FuncUsage|nmspace=GROUND|nm=RemoveObject|args=instName}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=instName | |||
|type=String | |||
|techt=System.String | |||
|purp=The instance name of the object. | |||
}} | |||
|} | |||
=== Returns === | === Returns === | ||
| Line 65: | Line 143: | ||
Returns true if succeeded, false otherwise. | Returns true if succeeded, false otherwise. | ||
== | == RemoveCharacter == | ||
Deletes a character from the ground map, identified by its instance name. {{FuncUsage|nmspace=GROUND|nm=RemoveCharacter|args=instName}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=instName | |||
|type=String | |||
|techt=System.String | |||
|purp=The instance name of the character. | |||
}} | |||
|} | |||
=== Returns === | === Returns === | ||
| Line 79: | Line 162: | ||
Returns true if succeeded, false otherwise. | Returns true if succeeded, false otherwise. | ||
== | == CreateCharacterFromCharData == | ||
Creates a ground character, given a dungeon character. {{FuncUsage|nmspace=GROUND|nm=CreateCharacterFromCharData|args=instName, dunCh, x, y, dir}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=instName | |||
|type=String | |||
|techt=System.String | |||
|purp=The instance name to give the character | |||
}} | |||
{{ArgRow | |||
|name=dunCh | |||
|type=Dungeon Character | |||
|techt=RogueEssence.Dungeon.Character | |||
|purp=Character data to create from | |||
}} | |||
{{ArgRow | |||
|name=x | |||
|type=Integer | |||
|techt=System.Int32 | |||
|purp=X coordinate of the character | |||
}} | |||
{{ArgRow | |||
|name=y | |||
|type=Integer | |||
|techt=System.Int32 | |||
|purp=Y coordinate of the character | |||
}} | |||
{{ArgRow | |||
|name=dir | |||
|type= | |||
|techt= | |||
|purp=Direction the character will face, defaults to Dir8.Down | |||
}} | |||
|} | |||
== RefreshPlayer == | |||
== | |||
| Line 99: | Line 207: | ||
== | == SetPlayer == | ||
Sets the controllable player to use new character data. {{FuncUsage|nmspace=GROUND|nm=SetPlayer|args=charData}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=charData | |||
|type=Character Data | |||
|techt=RogueEssence.Dungeon.CharData | |||
|purp=The new character data to use for the player | |||
}} | |||
|} | |||
== SpawnerDoSpawn == | |||
== | |||
Make the specified spawner run its spawn method. {{FuncUsage|nmspace=GROUND|nm=SpawnerDoSpawn|args=spawner}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=spawner | |||
|type=String | |||
|techt=System.String | |||
|purp=The name of the spawner to run the spawn method of. | |||
}} | |||
|} | |||
=== Returns === | === Returns === | ||
| Line 123: | Line 241: | ||
The ground character spawned. | The ground character spawned. | ||
== | == SpawnerSetSpawn == | ||
Sets the character to the specified spawner. {{FuncUsage|nmspace=GROUND|nm=SpawnerSetSpawn|args=spawner, chara}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=spawner | |||
|type= | |||
|techt= | |||
|purp=The spawner to set the character to, by name | |||
}} | |||
{{ArgRow | |||
|name=chara | |||
|type=Character Data | |||
|techt=RogueEssence.Dungeon.CharData | |||
|purp=The character to spawn. | |||
}} | |||
|} | |||
== GROUND:CharTurnToChar(RogueEssence.Ground.GroundChar,RogueEssence.Ground.GroundChar) == | == GROUND:CharTurnToChar(RogueEssence.Ground.GroundChar,RogueEssence.Ground.GroundChar) == | ||
Revision as of 19:36, 17 January 2026
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. |
GROUND:CharTurnToChar(RogueEssence.Ground.GroundChar,RogueEssence.Ground.GroundChar)
Makes a character turn to face another character instantly.
Arguments
turnchar: The character that is turning.turnto: The character to turn to.
GROUND: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.
Arguments
curch: Character that is turningturnto: Character to turn toframedur: Time spent on each direction, in frames
Example
CharTurnToCharAnimated(charFrom, charTo, 3)
GROUND:EntTurn(RogueEssence.Ground.GroundEntity,RogueElements.Dir8)
Makes a ground entity turn to face a direction.
Arguments
ent: The ground entity. Can be a character or object.direction: The direction to face.
GROUND: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.
Arguments
ch: The character to turndirection: The direction to turn toframedur: The time spent in each intermediate direction, in framesccw: false if clockwise, true if counter-clockwise
Example
GROUND:CharTurnToCharAnimated(charFrom, Dir8.Left, 3, true)
GROUND:CharAnimateTurnTo
Makes a character do an animated turn to face a chosen direction over the specified time. Waits until the operation is completed.
Arguments
ch: The character to turndirection: The direction to turn toframedur: 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 repositionx: The X coordinate of the destinationy: The Y coordinate of the destinationdirection: 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 movedirection: Direction to move induration: Duration of movement, in framesrun: True if using a running animation, false otherwisespeed: 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 movex: X coordinate of destinationy: Y coordinate of destinationrun: True if using a running animation, false otherwisespeed: 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 movemark: GroundMarker object ot move torun: True if using a running animation, false otherwisespeed: 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 movex: X coordinate of destinationy: Y coordinate of destinationspeed: 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 moveanim: Name of the animationanimDir: Direction of animationdirection: Direction to move induration: Duration of movement, in framesanimSpeed: Speed of animation, where 1.0 represents normal speedspeed: 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 moveanim: Name of the animationanimDir: Direction of animationx: X coordinate of the destinationy: Y coordinate of the destinationanimSpeed: Speed of animation, where 1.0 represents normal speedspeed: Speed movement, in pixels per frameheight: 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 emoteemoteid: ID of the emotecycles: 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: Noneanim: 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: NoneactionPoint: 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 animateanim: Name of the animationloop: 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 animateanim: 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 actionaction: The action to perform
GROUND:CharWaitAction
Makes the character perform an action and waits until it's over.
Arguments
ent: Character to animateaction: 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 animateframeTime: The duration of each frame of animationstartFrame: The start frame of animationendFrame: The end frame of animationdir: The direction of the animationcycles: 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 animateanimName: The name of the animationframeTime: The duration of each frame of animationstartFrame: The start frame of animationendFrame: The end frame of animationdir: The direction of the animation
GROUND:ObjectWaitAnimFrame
Waits for the object to reach a specific frame before continuing.
Arguments
obj: The object ot wait onframe: 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 emitterx: X positiony: Y Positiondir: 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 emitterx: Start X positiony: Start Y Positiondir: Direction to orient the VFX, defaults to Down.xTo: End X positionyTo: End Y position
GROUND:PlayVFXAnim(RogueEssence.Content.BaseAnim,RogueEssence.Content.DrawLayer)
Plays a VFX using just a BaseAnim
Arguments
anim: The animation to playlayer: 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.
