Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 3 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Clone or download this repository into your `garrysmod/addons` folder and restar
## Usage Instructions
The config for this addon is located in the `cfc_random_spawn/lua/cfc_random_spawn/sv_config.lua` file.
Here you will find 2 config constants, and the spawn points table structure. The constants are as follows:
- `DEFAULT_CENTER_CUTOFF` `(default 3000)` - Default cutoff range from the most popular pvp center, where players further away from this will be ignored. The system tries to place you closest to everyone else.
- `DEFAULT_CENTER_RADIUS` `(default 3000)` - Default cutoff range from the most popular pvp center, where players further away from this will be ignored. The system tries to place you closest to everyone else.
- `CLOSENESS_LIMIT` `(default 400)` - Will not choose spawnpoints that are within this many units of a valid player (i.e. a living pvper). 0 to disable.
- `SELECTION_SIZE` `(default 8)` - Max number of 'ideal' spawnpoints to select from randomly.
- `CENTER_UPDATE_INTERVAL` `(default 60)` - The gap (in seconds) between each center popularity update. If set to 0, will update on every respawn.
Expand All @@ -22,13 +22,8 @@ Adding spawnpoints is done as follows:
- Create an entry to the `CUSTOM_SPAWNS` table for the map of your choosing, as follows:
```lua
CFCRandomSpawn.Config.CUSTOM_SPAWNS["gm_bluehills_test3"] = {
centerCutoff = NUMBER,
centerUpdateInterval = NUMBER,
dynamicCenterStartingPos = VECTOR,
pvpCenters = {
{ centerPos = VECTOR, overrideCutoff = NUMBER },
...
},
zones = {
{ cornerA = VECTOR, cornerB = VECTOR },
...
Expand All @@ -40,12 +35,8 @@ Adding spawnpoints is done as follows:
}
```
Where
- `centerCutoff` overrides `DEFAULT_CENTER_CUTOFF` for this map.
- `centerUpdateInterval` overrides `CENTER_UPDATE_INTERVAL` for this map.
- `dynamicCenterStartingPos` defines the position to use for locating the dynamic pvp center (requies zero manual pvp centers) when no active combat is happening. Best positioned at the 'natural spawn area' of the map, as this is guaranteed to happen on initial map load. Defaults to `Vector( 0, 0, 0 )`.
- **pvpCenters**: defines one or more central positions where pvp most often takes place around, with the first one being the fallback if there are no pvpers. If none are defined, will default to the average position of all spawnpoints for this map.
- `centerPos` is the position for the pvp center.
- `overrideCutoff` overrides the map/default cutoff value for obtaining the average player position near this specific pvp center, useful for maps with many centers that vary heavily in size.
- `dynamicCenterStartingPos` defines the position to use for locating the dynamic pvp center when no active combat is happening. Best positioned at the 'natural spawn area' of the map, as this is guaranteed to happen on initial map load. Defaults to `Vector( 0, 0, 0 )`.
- **zones**: defines boxes that separate spawns into groups. Except in rare cases, spawns will only be chosen if they are in the same zone as the currently active pvp center. Any spawns not contained by a zone will be added to a default group.
- `cornerA` is the first corner of the zone.
- `cornerB` is the second corner of the zone.
Expand All @@ -62,12 +53,10 @@ To enable this tool run `cfc_spawneditor_toggle` in console.

Features:
- To add / remove spawns `cfc_spawneditor_spawnadd` / `cfc_spawneditor_spawndel`
- To add / remove pvp centers `cfc_spawneditor_centeradd` / `cfc_spawneditor_centerdel`
- To mark / cancel / add / remove zones `cfc_spawneditor_zonea` and `cfc_spawneditor_zoneb` / `cfc_spawneditor_zonecancel` / `cfc_spawneditor_zoneadd` / `cfc_spawneditor_zonedel`
- Zones will be previewed in magenta, then turn cyan when confirmed.
- To change the cutoff radius for the current map `cfc_spawneditor_cutoff`
- To export the current map's spawnpoints to console use `cfc_spawneditor_export`, you can then paste this into sv_config.lua
- To change the update interval for pvp centers temporarily for debugging, use `cfc_spawneditor_center_interval <interval>`
- To change the update interval for pvp centers temporarily for debugging, use `cfc_spawneditor_pvpcenter_update_interval <interval>`

Visual appearance:
![image](https://user-images.githubusercontent.com/69946827/190715330-645c7701-953d-452e-aa52-9908e479eecf.png)
Expand Down
6 changes: 0 additions & 6 deletions lua/cfc_random_spawn/configs/gm_blesmont.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
CFCRandomSpawn.Config.CUSTOM_SPAWNS["gm_blesmont"] = {
centerCutoff = nil,
centerUpdateInterval = nil,
pvpCenters = {
{ centerPos = Vector( 7050, -7530, 8 ), overrideCutoff = 4000 },
{ centerPos = Vector( 10429, -8922, 9 ), overrideCutoff = 4000 },
{ centerPos = Vector( 3386, -8406, 8 ), overrideCutoff = 4000 }
},
spawnpoints = {
{ spawnPos = Vector( 6925, -7964, 3 ), spawnAngle = Angle( 0, 90, 0 ), pvp = true },
{ spawnPos = Vector( 7336, -7815, 3 ), spawnAngle = Angle( 0, 90, 0 ), pvp = true },
Expand Down
4 changes: 0 additions & 4 deletions lua/cfc_random_spawn/configs/gm_bluehills_test3.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
CFCRandomSpawn.Config.CUSTOM_SPAWNS["gm_bluehills_test3"] = {
centerCutoff = 2000,
centerUpdateInterval = nil,
pvpCenters = {
{ centerPos = Vector( 292, -1, 265 ), overrideCutoff = nil }
},
spawnpoints = {
{ spawnPos = Vector( 1104.6744384766, 131.18112182617, 64.03125 ) },
{ spawnPos = Vector( 385.55798339844, 157.09564208984, 64.03125 ) },
Expand Down
9 changes: 0 additions & 9 deletions lua/cfc_random_spawn/configs/gm_city25.lua
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
CFCRandomSpawn.Config.CUSTOM_SPAWNS["gm_city25"] = {
centerCutoff = 3000,
centerUpdateInterval = nil,
pvpCenters = {
{ centerPos = Vector( 7, -1340, 101 ), overrideCutoff = 3000 },
{ centerPos = Vector( -3786, -3121, 92 ), overrideCutoff = 4000 },
{ centerPos = Vector( -899, -6346, 109 ), overrideCutoff = 3000 },
{ centerPos = Vector( 2892, -5823, 101 ), overrideCutoff = 3000 },
{ centerPos = Vector( -2008, -7467, 94 ), overrideCutoff = 4000 },
{ centerPos = Vector( 4600, -7998, 91 ), overrideCutoff = 4000 }
},
spawnpoints = {
{ spawnPos = Vector( 599, -1308, 83 ), spawnAngle = Angle( 0, -180, 0 ), pvp = true },
{ spawnPos = Vector( 598, -1878, 83 ), spawnAngle = Angle( 0, -180, 0 ), pvp = true },
Expand Down
7 changes: 0 additions & 7 deletions lua/cfc_random_spawn/configs/gm_construct_in_flatgrass.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
CFCRandomSpawn.Config.CUSTOM_SPAWNS["gm_construct_in_flatgrass"] = {
centerCutoff = nil,
centerUpdateInterval = nil,
pvpCenters = {
{ centerPos = Vector( 1831, -873, -8567 ), overrideCutoff = 3250 },
{ centerPos = Vector( -932, -2738, -8167 ), overrideCutoff = 2250 },
{ centerPos = Vector( -2897, -3955, -8157 ), overrideCutoff = 2250 },
{ centerPos = Vector( -2959, 3392, -8507 ), overrideCutoff = 2250 }
},
spawnpoints = {
{ spawnPos = Vector( 1968, -1050, -8577 ), spawnAngle = Angle( 0, -180, 0 ), pvp = true },
{ spawnPos = Vector( 1986, -843, -8577 ), spawnAngle = Angle( 0, -180, 0 ), pvp = true },
Expand Down
8 changes: 0 additions & 8 deletions lua/cfc_random_spawn/configs/gm_excess_construct_13.lua
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
CFCRandomSpawn.Config.CUSTOM_SPAWNS["gm_excess_construct_13"] = {
centerCutoff = 2000,
centerUpdateInterval = nil,
pvpCenters = {
{ centerPos = Vector( -3196, -828, 857 ), overrideCutoff = 3250 },
{ centerPos = Vector( 155, 1709, 252 ), overrideCutoff = 2250 },
{ centerPos = Vector( 2858, 95, 260 ), overrideCutoff = 3250 },
{ centerPos = Vector( 2768, 2097, 66 ), overrideCutoff = 2250 },
{ centerPos = Vector( -13672, 4044, 832 ), overrideCutoff = 3250 }
},
spawnpoints = {
{ spawnPos = Vector( -3225, -568, 683 ), spawnAngle = Angle( 0, 0, 0 ), pvp = true },
{ spawnPos = Vector( -2793, -720, 419 ), spawnAngle = Angle( 0, -45, 0 ), pvp = true },
Expand Down
9 changes: 0 additions & 9 deletions lua/cfc_random_spawn/configs/gm_excess_island_night.lua
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
CFCRandomSpawn.Config.CUSTOM_SPAWNS["gm_excess_island_night"] = {
centerCutoff = nil,
centerUpdateInterval = nil,
pvpCenters = {
{ centerPos = Vector( 251, -2425, 48 ), overrideCutoff = 2250 },
{ centerPos = Vector( 3568, -1319, 247 ), overrideCutoff = 1250 },
{ centerPos = Vector( 3542, -4542, 155 ), overrideCutoff = 2250 },
{ centerPos = Vector( 424, 1786, 247 ), overrideCutoff = 1250 },
{ centerPos = Vector( -2233, 1916, 261 ), overrideCutoff = 2250 },
{ centerPos = Vector( 4175, 2640, 244 ), overrideCutoff = 3250 }
},
spawnpoints = {
{ spawnPos = Vector( 176, -2657, 11 ), spawnAngle = Angle( 0, -90, 0 ), pvp = true },
{ spawnPos = Vector( 170, -2271, 11 ), spawnAngle = Angle( 0, 0, 0 ), pvp = true },
Expand Down
4 changes: 0 additions & 4 deletions lua/cfc_random_spawn/configs/gm_freespace_13.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
CFCRandomSpawn.Config.CUSTOM_SPAWNS["gm_freespace_13"] = {
centerCutoff = 3000,
centerUpdateInterval = nil,
pvpCenters = {
{ centerPos = Vector( -2374, -40, -14580 ), overrideCutoff = nil }
},
spawnpoints = {
{ spawnPos = Vector( -1313, 25, -14566 ), spawnAngle = Angle( 0, 180, 0 ), pvp = true },
{ spawnPos = Vector( -3040, 223, -14566 ), spawnAngle = Angle( 0, -45, 0 ), pvp = true },
Expand Down
12 changes: 0 additions & 12 deletions lua/cfc_random_spawn/configs/gm_heartland.lua
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
CFCRandomSpawn.Config.CUSTOM_SPAWNS["gm_heartland"] = {
centerCutoff = 3000,
centerUpdateInterval = nil,
pvpCenters = {
{ centerPos = Vector( -18, -437, 36 ), overrideCutoff = 2250 },
{ centerPos = Vector( -2933, 444, 137 ), overrideCutoff = 2250 },
{ centerPos = Vector( -25, 3166, 25 ), overrideCutoff = 2800 },
{ centerPos = Vector( -3900, 2314, 101 ), overrideCutoff = 2250 },
{ centerPos = Vector( 4026, 2408, 101 ), overrideCutoff = 2250 },
{ centerPos = Vector( -3073, 3625, 1602 ), overrideCutoff = 1000 },
{ centerPos = Vector( 1641, 5494, -123 ), overrideCutoff = 2250 },
{ centerPos = Vector( -6533, 3447, 190 ), overrideCutoff = 2250 },
{ centerPos = Vector( -7682, 11888, 97 ), overrideCutoff = 2250 }
},
spawnpoints = {
{ spawnPos = Vector( 594, -351, 28 ), spawnAngle = Angle( 0, -180, 0 ), pvp = true },
{ spawnPos = Vector( -614, -347, 29 ), spawnAngle = Angle( 0, 0, 0 ), pvp = true },
Expand Down
14 changes: 0 additions & 14 deletions lua/cfc_random_spawn/configs/gm_mobenix_v3_final.lua
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
CFCRandomSpawn.Config.CUSTOM_SPAWNS["gm_mobenix_v3_final"] = {
centerCutoff = 4500,
centerUpdateInterval = nil,
pvpCenters = {
{ centerPos = Vector( -9412, -2020, 10445 ), overrideCutoff = 3000 },
{ centerPos = Vector( -384, 1271, -204 ), overrideCutoff = 3000 },
{ centerPos = Vector( 3248, 2223, -321 ), overrideCutoff = 3000 },
{ centerPos = Vector( -1072, 11970, 1086 ), overrideCutoff = 4000 },
{ centerPos = Vector( 5202, -10829, 136 ), overrideCutoff = 4000 },
{ centerPos = Vector( 8003, 3930, -315 ), overrideCutoff = 4000 },
{ centerPos = Vector( 8497, -9219, 95 ), overrideCutoff = 3000 },
{ centerPos = Vector( 10257, -342, -210 ), overrideCutoff = 4000 },
{ centerPos = Vector( 8164, 9508, -443 ), overrideCutoff = 4000 },
{ centerPos = Vector( 11528, -6996, -210 ), overrideCutoff = 4000 },
{ centerPos = Vector( 15346, -8156, -461 ), overrideCutoff = 3000 }
},
spawnpoints = {
{ spawnPos = Vector( -9124, -1747, 10384 ), spawnAngle = Angle( 0, 179, 0 ), pvp = true },
{ spawnPos = Vector( -9687, -1744, 10384 ), spawnAngle = Angle( 0, -1, 0 ), pvp = true },
Expand Down
7 changes: 0 additions & 7 deletions lua/cfc_random_spawn/configs/gm_obselisk.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
CFCRandomSpawn.Config.CUSTOM_SPAWNS["gm_obselisk"] = {
centerCutoff = 3000,
centerUpdateInterval = nil,
pvpCenters = {
{ centerPos = Vector( -3981, -762, -1344 ), overrideCutoff = 3000 },
{ centerPos = Vector( -5558, 56, -1344 ), overrideCutoff = 3000 },
{ centerPos = Vector( -1693, -673, -1344 ), overrideCutoff = 3000 },
{ centerPos = Vector( 2904, -588, -2624 ), overrideCutoff = 3000 }
},
spawnpoints = {
{ spawnPos = Vector( -3680, -349, -1334 ), spawnAngle = Angle( 0, 45, 0 ), pvp = true },
{ spawnPos = Vector( -4513, -350, -1334 ), spawnAngle = Angle( 0, 135, 0 ), pvp = true },
Expand Down
59 changes: 0 additions & 59 deletions lua/cfc_random_spawn/configs/gm_trainconstruct2.lua

This file was deleted.

8 changes: 0 additions & 8 deletions lua/cfc_random_spawn/configs/gm_tubeway_circuit_v1.lua
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
CFCRandomSpawn.Config.CUSTOM_SPAWNS["gm_tubeway_circuit_v1"] = {
centerCutoff = 3000,
centerUpdateInterval = nil,
pvpCenters = {
{ centerPos = Vector( 3865, 2426, 0 ), overrideCutoff = 3000 },
{ centerPos = Vector( 1209, 2068, 0 ), overrideCutoff = 3000 },
{ centerPos = Vector( 3749, -922, 0 ), overrideCutoff = 3000 },
{ centerPos = Vector( 5380, -1812, 2048 ), overrideCutoff = 3000 },
{ centerPos = Vector( 9717, -1560, -4994 ), overrideCutoff = 3000 }
},
spawnpoints = {
{ spawnPos = Vector( 4338, 2662, 10 ), spawnAngle = Angle( 0, 178, 0 ), pvp = true },
{ spawnPos = Vector( 2828, 2683, 10 ), spawnAngle = Angle( 0, -2, 0 ), pvp = true },
Expand Down
Loading
Loading