EDIT: another related topic available since OXCE v7.9:
[DONE][Suggestion] Aliens should build a base where the (final) UFO lands:
https://openxcom.org/forum/index.php/topic,10860.0.html--
In OpenXcom, all site type missions (the ones with `objective: 3`) work only with point areas (representing cities).
Since OXCE v7.3, it is now possible to use also non-point (i.e. rectangular) areas and the exact mission site coordinates will be chosen randomly from that rectangle area.
Please note that
for mission sites spawned directly, the entire area is considered valid and no additional checks are performed:
- no check for ocean texture
- no check for fake underwater texture
- no check for being inside the region
For mission sites spawned from a landed UFO (only since OXCE v7.3.3), there are additional checks performed if `
objectiveOnTheLandingSite: true` (see below)
- check for ocean texture is done
- check for fake underwater texture is done
- but the check for being inside the region is not done (intentionally)
Note that if a valid landing site is not found after 100 random attempts, UFO will still land (on water or invalid texture).
More technical details below, just copypasted from the source code comments:
// -----------------------------------------------------------
// Summary of mission site spawning algorithms (
objective: 3)
// -----------------------------------------------------------
//
Type 1:// - no UFOs involved
// - only 1 wave
// - the wave specifies the alien deployment directly (e.g. `
ufo: STR_ARTIFACT_SITE_P1 # spawn this site directly`)
// - example (1):
STR_ALIEN_ARTIFACT (TFTD)
//
Support for non-point areas: yes, without any additional ruleset changes required//
Type 2:// - no UFOs involved
// - only 1 wave
// - the wave does NOT specify the alien deployment directly (e.g. `
ufo: dummy #don't spawn a ufo, we only want the site`)
// -> option A: alien deployment is chosen randomly = from the area's texture definition
// -> option B: alien deployment is specified by the mission's `siteType` (overrides option A if both are defined)
// - example (2A):
STR_ALIEN_SHIP_ATTACK (TFTD)
// - example (2B): none in vanilla, only mods
//
Support for non-point areas: yes, without any additional ruleset changes required//
Type 3:// - with UFOs waves
// - only 1 wave with `
objective: true`
// - the wave does NOT specify the alien deployment (because it already specifies the UFO type)
// -> option A: alien deployment is chosen randomly = from the area's texture definition
// -> option B: alien deployment is specified by the mission's `siteType` (overrides option A if both are defined)
// - example (3A):
STR_ALIEN_SURFACE_ATTACK (TFTD)
// - example (3B): none in vanilla, only mods
//
Support for non-point areas: yes, but it is recommended to use one more wave attribute: `
objectiveOnTheLandingSite: true`
// ->
false: UFO always lands in the top-left corner of the area; site spawns randomly inside the area
// ->
true: UFO lands randomly inside the area; site spawns exactly on the UFO landing site
Minimum required OXCE version for non-point areas:
------------------------------------------
since OXCE v6.8: support for 2a and partially 3a
since OXCE v7.2.1: support for 3b and 2b, full support for 3a
since OXCE v7.2.2: support for 1
since OXCE v7.3: support for old save conversion (i.e. older saves can be loaded even if modders remove/delete technical mission regions used previously... for example
XcomFiles v2.2 and higher)
since OXCE v7.3.3: support for checks for valid land point for site spawns by a landed UFO
Don't hesitate to ask if unclear.
PS: also when defining areas in your mission zones, keep each individual mission zone either with 100% point areas or 100% non-point areas... don't mix them (in some uncommon cases, this will lead to unexpected behavior and/or crashes)