Author Topic: [Feedback] New feature: Replacement for Psionics  (Read 2378 times)

Offline KingMob4313

  • Commander
  • *****
  • Posts: 543
  • Never let me down again.
    • View Profile
    • Mod Hub for Equal Terms 2.0
[Feedback] New feature: Replacement for Psionics
« on: January 20, 2020, 04:09:34 pm »
Hey team,

Feeling randomly dedicated again to doing strange things with Openxcom.

I might see about doing a personal fork to see if I can implement a replacement for psionics in the game that allows Xcom soldiers to hack/override alien electronics.

PsionicsReplacement
1Discharge CellDischarges magazine in currently carried weaponIf there is a weapon in handset ammo count to 0
2Fire WeaponForces weapon to fire multiple times randomlyIf there is a weapon in hand"Fire three snap shots or two autoshots randomly as if CQB happened."
3Shut Down Electronics"For robotic enemies or enemies with robotic prosthetics shut them down""If the unit is a cyberdisk Sectopod or Floater""255 stun damage"
4Overload ExplosivesSet off carried explosives on enemy"If the enemy has a grenade stun bomb or blaster bomb""Explode explosive"
5Open Door"Alien door""If it's an alien door"Open it
6Overload Electronics"Explode Alien consoles and power sources"If it's a alien navigation or power sourceexplode it immediately

What I am gonna be trying to do...

Has anyone else taken a run at this sort of thing and would it be something others would be interested in using if I got it working?
« Last Edit: February 14, 2023, 10:59:23 am by Meridian »

Offline memmaker

  • Captain
  • ***
  • Posts: 95
    • View Profile
Re: New feature: Replacement for Psionics
« Reply #1 on: January 20, 2020, 04:16:52 pm »
I've actually toyed around with a similar idea while implementing the EU2012 skills.

Some of the things you describe (set ammo count to 0, check for weapon in hand, check for unit type, apply stun damage) can already be done via ModScripts.

Most of the other things you describe would require changes to the codebase. When it comes to changing the source code, I am most of the time in favour of not implementing a specific feature, but enabling modders to implement such a feature by creating the needed parts.

Offline KingMob4313

  • Commander
  • *****
  • Posts: 543
  • Never let me down again.
    • View Profile
    • Mod Hub for Equal Terms 2.0
Re: New feature: Replacement for Psionics
« Reply #2 on: January 20, 2020, 04:40:56 pm »
I've actually toyed around with a similar idea while implementing the EU2012 skills.

Some of the things you describe (set ammo count to 0, check for weapon in hand, check for unit type, apply stun damage) can already be done via ModScripts.

Most of the other things you describe would require changes to the codebase. When it comes to changing the source code, I am most of the time in favour of not implementing a specific feature, but enabling modders to implement such a feature by creating the needed parts.

The fact I can do most of this with scripting sounds incredible. But what portion can't be done?

Offline memmaker

  • Captain
  • ***
  • Posts: 95
    • View Profile
Re: New feature: Replacement for Psionics
« Reply #3 on: January 20, 2020, 04:48:06 pm »
Hmm Yankes & Meridian will know in detail but my guess would be the following things would require code changes and could not be done via ModScript today:

 - Force a unit to fire
 - Force explosions (at position, of items)
    - With the exception of grenades which already exist in the BattleScape, which can be detonated by manipulating the fuse (via Script).
 - Open a door without the player opening it manually
 - Check the complete inventory for an item (AFAIK we can only check left and right hand, right now)

Offline KingMob4313

  • Commander
  • *****
  • Posts: 543
  • Never let me down again.
    • View Profile
    • Mod Hub for Equal Terms 2.0
Re: New feature: Replacement for Psionics
« Reply #4 on: January 20, 2020, 05:01:36 pm »
Hmm Yankes & Meridian will know in detail but my guess would be the following things would require code changes and could not be done via ModScript today:

 - Force a unit to fire
 - Force explosions (at position, of items)
    - With the exception of grenades which already exist in the BattleScape, which can be detonated by manipulating the fuse (via Script).
 - Open a door without the player opening it manually
 - Check the complete inventory for an item (AFAIK we can only check left and right hand, right now)

For the first I was thinking of leveraging panic fire, then manipulating the direction with the CQB calls, as if someone deflected the attack.  Since if you were carrying a weapon and it randomly went off, if could be in any sort of position and orientation when it went off.

The second, might be hard to get it to work exactly as if it ignited a specific item in the inventory, but could get around it by spawning an armed item?

The third, yeah not sure how it could be done outside of code changes.

Fourth: So adding this would enable people to do more scripting?

Offline memmaker

  • Captain
  • ***
  • Posts: 95
    • View Profile
Re: New feature: Replacement for Psionics
« Reply #5 on: January 20, 2020, 05:08:52 pm »
If done in a generalized way and integrating with the ModScripts & RuleSets? Sure.

You might want to talk to Meridian and Yankes though, before doing any major work on the OXCE code base.

Offline KingMob4313

  • Commander
  • *****
  • Posts: 543
  • Never let me down again.
    • View Profile
    • Mod Hub for Equal Terms 2.0
Re: New feature: Replacement for Psionics
« Reply #6 on: January 20, 2020, 05:18:51 pm »
If done in a generalized way and integrating with the ModScripts & RuleSets? Sure.

You might want to talk to Meridian and Yankes though, before doing any major work on the OXCE code base.

Absolutely will.  Thanks.