aliens

Author Topic: tuSnap: -100 not working in OXCE  (Read 915 times)

Offline Cooper

  • Colonel
  • ****
  • Posts: 151
  • Chryssalids are awesome
    • View Profile
tuSnap: -100 not working in OXCE
« on: January 20, 2024, 07:22:21 pm »
In my mod I have an item that require -100 time units to use. I call it "Time Looper", and it gives the soldier extra time units when using it. (it has very expensive ammo, so its not OP).

This worked great in OXC, but in OXCE only the throw option is there. Snap shot seems to be possible only when the required time units are not below 0. Is there a way around this? I really love this item and how it adds to the mod!

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: tuSnap: -100 not working in OXCE
« Reply #1 on: January 20, 2024, 08:43:13 pm »
Negative costs are ban in OXCE as it would cripple logic that try reason about future actions.
For regain TU most cases you need get hit by something then script or custom damage types can restore TU.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9095
    • View Profile
Re: tuSnap: -100 not working in OXCE
« Reply #2 on: January 20, 2024, 09:53:58 pm »
Maybe one simple example (stun rod restoring TU on hit)

Code: [Select]
items:
  - type: STR_STUN_ROD
    damageAlter:
      ArmorEffectiveness: 0.0
      ToTime: -2.0  # 200%
      ToHealth: 0.0 # 0%
      ToStun: 0.0   # 0%

If it must be something a soldier applies on himself and has ammo, you can potentially take a gun like Stun Launcher and give it a limited radius.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9095
    • View Profile
Re: tuSnap: -100 not working in OXCE
« Reply #3 on: January 20, 2024, 10:00:56 pm »
If you're not afraid of scripts, you can make items that give even more TUs than maximum allowed.

For example something like "combat drugs" here: https://openxcom.org/forum/index.php/topic,10604.0.html

Technically a consumable medikit (i.e. can be expensive and not OP), which the soldier can apply on himself.

Offline Cooper

  • Colonel
  • ****
  • Posts: 151
  • Chryssalids are awesome
    • View Profile
Re: tuSnap: -100 not working in OXCE
« Reply #4 on: January 20, 2024, 10:28:59 pm »
Thanks for amazing suggestions! I'll look in to it. So many new possibilities with OXCE   :D