Difference between revisions of "Starward Rogue:XML - TilesetBackground Definitions"
Jump to navigation
Jump to search
m (Protected "Starward Rogue:XML - TilesetBackground Definitions" ([edit=legal] (indefinite) [move=legal] (indefinite))) |
|||
Line 1: | Line 1: | ||
+ | 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) | ||
+ | |||
+ | ==== 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 | ||
+ | *hue (float, default do-not-use) | ||
+ | **the hue shit used to draw the objects of this type | ||
+ | *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 | ||
+ | |||
+ | ==== sub-node type: "parallax_flyby" ==== | ||
+ | |||
[[Starward_Rogue:Main#XML_Documentation|Starward Rogue XML Documentation Main]] | [[Starward_Rogue:Main#XML_Documentation|Starward Rogue XML Documentation Main]] | ||
[[Category:Starward Rogue]] | [[Category:Starward Rogue]] |
Revision as of 18:09, 21 November 2015
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)
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
- hue (float, default do-not-use)
- the hue shit used to draw the objects of this type
- 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