Author Topic: How does the Mind Shield work?  (Read 1689 times)

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1315
    • View Profile
How does the Mind Shield work?
« on: December 07, 2017, 06:25:56 am »
I tried looking it up on the UFOPaedia but it does not seem to contain any info about the functionality of the Mind Shield.

Offline Hobbes

  • Commander
  • *****
  • Posts: 3502
  • Infiltration subroutine in progress
    • View Profile
Re: How does the Mind Shield work?
« Reply #1 on: December 07, 2017, 01:26:34 pm »
I tried looking it up on the UFOPaedia but it does not seem to contain any info about the functionality of the Mind Shield.

**MAJOR SPOILERS**

Here's the code that determines if an XCOM base is detected by a retaliation UFO

Code: [Select]
[16:17] <Warboy> size_t Base::getDetectionChance() const
[16:17] <Warboy> {
[16:17] <Warboy> size_t mindShields = std::count_if (_facilities.begin(), _facilities.end(), isMindShield());
[16:17] <Warboy> size_t completedFacilities = std::count_if (_facilities.begin(), _facilities.end(), isCompleted());
[16:17] <Warboy> return ((completedFacilities / 6 + 15) / (mindShields + 1));
[16:17] <Warboy> }

If you have a base with 12 completed facilities (hangar counts as 4) and a MS, then detection chance would be ((12/6 + 15)/2) = 8.5%, meaning that a UFO has an 8.5% chance of detecting the base, every 30 minutes that the base is within detection range of the UFO.  Without the Mind Shield the detection chance would be would 17%.

Finally, the detection range for UFOs to have a chance of spotting XCom bases can be seen below in the attached image. The detection chance previously calculated is also dependent on range - the value will increase as the distance between the base and the UFO gets shorter.
« Last Edit: December 07, 2017, 01:38:49 pm by Hobbes »

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1315
    • View Profile
Re: How does the Mind Shield work?
« Reply #2 on: December 07, 2017, 11:32:06 pm »
How is that a major spoiler? I think the UFOPaedia should be updated with this information. Even without providing code figures, it could at least have a paragraph that explains that the Mind Shields reduce detection rate by 1/2, 2/3, 3/4 and so on depending on how many you have at the base, and that furthermore the more facility squares you have used up, the higher chance the base will be detected. It is difficult to make a strategic decision on whether or not they should be used when you have no idea how they work. The vague "reduces chance of detection" means little, especially when you're putting your trust on the math skills of MicroProse, who have utterly failed in that department a number of times, as have countless other game developers. In some games there have been similar vague helper items that "improve your luck" but have been demonstrated to be either completely ineffective or actually detrimental. Across many games I have seen a distinct pattern: even if such helper items do help, it's usually too little to be worth the time or resource cost of the item, and certainly not worth putting your trust into. The times they work is the exception, not the norm. Also, not knowing how they work prevents the player from understanding how many should be used. They wonder if one is enough, maybe they don't stack so one is the max effect, or maybe they have an additive effect and there's a critical number that reach max efficiency, do they have a diminishing return, or do their effects get individually stronger the more you have? These questions aren't answered in the UFOPedia or the website, and so players are just trusting this "improves your luck" promise with little to go on.

Sorry for the wall of rant, I just feel it's REALLY important to explain things like this, even if you just provide the player with the most basic explanation of its functionality.


Thanks for providing the code, I see how it works, mostly. There is a base chance of detection at 15%, plus 1/6th of a percent per facility square used, maxing at 21% chance. It is finally divided by (mind shields +1). You said the chance increases as the UFO gets closer to the base. How does this increase happen? I don't see it in the code you provided.

Offline Hobbes

  • Commander
  • *****
  • Posts: 3502
  • Infiltration subroutine in progress
    • View Profile
Re: How does the Mind Shield work?
« Reply #3 on: December 07, 2017, 11:59:51 pm »
How is that a major spoiler? I think the UFOPaedia should be updated with this information. Even without providing code figures, it could at least have a paragraph that explains that the Mind Shields reduce detection rate by 1/2, 2/3, 3/4 and so on depending on how many you have at the base, and that furthermore the more facility squares you have used up, the higher chance the base will be detected. It is difficult to make a strategic decision on whether or not they should be used when you have no idea how they work. The vague "reduces chance of detection" means little, especially when you're putting your trust on the math skills of MicroProse, who have utterly failed in that department a number of times, as have countless other game developers. In some games there have been similar vague helper items that "improve your luck" but have been demonstrated to be either completely ineffective or actually detrimental. Across many games I have seen a distinct pattern: even if such helper items do help, it's usually too little to be worth the time or resource cost of the item, and certainly not worth putting your trust into. The times they work is the exception, not the norm. Also, not knowing how they work prevents the player from understanding how many should be used. They wonder if one is enough, maybe they don't stack so one is the max effect, or maybe they have an additive effect and there's a critical number that reach max efficiency, do they have a diminishing return, or do their effects get individually stronger the more you have? These questions aren't answered in the UFOPedia or the website, and so players are just trusting this "improves your luck" promise with little to go on.

Sorry for the wall of rant, I just feel it's REALLY important to explain things like this, even if you just provide the player with the most basic explanation of its functionality.

I just put the spoiler alert since some people love this sort of knowledge while others might feel it spoils the fun for them, and someone might wander into this thread unaware that this is a big game mechanic.

Quote
Thanks for providing the code, I see how it works, mostly. There is a base chance of detection at 15%, plus 1/6th of a percent per facility square used, maxing at 21% chance. It is finally divided by (mind shields +1). You said the chance increases as the UFO gets closer to the base. How does this increase happen? I don't see it in the code you provided.

I check the log from my conversation with Warboy where I took the previous formula but I can't exactly describe how range affects the detection, or even if that is actually working. It's better if you check this part with Warboy (or check the code yourself in GeoscapeState.cpp)

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2336
  • Developer
    • View Profile
Re: How does the Mind Shield work?
« Reply #4 on: December 08, 2017, 04:31:41 am »
you've gone 20 some years without knowing the underlying math, i'd say a vague description of "reduces detection chance" was all it needed, just like you don't need to know the maths that go into the monthly score or the to-hit calculation of an interceptor.

also this one's a flat rate for detection. the dropoff over range is for xcom craft trying to detect alien bases.
« Last Edit: December 08, 2017, 04:45:33 am by Warboy1982 »

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1315
    • View Profile
Re: How does the Mind Shield work?
« Reply #5 on: December 08, 2017, 11:42:13 am »
you've gone 20 some years without knowing the underlying math, i'd say a vague description of "reduces detection chance" was all it needed, just like you don't need to know the maths that go into the monthly score or the to-hit calculation of an interceptor.
I used a mind shield a few times until my bases got attacked, then I stopped using them and stuck with base defenses, something I knew made a difference. I reasonably suspected that the effect was a lie, and that the facility was bugged and completely useless. I'd say yes I do need to know how it works so I can decide IF it works. I don't need to know how monthly score calculations work because I can clearly see that a good score makes me get more money, while losing nations to infiltration reduces my income from the council. The numbers are prominently displayed for my perusal. But base detection is so random and infrequent that it's difficult to tell if a mind shield is working or not. By the time I've collected enough data points on it, I've already played multiple games to the finish. I should have some working data in the first playthrough, but I don't.

Just the same, I may eventually want to know more about the monetary calculations if I end up doing any changes to that segment of the game. But I don't need to know that just to play the game, because of the information provided to me in base expenses and the funding tab, as well as the finances graph.

also this one's a flat rate for detection. the dropoff over range is for xcom craft trying to detect alien bases.
Thanks!

Offline Hobbes

  • Commander
  • *****
  • Posts: 3502
  • Infiltration subroutine in progress
    • View Profile
Re: How does the Mind Shield work?
« Reply #6 on: December 08, 2017, 06:45:09 pm »
I used a mind shield a few times until my bases got attacked, then I stopped using them and stuck with base defenses, something I knew made a difference. I reasonably suspected that the effect was a lie, and that the facility was bugged and completely useless. I'd say yes I do need to know how it works so I can decide IF it works. I don't need to know how monthly score calculations work because I can clearly see that a good score makes me get more money, while losing nations to infiltration reduces my income from the council. The numbers are prominently displayed for my perusal. But base detection is so random and infrequent that it's difficult to tell if a mind shield is working or not. By the time I've collected enough data points on it, I've already played multiple games to the finish. I should have some working data in the first playthrough, but I don't.

One of the biggest factors regarding retaliations is the location of the XCom base, even more than Mind Shields or defenses. If you place your bases in certain locations it will reduce their odds of being detected.

Offline Dwarmin

  • Sergeant
  • **
  • Posts: 46
  • Smoke grenades saved the Earth
    • View Profile
Re: How does the Mind Shield work?
« Reply #7 on: December 08, 2017, 07:20:42 pm »
I'm pretty sure it is fair to call it a big spoiler for some. You can never know when an alien ship just edges by your base if you have to prepare for an attack or not. If you the use the aggressive retaliation mod, then EVERY ship could find you. The mystery is part of the game that you might enjoy, or not.

Btw, I have a question of my own to tack on here. Would it be possible to mod different alien ships to have different detection rates?


Offline Hobbes

  • Commander
  • *****
  • Posts: 3502
  • Infiltration subroutine in progress
    • View Profile
Re: How does the Mind Shield work?
« Reply #8 on: December 08, 2017, 08:06:57 pm »
Btw, I have a question of my own to tack on here. Would it be possible to mod different alien ships to have different detection rates?

Not currently possible, the value is hard coded

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1315
    • View Profile
Re: How does the Mind Shield work?
« Reply #9 on: December 08, 2017, 10:50:42 pm »
One of the biggest factors regarding retaliations is the location of the XCom base, even more than Mind Shields or defenses. If you place your bases in certain locations it will reduce their odds of being detected.
Now that's a spoiler, especially if it comes with any working explanation of how to find a location that won't get retaliation passes. I am aware of this variation, and it further reinforces my point about there being too little data to tell if the mind shield even works. It would not be uncommon to have the following scenario happen: you use mind shields in one game and defenses in the next, and get way more attacks in the first, making it seem as though the mind shields were attracting ships to your base.