Starward Rogue:XML - PeriodicMovementModeType Definitions

From Arcen Wiki
Jump to navigation Jump to search

Overview

These are basically strange and wonderful movement modes that we have created for enemies, and which you can have the enemy periodically invoke. There are a variety of parameters that you can pass in for each mode. These are all sub-nodes of GameEntity.

General attributes for all of the modes

  • type (PeriodicMovementModeType)
    • Specific types are detailed in their own sections, lower down.
  • requires_line_of_sight (bool)
    • Is this only eligible when the enemy has line of sight on the player?
  • requires_range_to_player_less_than_or_equal_to (int)
    • If greater than zero, then the center of the player must be within this many pixels of the center of the enemy for this movement mode to be eligible.
  • requires_range_to_player_greater_than
    • If greater than zero, then the center of the player must be at least this many pixels away from the center of the enemy for this movement mode to be eligible.

What’s all this about eligibility?

  • When the interval runs out and the entity pulls a movement mode, it checks all the sub-nodes for eligibility and then picks randomly between the eligibles
  • If none eligible, it just resets the interval and moves on.
  • Note: you can have more than one node of a given mode-type on an entity, but often it won't make much sense.

Many of the inherent buffs of these (movement speed, on-touch damage, damage resistance) are actually applied via modifier, most of which you can override, and you can also add more for a specific mode of a specific enemy. See later under modifiers.

InsaneThroughWallCharge

TLDR: The enemy runs at high speed through walls and everything, and then comes back to rest at the spot it started at. Gets big buff to on-touch damage.

Attributes Just For This Mode
  • if only_charges_cardinal_directions, then it picks a random FourDirection and moves on that angle
    • else, if only_charges_random_directions, then it picks a random angle and moves on that angle
    • else, it picks the angle towards the player's current location (at the time this mode is started) and moves on that angle
  • Gets a reddish hue, and then the following implicit attributes for the duration of the mode:
    • IgnoresCollisionWithWallTerrain
    • IgnoresCollisionWithNonWallTerrain
    • And then the following implicit modifiers:
      • MovementSpeed * 2
      • MeleeDamage * 10
  • Note: if you explicitly add DestroysTouchingNonWallTerrain, they work ok together.
    • I.e.: <modifier type="NonMeleeCannotFire"/>
  • To end this mode, it checks:
    • when its pessimistic collision box is at least 100 distance outside the room world rect:
      • instantly repositions back towards its origin to be within 100 distance
      • moves back to the origin on the same modifiers, then stops the mode.

ShadowDash

The enemy picks a target point, turns invisible and invincible, moves there while ignoring collision with terrain, and reappears; optionally with a shot-clearing pulse.

Note: tries to not pick a spot where it will be colliding with terrain at the end

Attributes Just For This Mode
  • chance_to_target_player (int)
    • chance out of 100 to pick the player's current location (at the start of the charge) as the target point
  • shockwave_radius (int)
    • size of the shot-clearing pulse

FreakOut

The enemy makes random movement orders and gets big buff to movement speed, on-touch damage, and damage resistance

Attributes Just For This Mode
  • max_duration (int)
    • number of seconds this mode lasts

Reposition

The enemy moves to the specified tile, ignoring collision with terrain. Optionally pathfinds (as if not ignoring terrain collision).

Attributes Just For This Mode
  • related_point (ArcenPoint)
    • The tile to move to, in terms from the upper-left tile of the room. A tile is 64 pixels on a side at max zoom in.
  • try_to_pathfind (bool)
    • If true, tries to pathfind. If false or if no path found, moves straight to the target tile.


Starward Rogue XML Documentation Main