Author Topic: [Solved] Can I change Psionic Attack Difficulty?  (Read 4507 times)

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
[Solved] Can I change Psionic Attack Difficulty?
« on: April 06, 2018, 10:41:08 pm »
In the base game, Mind Control has a bonus +30 difficulty over the base Panic Unit. Is there a way I can modify the difficulty of either move, so that I can alter how far apart they are?
« Last Edit: February 11, 2023, 05:08:20 pm by Meridian »

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: Can I change Psionic Attack Difficulty?
« Reply #1 on: April 06, 2018, 11:01:00 pm »
In the base game, Mind Control has a bonus +30 difficulty over the base Panic Unit. Is there a way I can modify the difficulty of either move, so that I can alter how far apart they are?

Yes, you can set an 'accuracy' for both types of psi attack in OXCE/OXCE+.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9084
    • View Profile
Re: Can I change Psionic Attack Difficulty?
« Reply #2 on: April 06, 2018, 11:29:47 pm »
1/ it's +20 in base game, not +30: https://github.com/SupSuper/OpenXcom/blob/master/src/Battlescape/PsiAttackBState.cpp#L142

2/ yes, it can be changed in OXCE via several attributes... see attached screenshot with the formula and corresponding ruleset

PS: note that in OXCE it was solved by making psi-panic easier by 20, instead of making psi-mind-control harder by 20... but the end result is the same as in vanilla
« Last Edit: April 06, 2018, 11:47:25 pm by Meridian »

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Can I change Psionic Attack Difficulty?
« Reply #3 on: April 06, 2018, 11:54:07 pm »
I had seen the accuracy value used in X-Pirates, but it was confusing as it looked like it was setting an external accuracy value--example: 50% accuracy means 50% chance you perform the psi attack calculation and 50% chance it is skipped and automatically fails.

Are you saying that the accuracy setting is changing the attack difficulty value? For example, an attack with very low accuracy could succeed 100% of the time if the psi attack value of the unit using it is many times higher than the target's defense value? If so, that's exactly what I wanted, and thank you.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9084
    • View Profile
Re: Can I change Psionic Attack Difficulty?
« Reply #4 on: April 07, 2018, 12:24:34 am »
Yes, exactly.

The property names are VERY confusing in this case I admit... but that's because for different types of items (e.g. firearm and psiamp) they do different things... or because Yankes was lazy :)

"panic accuracy", "mind control accuracy" and generic "accuracy multiplier" are all flat bonuses to psi attack value... and the default values (in Stats for Nerds colored purple) are pre-configured so that it works the same way as in OXC... until you mod it

PS: I will probably remove the percentage signs after accuracyPanic and accuracyMindControl in Stats for Nerds, it may be less confusing

Online Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3348
    • View Profile
Re: Can I change Psionic Attack Difficulty?
« Reply #5 on: April 07, 2018, 12:54:56 am »
The property names are VERY confusing in this case I admit... but that's because for different types of items (e.g. firearm and psiamp) they do different things... or because Yankes was lazy :)
Its named "accuracy" because it have similar function as normal accuracy. This is best visible in USE action that use bullet damage and psi "accuracy" to hit unit.

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Can I change Psionic Attack Difficulty?
« Reply #6 on: April 07, 2018, 09:54:02 am »
Thank you! It is working! I set it this way:
Code: [Select]
  - type: STR_PSI_AMP
    accuracyPanic: 35
    accuracyMindControl: 0

There is a small bit of overlap in which a soldier can fail a panic but succeed a mind control, but generally they have to become nearly sure to succeed with panic before they even start to have a chance to succeed with mind control. I also learned that the original gap between the two was larger than I thought it was. In any case, the original game seemed to have the flaw in which panic never gets used because you can almost immediately dominate with mind control. As panic is an inherently weaker psi attack, I felt it needed to be available earlier as well as usable on weaker psi troops, or else there was little reason to have it.
« Last Edit: April 07, 2018, 09:57:19 am by The Reaver of Darkness »