aliens

Author Topic: Help needed: assigning missionZones to AlienMissions types  (Read 3437 times)

Offline Harald_Gray

  • Colonel
  • ****
  • Posts: 142
    • View Profile
Help needed: assigning missionZones to AlienMissions types
« on: July 29, 2014, 12:42:44 am »
I'm trying to create a new alien species mod and I've run into a problem. I saw an alien ship land on sea in a different mod so I've tried to look at the ruleset reference, specifically Regions. And I see no way of assigning specific missionZones to specific alienMissions.

Can I simply add one set of zones for every mission type I'm creating and hope the game will sort it all out? Say something like this?
Code: [Select]
regions:
  - type: STR_NORTH_AMERICA
    missionWeights:
      STR_ALIEN_NEWMISSIONTYPE1: 10
      STR_ALIEN_NEWMISSIONTYPE2: 5
    missionZones:
      -
        - [200, 220, -65, -60]
        - [230, 260, -65, -55]
        - [280, 290, -50, -40]
        - [230, 250, -50, -40]
        - [260, 280, -50, -40]
        - [230, 250, -40, -30]
        - [250, 272, -40, -28]
        - [270, 290, -42, -25]
        - [275, 295, -35, -10]
        - [240, 280, -30, -10]
      -
        - [200, 220, -65, -60]
        - [230, 260, -65, -55]
        - [280, 290, -50, -40]
        - [230, 250, -50, -40]
        - [260, 280, -50, -40]
        - [230, 250, -40, -30]
        - [250, 272, -40, -28]
        - [270, 290, -42, -25]
        - [275, 295, -35, -10]
        - [240, 280, -30, -10]
alienMissions:
  - type: STR_ALIEN_NEWMISSIONTYPE1
  - type: STR_ALIEN_NEWMISSIONTYPE2

Or would a code like this break mission zones for the vanilla missions? And if this works, would it work even if some other mod creates a new mission type but doesn't define its mission zones?

Is there a way to link a set of mission zones in a region to a specific mission type?

Offline NoelBuddy

  • Colonel
  • ****
  • Posts: 142
    • View Profile
Re: Help needed: assigning missionZones to AlienMissions types
« Reply #1 on: September 11, 2014, 08:13:20 pm »
Question on a similar topic: UFO trajectories are defined by [zone, altitude, speed]  altitude and speed make sense, but I cant' seem to find what the various zone numbers mean.

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: Help needed: assigning missionZones to AlienMissions types
« Reply #2 on: September 11, 2014, 08:44:37 pm »
Question on a similar topic: UFO trajectories are defined by [zone, altitude, speed]  altitude and speed make sense, but I cant' seem to find what the various zone numbers mean.
each land region +pacific has a missionZones entry
this entry contains 6 elements
that is referred to by 0-5=zone in UFO trajectories
if you want to have specific regions for some mission you need to copy the 6 vanilla zones and add to it for all regions where this mission can appear for as specific flight plan you need multiple zones and you need to have atrjectory  zone7->zone8->zone9->...
most missionzones have multiple "boxes" oxc picks a random one out of the list
so as an example using
Code: [Select]
  - id: P0
    groundTimer: 3000
    waypoints:
      - [5, 4, 100]
      - [0, 3, 74]
      - [0, 1, 28]
      - [1, 1, 47]
      - [5, 2, 100]
for a north america mission
sometimes the ufo "enters atmosphere"/appears in the northatlantic sometimes near the beringstreet (there are 10 boxes for missionzone5 for north america)
this system makes the appearance of ufos more random-like
not sure i would like a fully predictable route for a ufo
and the modding repalce/not add mechanic is similarto other entrys so the last mod that changes stuff there wins but i dont know if there is anyone who made a mod with such changes
or in short for haraldgrey
you cant add you need to copy the original values in your mod

Offline NoelBuddy

  • Colonel
  • ****
  • Posts: 142
    • View Profile
Re: Help needed: assigning missionZones to AlienMissions types
« Reply #3 on: September 11, 2014, 09:06:01 pm »
Okay, I wouldn't want predictable flight paths either, but I'd like to know what I'm referencing if I write a new trajectory plan.  Just to check that I've got it right here's what I've gathered so far:

zone 5: atmospheric entry/exit points

zone 0 - 4: various points in the continent that simulate the random flight plan.

Trajectory P7 seems to be for buzzing a city and P8 seems to make it try and fly by your base but looking at their entries I couldn't figure out why they do that which is key to trying to mess with them and see what I can make. ;D

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: Help needed: assigning missionZones to AlienMissions types
« Reply #4 on: September 11, 2014, 09:31:16 pm »
see image of the missionzones for austalasia region
  - id: P8
    groundTimer: 6000
    waypoints:
      - [5, 4, 100]
      - [1, 1, 60]
      - [2, 1, 20]
      - [3, 1, 30]
      - [4, 1, 20]
      - [0, 1, 42]
      - [2, 1, 56]
      - [5, 4, 100]
you see the ufo will make a erratic flightpattern all over the region
in principle you would see 7 direction changes in a retaliation search ufo until it disappears
perhaps there is a flightpath-free spot between the narrowly defined zones 1-4  where a base could be placed in most cases the zone0 still covers it
i assume if they find a base they switch to __RETALIATION_ASSAULT_RUN trajectory (for battleships)

i admit i do not fully understand all of this mechanics
e.g. i would expect
Code: [Select]
  - id: P7
    groundTimer: 9000
    waypoints:
      - [5, 4, 100]
      - [0, 3, 60]
      - [0, 2, 30]
      - [3, 1, 20]
      - [5, 0, 100]

a  - [3, 0, 20] because thats the town to land but the terror ufo never really "lands" like normal ufos so its likely also some code based exception
« Last Edit: September 12, 2014, 12:20:45 am by Falko »

Offline NoelBuddy

  • Colonel
  • ****
  • Posts: 142
    • View Profile
Re: Help needed: assigning missionZones to AlienMissions types
« Reply #5 on: September 12, 2014, 03:08:56 am »
P7 is also used in infiltration missions, it doesn't heave a landed phase, I'd expect perhaps zone 3 there is what calls it to find a city and fly over it but then I'm not sure why it would show up in P8.  I've asked elsewhere about the terror mission trigger and it's tied to the source code not part of the trajectories.