Author Topic: [Documentation] Active camouflage and predator vision ;-)  (Read 39290 times)

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8597
    • View Profile
[Documentation] Active camouflage and predator vision ;-)
« on: August 09, 2016, 10:43:48 am »
Hi,

made for the alpha chryssalid idea, https://openxcom.org/forum/index.php/topic,4788.0.html (totally not a randomfuck), but maybe useful for others as well.
Maybe alternative invisibility mechanics for Catgirls?

You can now define attribute "activeCamouflage" on enemy armor, which will make them less visible.
Examples:

Positive numbers:
"activeCamouflage: 7" makes the enemy visible from distance of 7 tiles or less.

Negative numbers:
"activeCamouflage: -10" makes the enemy visible from distance, which is 10 tiles less than usual (for given time of day and given attacker's armor)

There is also a mechanic to counter this effect.
You can define an attribute "predatorVision" on friendly armor, which will make camouflaged enemies more visible.

Example:
"activeCamouflage: -5" and "predatorVision: 5" will cancel each other.

Active camouflage cannot decrease the visibility below 1 tile and predator vision cannot increase the visibility beyond normal range (it is only supposed to counter the camouflage effect).

M.

PS: activeCamouflage doesn't work on units under Xcom control (incl. mind-controlled enemies)... I don't want people to cripple AI even more... enemies and neutrals have unimpaired vision.

EDIT: Since 2016-11-05

"activeCamouflage" is replaced by "camouflageAtDay" and "camouflageAtDark"
"predatorVision" is replaced by "antiCamouflageAtDay" and"antiCamouflageAtDark"

the AtDay and AtDark variants are applied together with "visibilityAtDay" and "visibilityAtDark" respectively
« Last Edit: November 05, 2016, 01:14:11 pm by Meridian »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Active camouflage and predator vision ;-)
« Reply #1 on: August 09, 2016, 10:54:06 am »
This is jaw-droppingly awesome.

No, really. There are many excellent additions in OXCE+, but this one is something I just didn't expect to happen in a foreseeable future. This will revolutionize stealth.

You can now define attribute "activeCamouflage" on enemy armor, which will make them less visible.
Examples:

Positive numbers:
"activeCamouflage: 7" makes the enemy visible from distance of 7 tiles or less.

I understand it depends on darkness, yes? So if I put "activeCamouflage: 25", I won't be seeing any further at night?

Also another question: if you fire at a unit you can't see because it's too far (and it's stealthy), can you hit them? Because you can't hit them in the old system.

Negative numbers:
"activeCamouflage: -10" makes the enemy visible from distance, which is 10 tiles less than usual (for given time of day and given attacker's armor)

Cool.

There is also a mechanic to counter this effect.
You can define an attribute "predatorVision" on friendly armor, which will make camouflaged enemies more visible.

Example:
"activeCamouflage: -5" and "predatorVision: 5" will cancel each other.

Active camouflage cannot decrease the visibility below 1 tile and predator vision cannot increase the visibility beyond normal range (it is only supposed to counter the camouflage effect).

Clear and sensible.

PS: activeCamouflage doesn't work on units under Xcom control (incl. mind-controlled enemies)... I don't want people to cripple AI even more... enemies and neutrals have unimpaired vision.

I totally understand, but wouldn't it be enough to leave it to the modder to decide?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8597
    • View Profile
Re: Active camouflage and predator vision ;-)
« Reply #2 on: August 09, 2016, 11:04:28 am »
This is jaw-droppingly awesome.

No, really. There are many excellent additions in OXCE+, but this one is something I just didn't expect to happen in a foreseeable future. This will revolutionize stealth.

Depends on what Yankes implements in OXCE. If he does something better (which he probably will), this feature becomes obsolete.

I understand it depends on darkness, yes? So if I put "activeCamouflage: 25", I won't be seeing any further at night?

At the end, both camouflage and anti-camouflage cannot increase your vision beyond the usual maximum defined by time of the day and armor properties (visibilityAtDay and visibilityAtDark).

The whole algorithm is here: https://github.com/MeridianOXC/OpenXcom/commit/eb72c965cece512ea4acda07bceccf614cca9a6a#diff-a19679ce5a8ec8fcb81157507368cd4eR2816
Should be readable also to non-devs.

Also another question: if you fire at a unit you can't see because it's too far (and it's stealthy), can you hit them? Because you can't hit them in the old system.

Which old system? I am not aware of this.
If you fire and hit them by chance, they will be hit... I love random hits, one of the best features in the game :)

I totally understand, but wouldn't it be enough to leave it to the modder to decide?

No problem to change this, let's wait if anyone starts using it and how...
« Last Edit: August 09, 2016, 11:06:28 am by Meridian »

Offline Surrealistik

  • Colonel
  • ****
  • Posts: 484
    • View Profile
Re: Active camouflage and predator vision ;-)
« Reply #3 on: August 09, 2016, 11:08:18 am »
Wow, you actually did it! Amazing man, very much appreciated.

EDIT: Is it possible to include the predator vision property on non-armour items? I had in mind an idea for an advanced Ayephone/auspex item.
« Last Edit: August 09, 2016, 11:11:36 am by Surrealistik »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Active camouflage and predator vision ;-)
« Reply #4 on: August 09, 2016, 11:13:25 am »
Which old system? I am not aware of this.

I meant the system currently used in Piratez, with special loftemps (no central voxel).

No problem to change this, let's wait if anyone starts using it and how...

Oh yeah, I need to test it myself.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8597
    • View Profile
Re: Active camouflage and predator vision ;-)
« Reply #5 on: August 09, 2016, 11:14:45 am »
EDIT: Is it possible to include the predator vision property on non-armour items? I had in mind an idea for an advanced Ayephone/auspex item.

Yes, Solarius also wanted night vision goggles... but it's not that easy.
Maybe Yankes will add it later.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Active camouflage and predator vision ;-)
« Reply #6 on: August 09, 2016, 11:16:54 am »
Yes, Solarius also wanted night vision goggles... but it's not that easy.
Maybe Yankes will add it later.

Solarius wanted stat-changing equipment in general... You know, belts of giant strength or shoulder-mounted force shield generators. :)

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8597
    • View Profile
Re: Active camouflage and predator vision ;-)
« Reply #7 on: August 09, 2016, 11:22:54 am »
Solarius wanted stat-changing equipment in general... You know, belts of giant strength or shoulder-mounted force shield generators. :)

<cough>, DotA, <cough> ;)


Offline Boltgun

  • Colonel
  • ****
  • Posts: 252
  • [UTTERANCES]
    • View Profile
    • Piratez let's play
Re: Active camouflage and predator vision ;-)
« Reply #8 on: August 09, 2016, 12:51:21 pm »
Really cool, this feature was badly needed for some enemies. It shouldn't cripple the game to have scouts with 3 or 4 camouflage and no additional armor, after all you have such advantage in night missions and that does not make them trivial.

This remind me of UFO Aftershock and its excellent detection system (among the not-so-excellent features of this game). In this game you can also detect enemies through walls with sound, psy or heat signature (marked with a question mark until you can see it), depending of the enemy, and a good soldier with noise dampener could crawl towards targets for either snipers or his own shotgun.
« Last Edit: August 09, 2016, 12:54:36 pm by Boltgun »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Active camouflage and predator vision ;-)
« Reply #9 on: August 09, 2016, 02:26:48 pm »
Yeah, alternate vision modes are another thing. I'm actually in the process of putting together a basic concept for it.
A very good sound system was introduced in UNIMOD, for UFO: Extraterrestrials. While the game as such is pretty shitty for many reasons, the UNIMOD transforms it into a really cool game with lots of exciting features. I can try conceptualize it too.

Offline Surrealistik

  • Colonel
  • ****
  • Posts: 484
    • View Profile
Re: Active camouflage and predator vision ;-)
« Reply #10 on: August 09, 2016, 07:16:23 pm »
PS: activeCamouflage doesn't work on units under Xcom control (incl. mind-controlled enemies)... I don't want people to cripple AI even more... enemies and neutrals have unimpaired vision.

Shouldn't this work for specialized armours like the Ghost Armour though?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8597
    • View Profile
Re: Active camouflage and predator vision ;-)
« Reply #11 on: August 09, 2016, 07:19:20 pm »
Shouldn't this work for specialized armours like the Ghost Armour though?

Probably... I haven't researched ghost armor yet, so no idea what it is supposed to do... as I said, can be changed easily if asked for (and justified).

Offline Surrealistik

  • Colonel
  • ****
  • Posts: 484
    • View Profile
Re: Active camouflage and predator vision ;-)
« Reply #12 on: August 09, 2016, 07:20:37 pm »
Ghost Armour grants Ethereal style invisibility.

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: Active camouflage and predator vision ;-)
« Reply #13 on: August 09, 2016, 07:28:29 pm »
Ghost Armour grants Ethereal style invisibility.

* catgirl style invisibility. Only visible on the oblique.

Edit: I stand corrected. It is indeed Ethereal as well as the Catgirl style.
loftempsSet: [ 85 ]
« Last Edit: August 09, 2016, 07:31:38 pm by ivandogovich »

Offline Yankes

  • Commander
  • *****
  • Posts: 3194
    • View Profile
Re: Active camouflage and predator vision ;-)
« Reply #14 on: August 09, 2016, 08:24:34 pm »
Depends on what Yankes implements in OXCE. If he does something better (which he probably will), this feature becomes obsolete.
I will probably build my system on top of yours (or be more accurate it will respect your rulesets). It will take couple of weeks before I will start working on my version and it would be pain in a** to change mods when my version will be released or wait for me to finish it.

Overall my goal for changing visibility it will be exposing calculation of visibility of unit to scripts. You will get all basic data like both units, light, distance and smoke density.
From that you could do any calculations to determine if unit is visible or not. This mean that you can ignore smoke or make smoke more potent. Like wise I plan adding fire density too, it will be ignored by default calculations but mod can use it to recreate heatvison (smoke and light is ignored and fire work like smoke).