Jump to content

Assaults not being bound by Move Limited weapons


Beagcom

Recommended Posts

I'm rebalancing weapons in my mod for XCOM and part of those rebalances are making Heavy weapons (LMG, Heavy Laser, Heavy Plasma) move-limited like the sniper rifle, a.k.a they have to be standing still that entire turn to fire.

 

Another part of the rebalance is that weapons are available to all classes. This means Assaults can take Machineguns.

 

In the battlescape, the machineguns are move limited as intended - except for Assaults! Assaults are not bound by the move limited restriction like the other classes. This happens whether they have used Run and Gun or not, it's seemingly unrelated to the ability.

 

As an example, here's how the LMG is set up. Suppression has been added as part of the weapon in ABILITIES, class restrictions have been opened up in Properties, and MoveLimited has been added in the same section.

 

 

Weapons=(iType=eItem_LMG,ABILITIES[0]=eAbility_ShotStandard,ABILITIES[1]=eAbility_Overwatch,ABILITIES[2]=eAbility_ShotSuppress,ABILITIES[3]=eAbility_Overwatch,ABILITIES[4]=eAbility_NONE,ABILITIES[5]=eAbility_NONE,Properties[0]=eWP_AnyClass,Properties[1]=eWP_Heavy,Properties[2]=eWP_MoveLimited,Properties[3]=eWP_None,Properties[4]=eWP_None,Properties[5]=eWP_None,iDamage=5,iEnvironmentDamage=60,iRange=27,iReactionRange=-1,iReactionAngle=200,iRadius=0,iCritical=0,iOffenseBonus=0,iSuppression=0,iSize=eItemSize_Large,iHPBonus=0,iWillBonus=0)

 

 

 

So, why don't Assaults pay attention to MoveLimited, and how can I fix things so they do?

Link to comment
Share on other sites

That's a really interesting find!

 

As best I can figure it out, which abilities are available to a unit is calculated in the function XGUnit.BuildAbilities. This goes through and sets the array of abilities stored with the unit based on current conditions.

 

Unfortunately, this function is implemented in native code (that is, written in the executable xcomgame.exe instead of in unreal script), which makes it much much harder to modify.

 

One option would be to modify the TacticalHUD to suppress the Fire ability from being displayed if the weapon has the eWP_MoveLimited property. This would prevent players from using LMG-class weapons after having moved, including assaults. I'm not sure how this would affect aliens with Heavy Plasmas, though. Muton Elites (for example) might still be able to move and shoot. This would require a significant hex re-write of the function, but is do-able.

 

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

 

If you think this would work for you, and are willing to do the testing for the aliens, I can likely make up some hex changes to the Tactical HUD code to suppress most actions for MoveLimited weapon in all cases.

 

It will likely be a couple of days, though...

Link to comment
Share on other sites

Well, the thing about that is I want Alien heavy weapons to still be able to fire and move - I just want the human variants to be move limited as part of the weapon balance now that all weapons are available between all classes, so that the rifle has its own advantages compared to the LMG.

 

I'm a fairly shoddy mind tech-wise, so hex editing and the like goes way over my head - if you think you could fix human Assaults from firing Heavy weapons on the move through that, though, it'd be a huge help! So far my modding experience is essentially just rewriting the ini and using meddler/modpatcher, nothing advanced.

 

And no rush - any help you can give is hugely appreciated. Thanks!

Edited by Beagcom
Link to comment
Share on other sites

Not a problem :)

 

I'm one of those odd people that like mucking around in the hex.

 

Besides, it's a good thing to ease into modding. I certainly didn't start off doing major hex re-writes!

 

I'll put the MoveLimiting thing on my to-do list.

 

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

 

As to the alien weapons ... some of the alien weapon characteristics are drawn from the special alien weapon line in the DGC.ini, and some are drawn from the base weapon. I think Yzaxtol had a post somewhere about what does what. If not you might post up a request asking him to elaborate.

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

 

 

The Properties[*]=eWP_MoveLimited may be the answer.

 

You can configure Properties on a per weapon basis , ie for the

iType=eItem_HeavyPlasma (human version)

but not for the

iType=eItem_HeavyPlasma_Muton (alien muton version, kinda explicit...)

 

 

I use ResourceHacker, works well and no hexa stuff required (http://www.angusj.com/resourcehacker/). Refer to this video for basic tutorial http://www.youtube.com/watch?v=JrwBgS32D6s

Edited by Morehei
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...