KPLIB_range_sectorActivation is defined as a single value in the mission's KPLIB_config.sqf file. Regardless of the base type, it will simply always use this number to set the sector size. This can lead to certain dense maps activating too many sectors concurrently which tanks the server performance.
Suggested change:
Define a separate size for separate base types in fn_getSectorRange.sqf for a more catchall approach or define a more accurate setup in KPLIB_config.sqf to have separate sizes depending on the sector type.
The campaign already has an array of base types in fn_initSectors.sqf, not to mention the mission.sqm files have markers which have labels flagged with the base types.
An ideal implementation would be to create cases in fn_getSectorRange.sqf to read KPLIB_config.sqf for separate sizes. We would remove KPLIB_range_sectorActivation from KPLIB_config.sqf and change it to separate lines such as KPLIB_range_captureActivation, KPLIB_range_towerActivation, KPLIB_range_militaryActivation, and KPLIB_range_capitalActivation. factory sectors should use the same value as KPLIB_range_captureActivation.
Kind of implemented in 3dc1c151e10a4315c3e7d6bc3450c3a1f8a7b815 3dc1c151e10a4315c3e7d6bc3450c3a1f8a7b815 a474d758709cc685d105fc46fc58604ddc94de55 and 59cc06c1f8905edc1f643e59d16d1af2386d7dc3
Current state:
KPLIB_range_sectorActivation
is defined as a single value in the mission'sKPLIB_config.sqf
file. Regardless of the base type, it will simply always use this number to set the sector size. This can lead to certain dense maps activating too many sectors concurrently which tanks the server performance.Suggested change:
Define a separate size for separate base types in
fn_getSectorRange.sqf
for a more catchall approach or define a more accurate setup inKPLIB_config.sqf
to have separate sizes depending on the sector type.The campaign already has an array of base types in
fn_initSectors.sqf
, not to mention the mission.sqm files have markers which have labels flagged with the base types.An ideal implementation would be to create cases in
fn_getSectorRange.sqf
to readKPLIB_config.sqf
for separate sizes. We would removeKPLIB_range_sectorActivation
fromKPLIB_config.sqf
and change it to separate lines such asKPLIB_range_captureActivation
,KPLIB_range_towerActivation
,KPLIB_range_militaryActivation
, andKPLIB_range_capitalActivation
.factory
sectors should use the same value asKPLIB_range_captureActivation
.