aliens

Author Topic: [DONE][Suggestion] Set faction on Mind Control weapons  (Read 2134 times)

Offline Dioxine

  • Commander
  • *****
  • Posts: 5465
  • punk not dead
    • View Profile
    • Nocturnal Productions
[DONE][Suggestion] Set faction on Mind Control weapons
« on: April 19, 2023, 04:35:13 pm »
Ability to set flag on Mind Control to change faction to civilian upon successful mind control attack, instead of the faction of the owner of weapon. Could be a fun option. :)

I believe this will open a completely new tactical option; weapons which are meant to not puppetteer enemies, but turn them relatively docile (by changing faction to civilian in case of Mind Control). On the upside, such 'confusing' weapons can be much stronger/faster/cheaper to use than their Mind Control (change to own faction) counterparts.

Example: Herder's Staff in XPZ. My idea for it was to be a pacifying weapon, but I went for MC since it was the closest approximation. Now if it could change enemies into temporary civilians I could give it more attacks per turn, and this gives a fresh dimension to psionic combat: mass confusion instead of direct puppeteering.
« Last Edit: February 02, 2024, 09:44:03 am by Meridian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9143
    • View Profile
Re: Suggestion: Set faction on Mind Control weapons
« Reply #1 on: April 19, 2023, 04:47:29 pm »
moved to WIP section

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9143
    • View Profile
Re: [DONE][Suggestion] Set faction on Mind Control weapons
« Reply #2 on: February 02, 2024, 09:53:17 am »
Done.

https://github.com/MeridianOXC/OpenXcom/commit/c923f301e30add05cd2cc490d9b99675e950d505

Attribute `convertToCivilian: true` on items.


Currently the only added functionality is mind-controlling a original-hostile into a temporary-neutral.
(other combinations are not supported until explicitly requested... this was a rather difficult change, bordering on out of scope, with potential side-effects which I haven't found yet... please test carefully)

Sample ruleset:

Code: [Select]
items:
  - type: STR_PSIAMP_NEUTRAL
    targetMatrix: 2            # only target hostiles
    convertToCivilian: true    # duh
    requires:
      - STR_PSI_AMP
    size: 0.1
    costSell: 194700
    weight: 10
    bigSprite: 33
    floorSprite: 32
    handSprite: 88
    hitSound: 36
    battleType: 9
    twoHanded: true
    invWidth: 1
    invHeight: 3
    tuUse: 25
    flatRate: true

When a conversion to neutral happen, the game doesn't display the classic "Mind Control Successful" message, but just a generic "Action Successful" message.
Modders should translate it to whatever makes sense for their mod.

Code: [Select]
  STR_MIND_CONTROL_SUCCESSFUL_ALT: "Action Successful"