DUWS-R-Team / DUWS-R

ArmA 3 Dynamic Universal War System - Rebirth
42 stars 18 forks source link

Understanding zone creation #140

Closed apargo closed 7 years ago

apargo commented 7 years ago

Hello. First of all thanks for your great mod. I don't know if this is the right place for this.

I'm trying to create my own mod but I need to understand first a few others. I'm really interested in the way this mod creates the zones. I've noticed that the lines from where it calls the script locatorZones to find proper places for the zones are commented in BlueHQinit.sqf. Where is it calling that script from? I'm not able to find it. The mod DUWS-RHS calls locatorzones right from the BlueHQinit.sqf script but it takes waaaay too long to create the zones, sometimes it gets stuck. Is it using some .hpp file as a means to create zones?.

Thank you a lot for your help.

ultranoobian commented 7 years ago

The heart of the zone generator is in this function: BIS_fnc_findSafePos

Essentially you want the map to be compatible with enough 'flat' spots and for the function to be appropriately configured.

Having mountainous terrain will slow down the function, having a large search area will slow down the function, needing a large area will slow down the function if your search area is cluttered.