Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Parting Strike
It has two parts:
1st Part: Adds +10% Hit chance to a specific weapon slot:
It is a simple effect that is required to be attached to a weapon slot.
2nd Part: Adds the ability to shred armor and +1 damage to any melee abilities.
2nd part is controlled by X2Effect_WardenBladeShred.uc in Mods/WardenClass/Src/WardenClass/Classes
You can add the second part into any ability you wish, however the player must've purchased "Parting Strike" for it to alter the damage and shred numbers. You can get rid of this requirement by deleting:
SourceUnit.HasSoldierAbility('WardenBladeShredder')
from line 32 so it looks like this:
if ((SourceWeapon != none) && (SourceUnit != none))
-
Then you'll have to go into your specific ability you want to utilize this damage effect in. Let's say the template is "BashHeadIn"
it'll look something like this:
local X2Effect_ApplyWeaponDamage DamageEffect;
local X2AbilityCooldown Cooldown;
local X2Effect_RemoveEffects RemoveEffects;
local array<name> SkipExclusions;
`CREATE_X2ABILITY_TEMPLATE(Template, 'BashHeadIn')
-You simply delete the line which says:
local X2Effect_ApplyWeaponDamage DamageEffect;
-and replace it with:
local X2Effect_WardenBladeShred DamageEffect;
-Keep in mind DamageEffect might be named something like WeaponDamage etc. just make sure it's the same.
-
Now that specific ability uses the damage table provided by X2Effect_WardenBladeShred.
You can edit the damage table by going into XcomGameData_SoldierSkills.ini in my mod file and altering the lines below
[WardenClass.X2Effect_WardenBladeShred]
You can set up how much armor you want to shred or how much bonus damage you want to do,
In it there'll be a list of abilities you can unlock at every rank, it'll look like:
; squaddie
+SoldierRanks=(AbilitySlots=((AbilityType=(AbilityName="WardenDecider")), ... etc
for example there is Warden's Advance right below that line:
(AbilityType=(AbilityName="WardensAdvance", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon)),
change that SecondaryWeapon into PrimaryWeapon so it'll look like:
(AbilityType=(AbilityName="WardensAdvance", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon)),
However I cannot guarantee everything will work as there are some effects which apply to secondary weapon as well, like Parting Strike, which is referred as "WardenBladeShredder" in there. you'd have to change those too, but then they won't apply to secondary..
You can play around with that file you might find something that works for ya.
In the mean time as I was testing the fixes I've done for the update I found out you were right, Foresight doesn't like taking values from the .ini for the Damage Threshold as soon as I get that fixed I'm gonna push the update so you want to duplicate and save the files you've changed into some other folder. Because when I push the update I think it will reset your config and src files.
steamapps\workshop\content\268500\1537495115\Config
There'll be a config file named
XComGameData_WardenAnim.ini
You'll see the way animations are applied in there, you can now add your own animations following that example. Obviously do not forget to add the animations in the ability template as well.
So I've created the weapon damage effect in X2Effect_WardenBladeShred.uc.. And every melee ability this class uses that effect when its activated instead of the base game formula. (I believe the base game version is X2Effect_ApplyWeaponDamage)
For example the basic melee attack Warden's Advance:
in X2Ability_WardenAbilitySet take a look at "static function WardensAdvance()"
you'll see it uses my own script instead of the vanilla:
DamageEffect = new class'X2Effect_WardenBladeShred';
Template.AddTargetEffect(DamageEffect);
So then lets take a look at WardenBladeShred.uc:
you'll see it uses the function WeaponDamageValue GetBonusEffectDamageValue, so all that's left is to understand how to use that function. There are a few comments in my code there which explains some of the choices I made but essentially what I've done is this:
1. Made sure the player has the passive WardenBladeShredder
2. Made sure the soldier has a melee weapon eqipped
3. Made sure the activated ability is melee ranged.
And only then it will apply my own specific shred formula.
----
How I've defined the shred value in that function:
Basic Example:
local WeaponDamageValue RedrummDamage;
RedrummDamage.Shred += 2
so it adds 2 Shred into any ability that uses this function to calculate damage. Obviously its a bit more complicated in my code but there should be comments explaining why I did what I did to some degree.
Hopefully this helps.
Short version is I've made my melee abilities use the Shredding not the weapon. That way if a player has NOT picked the necessary upgrade the weapon would keep performing normally like the base game.
Long version:
yeah I've made a passive ability "WardenBladeShredder" (Parting Strike). That ability only adds the +aim modifier to your melee weapon and the sole other reason for it to exist is so I can check if the player has picked it to apply the melee shred.
That way if a player has NOT picked WardenBladeShredder (Parting Strike) ability when they level up my script in X2Effect_wardenBladeShred.uc does not apply the melee shred.
You can see how I've applied that in the WardenBladeShred.uc
if ((SourceWeapon != none) && (SourceUnit != none) && !SourceUnit.HasSoldierAbility('WardenBladeShredder'))
so three conditions there, pretty self explanatory. Make sure there soldier has a weapon, make sure there is a soldier, make sure the soldier has the WardenBladeShredder (parting strike). If any of these conditions are not met the Shred value returns 0. If they are all met it takes the shred values from the config files and applies it on top of the damage.