Difference between revisions of "Starward Rogue:XML - TilesetBackground Definitions"

From Arcen Wiki
Jump to navigation Jump to search
m (We don't need a link at the bottom. Categories fill that role.)
m (Reverted edits by Maintenance script (talk) to last revision by Dominus Arbitrationis)
 
(One intermediate revision by one other user not shown)

Latest revision as of 16:36, 25 October 2018

For each directory in Images/Tilesets/ (for example, BlueShip), a Tileset is created. Inside each of those is a Starfields/ directory. This has 1 or more *.xml files, and each of those *.xml files contain 1 or more "definition" nodes, and each of those nodes is a background that can be used for that tileset (either in an interior, or in an open space area, respectively).

"definition" nodes

These are the attributes of a "definition" node:

  • name (string)
    • just a way to uniquely refer to the record, must be unique across all the files in that directory
  • backplate (string)
    • the filename (without extension) of the backplate image, relative to the directory this .xml file is in
  • backplate_distance (int)
    • if this is <= 100, the background moves at the same "speed" as the player, in reverse
    • if this is >= 10000, the background moves at 1/1000th the speed of the player, in reverse; this is effectively stationary visually
    • if this is between those numbers, the speed multiplier is linearly intepolated (so 2500 is about 3/4 as fast, 5000 is about 1/2 as fast, etc)
  • backplate_shader (ShaderType, default Normal)
    • the shader used to draw the backplate
    • default Normal
  • backplate_hue (float, default do-not-use)
    • the hue shift used to draw the backplate
    • valid values between 0 to 1
    • note: the shader must be set to HSV or HSVAdditive for this to have any effect
    • backplate_is_fulscreen_immobile (bool)
      • when true, the backplate is assumed to be a 1920x1080 image that fills the entire back of the screen and does not move.

sub-node type: "parallax_object"

concept: a background image seeded when the room is created; stationary except for parallax-shift

  • images (comma-delimited list of strings)
    • the filenames (without extensions) of the images, relative to the directory this .xml file is in, which can be randomly picked from for this type of object
  • min_seed_count (int), max_seed_count(int)
    • the number of objects of this type that will be put in the background of any given room using this TilesetBackground.
    • actual number is rolled randomly for the room when it is generated
  • min_distance (int), max_distance (int)
    • similar to backplate_distance, but for the individually seeded parallax object.
    • actual number is rolled randomly for the individual object when it is generated
  • shader (ShaderType, default Normal)
    • the shader used to draw the objects of this type
    • default Normal
  • hue (float, default do-not-use)
    • the hue shift used to draw the objects of this type
    • valid values between 0 to 1
    • note: the shader must be set to HSV or HSVAdditive for this to have any effect
  • diffuse (3 or 4 ints from 0-255 each, representing either RGB or ARGB)
    • sets the color, and/or the transparency, or the object.
    • for instance, if you wanted a normally-colored but half-transparent object, you would set diffuse="128,255,255,255"
  • x_anchors_left (bool)
    • whether the x offset (if any) is relative to the left of the screen, or the right
  • y_anchors_top (bool)
    • whether the y offset (if any) is relative to the top of the screen, or the bottom
  • min_x_offset (int), max_x_offset (int), min_x_offset_percent (int), max_x_offset_percent (int)
    • the x offset for each individual object is randomly rolled by these when it is generated
    • if percent is defined, the non-percent variants are ignored; percent is from 1 to 100 and refers to percent of screen width
  • min_y_offset (int), max_y_offset (int), min_y_offset_percent (int), max_y_offset_percent (int)
    • similar to the x ones, but for the y axis
  • stretches_from_top_to_bottom (bool)
    • whether the object should be UV tiled from the top to the bottom of the screen
    • causes the y offsets to be ignored
  • stretches_from_left_to_right (bool)
    • whether the object should be UV tiled from the left to the right of the screen
    • causes the x offsets to be ignored
  • stretching_is_clamped_instead_of_repeat (bool)
    • normally when something is stretched, it's actually repeating the pattern in a tiling fashion. However, with this on it will stretch the image instead.
  • simple_anchoring_on_screen (AnchorLocation, optional)
    • if set to a value, then it will cause the game to draw this object in screen coordinates and move it relative to that position on the screen as the parallax offset shifts.

sub-node type: "parallax_flyby"

concept: a background image created outside the viewport during gameplay, moves either vertically or horizontally across the background (visual position also being parallax-shifted) until it leaves the viewport and disappears

  • image_dictionaries (comma-delimited list of strings)
    • the filenames (without extensions) of the image dictionaries, relative to the directory this .xml file is in, which can be randomly picked from for this type of object
  • min_distance (int), max_distance (int)
    • similar to backplate_distance, but for the individually seeded parallax object.
    • actual number is rolled randomly for the individual object when it is generated
  • shader (ShaderType, default Normal)
    • the shader used to draw the objects of this type
    • default Normal
  • hue (float, default do-not-use)
    • valid values between 0 to 1
    • note: the shader must be set to HSV or HSVAdditive for this to have any effect
    • the hue shift used to draw the objects of this type
  • diffuse (3 or 4 ints from 0-255 each, representing either RGB or ARGB)
    • sets the color, and/or the transparency, or the object.
    • for instance, if you wanted a normally-colored but half-transparent object, you would set diffuse="128,255,255,255"
  • min_seconds_between_spawns (float), max_seconds_between_spawns (float)
    • after each spawn a number is rolled between these to determine how long until checking for another spawn of this type
  • population_cap (int)
    • if there are already this many flybys of this type current flying for this room, it can't spawn another
  • moves_horizontally (bool)
    • whether flybys of this type should move horizontally instead of vertically
    • if false, the flyby starts at the top of the screen, otherwise it starts at the left
  • movement_speed (int)
    • the speed of this flybys movement
    • this is in pixels per second, relative to a <= 100 distance and a fully zoomed-in viewport; if the distance is greater or there's any zoom out the visual movement will be slower than that
    • if this is negative, the flyby starts at the bottom or right (respectively) of the screen and flies in the opposite direction than if it were positive
  • other_axis_anchors_left_or_top (bool)
    • whether the offset on the non-movement axis (so if moves_horizontally is true, this applies to the vertical offset) is anchored to the left/top (respectively) or the right/bottom
  • min_offset_on_other_axis (int), max_offset_on_other_axis (int), min_offset_percent_on_other_axis (int), max_offset_percent_on_other_axis (int)
    • similar to parallax_object's min_x_offset and such attributes, but again applying to the non-movement axis