Jump to content

Fleshing out my extended play mod


tsanford01

Recommended Posts

I was only playing with ranges not set at 27 (shotty, grenades) and it seemed to work. Though it indeed didn't with 27 ones, but I was only trying to extend the range, and assumed sight put a cap on it.

 

So it's a coding oversight - should it be possible to fix it once and for all then, or are there some issues with that?

Haven't tested the idea much. So far:

  • Standard shot - BuildAbility(7, 2, 2, -1, -20, 1, 1, 46, 8) to (7,2,1...) + Weapons=(iType=eItem_PlasmaPistol,...,iRange=2,...) worked. Had to stand next to an alien to perform the shot. Everyone else was out of range, but saw targeting shields.
  • Alien Grenade - increased iRange to 100, could throw it very far, but there was no area of effect targeting sphere.
  • Rocket launcher - BuildAbility(25, 8, 2, 2, -20, 1, 12, 1, 4, 45, 3, 7, 9) to (25,8,1...) + Weapons=(iType=eItem_RocketLauncher,...,iRange=100,...) no effect. Tried also unlimited range (25,8,1...) and squad sight (25,8,3...) no effect. It has to be elsewhere, not just in XGAbilityTree.

Haven't tried extending weapon range over 27, when there's sight limitation. Could work with squad sight in ability tree.

 

Also it is strange shotgun works. Should use the same formula. But when I tried lowering pistol's range without editing the tree, it failed.

Link to comment
Share on other sites

Ok possible work around on the pistol issue..If i decrease the penalty for long distance shots and reduce the aim of the pistol while increasing its damage one woould be tempted to switch weapons to plug that ugly alien correct? This could all be done with the ini tweaks i believe.

 

sorry getting tired...the idea is make sniper and assault ore effective at range, reduce pistol will/offense to nerf its range but give it good damage.

 

__tested failed horribly even with -20 offense pistol out damages assault rifle__ Oh well worth try

Edited by tsanford01
Link to comment
Share on other sites

Haven't tested the idea much. So far:

[*]Standard shot - BuildAbility(7, 2, 2, -1, -20, 1, 1, 46, 8) to (7,2,1...) + Weapons=(iType=eItem_PlasmaPistol,...,iRange=2,...) worked.

So it properly reads value from the ini in the exe after that tweak, correct?

 

Unfortunate that the rocket launcher has a problem.

 

Haven't tried extending weapon range over 27, when there's sight limitation. Could work with squad sight in ability tree.

I was mostly thinking along the lines of using conventional and particularly laser rifles as a sniper weapon. That requires more range than 27, less than 100.

Link to comment
Share on other sites

Ok possible work around on the pistol issue..If i decrease the penalty for long distance shots and reduce the aim of the pistol while increasing its damage one woould be tempted to switch weapons to plug that ugly alien correct? This could all be done with the ini tweaks i believe.

Well, pistol's range can be decreased in ini after upk surgery in XComGame.XGAbility. How do you decrease the penalty for long distance shots?

 

So it properly reads value from the ini in the exe after that tweak, correct?

Correct.

 

I was mostly thinking along the lines of using conventional and particularly laser rifles as a sniper weapon. That requires more range than 27, less than 100.

Even with increased weapon's range, a soldier must see a target to shoot. And there's 27 limit. We can't increase sight range, but we can experiment with squad sight in shot abilities. If I recall right, a soldier not seeing a target could shoot after heavy used holo targeting.

 

Edit: Would be more purpose than coding oversight... shooting the target in sight.

Edited by Drakous79
Link to comment
Share on other sites

Kudos given to the both of you for your help in this, very kind. You are correct in wondering how to limit close range rifle fire, what i need now is the code that makes the sniper rifle use the close-aim penalty in the ini to add to the assault rifle. i plan to leave the shotgun alone it would be good as is mid to short range with high crit...Thanks again

 

Hopefully soon i will be satisfied and release all of this for you guys to play and provide feedback.

Link to comment
Share on other sites

There's BuildAbility function within XGAbilityTree class in XComGame.upk which is defined:

BuildAbility(eType | eTarget | iRange | iDuration | iReactionCost | opt eEffect1-3 | opt eProperty1-8 | eDisplayProperty1-3 | iCooldown | int iCharges)

ShotStandard 7 is BuildAbility( 7, 2, 2, -1, -20, 1, 1, 46, 8);

Search for 24 07 24 02
2C 02
1D FF FF FF FF 1D EC FF FF FF 24 01 4A 4A 24 01 24 2E 4A 4A 4A 4A 4A 4A 24 08 4A 4A 4A 4A.

Going from left to right:

  • 24 07 = eAbility_ShotStandard
  • 24 02 = eTarget_SingleEnemy
  • 2C 02 = eRange_Sight ... changing this to 01 makes it eRange_Weapon
  • 1D FF FF FF FF is iDuration = -1
  • 1D EC FF FF FF is iReactionCost = -20
  • 24 01 = eEffect_Damage
  • 4A 4A stands for 2 empty optional effects
  • 24 01 = eProp_FireWeapon
  • 24 2E = eProp_CanFireTwice
  • 4A 4A 4A 4A 4A 4A stands for 6 empty optional properties
  • 24 08 = eDisplayProp_TopDownCamera
  • 4A 4A stands for 2 optional display properties
  • 4A stands for empty iCooldown
  • 4A stands for empty iCharges

Checking Table From UE Explorer helps to clarify some hex values:

  • 24 is ByteConst or FastTrace - not sure about this one if someone can clarify it please
  • 2C is IntConstByte - next hex value is an integer constant
  • 4A is EmptyParmValue - Empty Parameter Value
  • Also there can be 25 - IntZero

Ability names, effects, properties, targets and more can be found inside XGTacticalGameCoreData class, where value is row index (where None is 0) converted from decimal to hexadecimal.

 

Had no luck with rifles close range penalty. Can't find the code working with SNIPER_AIM_FALL.

Edited by Drakous79
Link to comment
Share on other sites

Now that I got the game reading ranges from the ini..what do the numbers represent tiles?

Aye, should be tiles including those under soldiers and targets. Had to set iRange 2 to be able to shoot a target next to my soldier.

Edited by Drakous79
Link to comment
Share on other sites

  • Recently Browsing   0 members

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