OpenXcom Forum

Modding => Help => Topic started by: wcho035 on November 29, 2019, 09:56:50 am

Title: Quick question, damage morale.
Post by: wcho035 on November 29, 2019, 09:56:50 am
Hi, I am looking for a way to damage or lower an enemy's morale. Costuse only works on soldier that fired the weapon, not the target. Is there away?
Title: Re: Quick question, damage morale.
Post by: Meridian on November 29, 2019, 10:07:07 am
ToMorale

https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)#Item_Damage_Types (https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)#Item_Damage_Types)
Title: Re: Quick question, damage morale.
Post by: wcho035 on November 29, 2019, 08:05:18 pm
Thank you for the answer for the inventory question. For morale, I am experiencing no effect when implementing the code.

Here is the weapon.

  - type: STR_MORALE_GRENADE
    size: 0.2
    costBuy: 950000
    costSell: 50000
    weight: 9
    bigSprite: 1851
    floorSprite: 680
    handSprite: 1145
    power: 5
    damageType: 3
    battleType: 4
    blastRadius: 10
    hitAnimation: 9
    damageAlter:
      ToMorale: 100.0
Title: Re: Quick question, damage morale.
Post by: ohartenstein23 on November 29, 2019, 08:20:06 pm
Your grenade isn't penetrating armor. Either increase power and use the rest of damageAlter to get the effect you want or use ArmorEffectiveness less than 1 to make it 'pierce' armor in the damageAlter.
Title: Re: Quick question, damage morale.
Post by: wcho035 on November 29, 2019, 09:17:23 pm
Thank you guys, after upping the damage, it worked. Lastly can ArmorEffectiveness have negative values?

Title: Re: Quick question, damage morale.
Post by: Meridian on November 30, 2019, 09:13:16 am
Why would you need armor to be less than 0% effective?
And what would it even mean?
Title: Re: Quick question, damage morale.
Post by: wcho035 on November 30, 2019, 09:46:51 am
With testing, I found with zero value for armoureffectiveness and low power damage, some of the stats change has no effect with script hooks. I am just wondering what -1 would do, out of curiosity. If there is always room to experiment, as I am not 100% sure of this parameter. Would this transfer to health damage completely. I have completed my testing with this feature. Thanks again for the help Meridian.
Title: Re: Quick question, damage morale.
Post by: Meridian on November 30, 2019, 09:54:57 am
Best case it will do nothing, worst case it will crash.
Title: Re: Quick question, damage morale.
Post by: wcho035 on November 30, 2019, 09:56:36 am
Understood, thank you.