Powerup spawns

From Fortress Blast
Revision as of 14:38, 21 November 2019 by Naleksuh (talk | contribs) (Created page with "Powerup locations in a map are defined by the file <code>tf/scripts/fortress_blast/powerup_spots/<map name here>.json</code>. Below is an example of a valid .json file. If the...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Powerup locations in a map are defined by the file tf/scripts/fortress_blast/powerup_spots/<map name here>.json. Below is an example of a valid .json file. If there is a syntax error in a .json file, it will not be used by Fortress Blast to spawn powerups, but it will be treated as a valid file by ConVars.

{
    "flipx": false, "flipy": true, "centerx": "0.0", "centery": "0.0",
    "1-x": "64.0", "1-y": "0.0", "1-z": "0.0",
    "2-x": "0.0", "2-y": "64.0", "2-z": "0.0"
}
Attribute Description
"flipx": <boolean> Sets whether powerup spawns should be duplicated across the X-axis along the coordinate set by the center attributes. If Y-axis flipping is false, spawns situated along the X-axis of the center coordinate will not be duplicated. Otherwise, rotational symmetry will occur and only the spawn located at the exact center will not be duplicated.
"flipy": <boolean> Sets whether powerup spawns should be duplicated across the Y-axis along the coordinate set by the center attributes. If X-axis flipping is false, spawns situated along the Y-axis of the center coordinate will not be duplicated. Otherwise, rotational symmetry will occur and only the spawn located at the exact center will not be duplicated.
"centerx": <string> Sets the X-axis center coordinate of the map, which is used when duplicating and flipping powerups. The string must contain a decimal value.
"centery": <string> Sets the Y-axis center coordinate of the map, which is used when duplicating and flipping powerups. The string must contain a decimal value.
"<#>-x": <string> Sets the X-axis coordinate of a single powerup spawn. The string must contain a decimal value.
"<#>-y": <string> Sets the Y-axis coordinate of a single powerup spawn. The string must contain a decimal value.
"<#>-z": <string> Sets the Z-axis coordinate of a single powerup spawn. The string must contain a decimal value.

In order to ensure a valid .json file, the following rules should be adhered to:

  • If flipping is required, keep the flipping and map center attributes on the topmost content line. Otherwise, the entire line and its attributes can safely be removed.
  • Keep the X-axis, Y-axis and Z-axis coordinate attributes together in triplets on each other content line, in order from 1 onwards.
  • All coordinate attributes should have a single decimal point.
  • Make sure to place a comma at the end of every content line except for the last.