aliens

Author Topic: stealth UFO and instant ground missions  (Read 3495 times)

Offline bladum

  • Colonel
  • ****
  • Posts: 213
  • Bladum
    • View Profile
stealth UFO and instant ground missions
« on: December 17, 2014, 12:46:01 pm »
Hi,

My idea is simple: alien UFO has a flag "stealth", that makes this UFO invisible for detectors when in air. Or in general this is detectionModifier other then size and altitude.

This is actual possible to create something similar without this flag. Size is very_small, altitude is very low, speed is like 100000, and trajectory is to land on the ground for long time. But there is always a chance that player would somehow by luck intercept this UFO, which will ruin the afford. Actually by design there should be no interception fight at all. Problem is that if UFO is hard to detect in the air it is also hard to detect on the ground at the same time.

So i created a UFO that is very hard to be detected, is very fast and lands on the ground ASAP, stays on ground for long time. Battlescape does not contains normal UFO instead of this it contains special mapBlocks like Man In Black Base. This could give us missions like "rescue pilot" or "defense factory" without need to code anything else.

What do you think about it ?

Spoiler:

int Ufo::getVisibility() const
{

   if ( _rules->getStealthStatus() )
        {
      if (_altitude == "STR_GROUND")
         return 100;
      else
         return -100;
   }
   
   int size = 0;
   https:// size = 15*(3-ufosize);
   if (_rules->getSize() == "STR_VERY_SMALL")
      size = -30;
   else if (_rules->getSize() == "STR_SMALL")
      size = -15;
   else if (_rules->getSize() == "STR_MEDIUM_UC")
      size = 0;
   else if (_rules->getSize() == "STR_LARGE")
      size = 15;
   else if (_rules->getSize() == "STR_VERY_LARGE")
      size = 30;

   int visibility = 0;
   if (_altitude == "STR_GROUND")
      visibility = -30;
   else if (_altitude == "STR_VERY_LOW")
      visibility = size - 20;
   else if (_altitude == "STR_LOW_UC")
      visibility = size - 10;
   else if (_altitude == "STR_HIGH_UC")
      visibility = size;
   else if (_altitude == "STR_VERY_HIGH")
      visibility = size - 10;

   return visibility;
}

« Last Edit: December 17, 2014, 12:56:30 pm by bladum »

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: stealth UFO and instant ground missions
« Reply #1 on: December 17, 2014, 01:05:38 pm »
its one code-solution for one mod idea
if i would care about this i would do something like this
a default value like
groundvisibility: -30
airvisibility: 0
Code: [Select]
   int visibility = {airvisibility};
   if (_altitude == "STR_GROUND")
      visibility = {groundvisibility};
that would allow setting it to 100/-100
but also allow reverse missions like this
very good detections on air
NO detection on ground
high negative score if you dont catch it (ufo lands)
so you have to catch it or without hyperwave at least attempt to intercept all ufos

Offline bladum

  • Colonel
  • ****
  • Posts: 213
  • Bladum
    • View Profile
Re: stealth UFO and instant ground missions
« Reply #2 on: December 17, 2014, 01:17:50 pm »
this would be ok :) thanks

Offline bladum

  • Colonel
  • ****
  • Posts: 213
  • Bladum
    • View Profile
Re: stealth UFO and instant ground missions
« Reply #3 on: December 18, 2014, 12:37:03 pm »
this will not work as aliens score 1 point per 30 minutes when landed and this is hardcoded :( So mission that exist for 10 days would generate 480 points for aliens.

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: stealth UFO and instant ground missions
« Reply #4 on: December 18, 2014, 12:48:34 pm »
are you talking about the
missed shooting down
=> landed ufo undetectable
=> high negative score
so let the ufo sit for 10 or 20 days to get its high negative score
that way its not a spike in the point graph and even less detectable :)

do grounded (after they got shot down) ufos generate the same points as landed ones?

Offline bladum

  • Colonel
  • ****
  • Posts: 213
  • Bladum
    • View Profile
Re: stealth UFO and instant ground missions
« Reply #5 on: December 18, 2014, 01:55:44 pm »
I found in code that time30Minutes trigger

every 30 minutes of landed ufo = 1 point
every 30 minutes of flying ufo = 1 point regardless of detection status
no points in this trigger when crashed

I fully understand that this is by design. I wonder if we could make it as external variable defined in ruleset. This simple change would allow much more type of missions like in other UFO games but also to differentiate score for vanilla per different standard race / mission or UFO type. Harvesting would be like 10 score per 30 minutes so landing would be also very dangerous.

Tom
« Last Edit: December 18, 2014, 01:58:45 pm by bladum »

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: stealth UFO and instant ground missions
« Reply #6 on: December 18, 2014, 05:14:15 pm »
you slightly misinterpreted the code there, notice there's no break; between landed and flying. this means LANDED runs the code listed under FLYING as well, so all the detection code still runs, it just gets a bonus point for being landed.