Powerup spawns: Difference between revisions
From Fortress Blast
Jump to navigationJump to search
(Added link and changed to use integers) |
m (9 revisions imported: Importing pages from old wiki) |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
Powerup | [[Powerups|Powerup]] spawns in a map are defined by the file <code>tf/scripts/fortress_blast/powerup_spawns/<map name here>.json</code>. 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]]. | ||
{ | { | ||
Line 26: | Line 26: | ||
|} | |} | ||
When editing or [[Custom powerup | When editing or [[Custom powerup spawns|creating a .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. | * 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. | * Keep the X-axis, Y-axis and Z-axis coordinate attributes together in triplets on each other content line, in order from 1 onwards. | ||
* Make sure to place a comma at the end of every content line except for the last. | * Make sure to place a comma at the end of every content line except for the last. |
Latest revision as of 21:22, 6 June 2023
Powerup spawns in a map are defined by the file tf/scripts/fortress_blast/powerup_spawns/<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", "centery": "0", "1-x": "64", "1-y": "0", "1-z": "0", "2-x": "0", "2-y": "64", "2-z": "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 an integer or 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 an integer or decimal value. |
"<#>-x": <string> |
Sets the X-axis coordinate of a single powerup spawn. The string must contain an integer or decimal value. |
"<#>-y": <string> |
Sets the Y-axis coordinate of a single powerup spawn. The string must contain an integer or decimal value. |
"<#>-z": <string> |
Sets the Z-axis coordinate of a single powerup spawn. The string must contain an integer or decimal value. |
When editing or creating a .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.
- Make sure to place a comma at the end of every content line except for the last.