Jump to content
⚠ Known Issue: Media on User Profiles ×

More Notes on Custom Soldier Skill/Perk Trees


graaa

Recommended Posts

I didn't see this referenced anywhere else, so thought I would drop it into this thread.

 

The abilities "Bullet Swarm" and "Double Tap" are currently hard-coded to their respective classes of "Heavy" and "Sniper"

 

This is done in XGAbility().ApplyCost(), via the code:

 

 

if(m_kUnit.GetSoldierClass() == 2 && (m_kUnit.GetCharacter().HasUpgrade(26)) && (GetType() == 7) && (XGAbility_Targeted(self).m_kWeapon != none) && (XGAbility_Targeted(self).m_kWeapon.HasProperty(8 )))
{
++ m_kUnit.m_iMovesActionsPerformed;
}

for Bullet Swarm / Heavy.

This requires that the unit:

a) be of class eSC_HeavyWeapons=2

b) have the upgrade ePerk_BulletSwarm=26

c) be using the ability eAbility_ShotStandard=7

d) be using a weapon with property eWP_Heavy=8.

 

To open this up, would need to change the conditional to something like:

if(m_kUnit.GetCharacter().HasUpgrade(26))

 

This would allow any class with any weapon to use any action and only use a move action (i.e. can take another action)

 

Making it a bit more restrictive:

if(m_kUnit.GetCharacter().HasUpgrade(26) && GetType() == 7)

 

This would allow any class with any weapon to treat a standard shot as a move action, but any other action type would end the turn.

 

-----------------------------------------------------------

On the sniper side,

 

if(m_kUnit.GetSoldierClass() == 1 && (m_kUnit.m_iMovesActionsPerformed == 0) && (m_kUnit.GetCharacter().HasUpgrade(13)) && (!XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.m_kAbilities.IsAbilityCoolingDown(m_kUnit, 60)) && (XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.m_kAbilities.IsDoubleTapAllowedAbility(byte(GetType()))))
{
++ m_kUnit.m_iMovesActionsPerformed;
m_kUnit.m_aAbilitiesOnCooldown[m_kUnit.m_iNumAbilitiesOnCooldown].iCooldown = XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.3;
m_kUnit.m_aAbilitiesOnCooldown[m_kUnit.m_iNumAbilitiesOnCooldown].iType = 60;
++ m_kUnit.m_iNumAbilitiesOnCooldown;
m_kUnit.m_bDoubleTapActivated = true;
m_kUnit.m_bBuildAbilityDataDirty = true;
}
for Touble Tap / Sniper.
This requires that the unit
a) be of class ESC_Sniper=1
b) has not moved this turn
c) have the upgrade ePerk_DoubleTap=13
d) the ability is not currently on cooldown
e) other double tap conditions in IsDoubleTapAllowedAbility are met (this is a native function that presumably maps which abilities are allowed to be used with Double Tap -- e.g. Disabling Shot, Standard Shot, HeadShot)
To open this up to other classes, just need to remove the conditional that m_kUnit.GetSoldierClass() == 1.
This is also where the cooldown is set. Setting it to 3 effectively makes it 2 turns (cooldowns deprecate at beginning and end of turn). To make it 3 effective turns, set the cooldown to 5. Can also completely remove the cooldown code, which would allow the unit to Double Tap every turn.
-------------------------------------------------------
As a side note, this is where I can directly "hack in" an ability like Bullet Swarm for SHIVs. It could also be based on having a particular item equipped in the "pistol" slot, which is one more step toward more customization for SHIVs.
This would look like:
if(m_kUnit.GetType == 3 && m_kUnit.GetInventory().GetNumItems(###) > 0)
{
++ m_kUnit.m_iMovesActionsPerformed;
} else ...
Edited by Amineri
Link to comment
Share on other sites

  • 4 months later...
  • Replies 62
  • Created
  • Last Reply

Top Posters In This Topic

This seems like the place to search for a little feedback so here's my perk modifications for the Long War mod. They're definitely past the first draft, but extensive playtesting takes time; it's a long war.

 

The primary driver in what I'm sure you'll notice is a heavily front-loaded perk setup is allowing soldiers to specialize in a tactical role as soon as possible (Sg. or Lt. latest) and then the later levels just make them better soldiers; icing on the cake. I'm less concerned with balance and keeping perks unique to a specific class. I'm more concerned with differentiating the subclasses (there are 8 in long war) and their archetypes (2 per class; each is a build focused on a different tactical strength/approach). If you are going to comment on balance you should have some experience with Long War which I'd say is recognized as markedly increasing the difficulty of the game.

 

If you're unfamiliar with the Long War subclasses... When a soldier selects their Squaddie perk (1st) their choice determines their subclass (ie Lightning Reflexes or Squadsight will determine Scout or Sniper). Each subclass has 2 common perk columns it shares with it's partner subclass and a single column that is unique to that subclass. So there's 2 Sniper/Scout shared columns and a single unique Sniper column and a single unique Scout column.

 

https://docs.google.com/spreadsheet/ccc?key=0AgzXZjFcaOLudC00UUExWlVIM2pMa0lmZk5VT0JIY3c#gid=6

Link to comment
Share on other sites

Dang. This looks interesting, but I'm away from my system at the moment and thus my notes on my own perks list, which predates the LW Classes. The overall approach looks good, and there will always be arguments over specific choices. But it takes time to analyze, so I want to encourage you not to be discouraged if it takes a while for comments.

 

Just an FYL The 'Perks table for 1.1' is displaying everything as 'lined out' instead of underscored in FireFox. Just a display quirk, but suggest you go easy on special text modes.

 

-Dubious-

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...