Jump to content

Recommended Posts

Posted (edited)

1. So, I am browsing Assembly-CSharp.dll with ILSpy and looking at AttackData.cs. It contains obviously obsolete data, like:

 

public int Single1HWeapNoShieldAccuracyBonus = 15;

public float MinDamagePercent = 40f;

public float MinCrushingDamagePercent = 50f;

 

But at the same time, these values do not appear to be overwritten nowhere in the project. Looking by values is not that fruitful either.

So, where for instance is saved/hardcoded the bonus for one-handed attack?

 

2. Checking games assets, I often stumble upon some talents modifying a stat and referencing it by id. (e.g: int AffectsStat = 122;). Where is located the id <-> stats hashmap/stringtable?

 

3. Are base attack/recovery/reload durations saved anywhere?

Edited by MaxQuest
  • 2 weeks later...
Posted

1. These values are overwritten by game assets. Look for an asset for the one-handed bonus.

 

2. This is an enum, I believe it is in StatusEffect or StatusEffectParams. They correspond to a stat in CharacterStats.

 

3. These are probably saved in the asset files for each weapon, including fists. Or try checking the AttackBase class.

  • Like 1
Posted (edited)

Ha! Answers! :)

 

1. Yeah, I have looked for those. But the only assets having something like "one-handed" in their filename are those related to one-handed fighting. From their data it is seen that they add 30% graze-to-hit conversion. It's not it.

 

2. Thanks! So it is the ModifiedStat enum from StatusEffect class. 

Quickly checked monobehaviours of "one-handed fighting", "two-weapon fighting", "vielo-vidorio" and "confident aim":

- 200: BonusGrazeToHitRatioMeleeOneHand

- 193: DualWieldAttackSpeedPercent

- 109: BonusDamageProc

- 185: Accuracy

- 11: AttackSpeed

- 102: BonusGrazeToHitPercent (value: 0.2)

- 222: WeapMinDamageMult (value: 1.2)

Everything adds up.

 

3. Reloading durations are indeed saved in asset files. But (except for blunderbuss) are quite inaccurate in comparison to empirical results.

- Arquebus: 6.800000 | in practice: 6.30

- Arbalest: 6.000000 | in practice: 5.56

- Blunderbuss: 5.000000 | in practice: 5.00

 

As for attack and recovery durations: the later is not specified at all, while the first one is mentioned only as UiAttackSpeed property ranging from 1 to 5 and referencing the enum from AttackBase class: UIAttackSpeedType  {Undefined, Fast, Average, Slow, VerySlow,  ExtremelySlow  }

But than again, this is bs, because Arquebus, Arbalest and War Bow, although do 'belong' to different SpeedTypes, in practice have pretty much the same (i.e. very, very close) values for attack and recovery durations.

 

Empirical Data: link

Asset Data:

 

 

 

Arquebus:
0 int AttackSpeed = 1
0 int UiAttackSpeed = 5
0 float SpeedFactor = 1.000000
0 float AttackHitTime = 0.700000
0 float throwSpeed = 90.000000
0 float ImpactDelay = 0.000000
0 float ReloadTime = 6.800000
0 int ReloadAnim = 2
 
Arbalest:
0 int AttackSpeed = 1
0 int UiAttackSpeed = 4
0 float SpeedFactor = 1.000000
0 float AttackHitTime = 0.400000
0 float throwSpeed = 40.000000
0 float ImpactDelay = 0.000000
0 float ReloadTime = 6.000000
0 int ReloadAnim = 4
 
Blunderbuss:
0 int AttackSpeed = 1
0 int UiAttackSpeed = 4
0 float SpeedFactor = 1.000000
0 float AttackHitTime = 0.400000
0 float throwSpeed = 80.000000
0 float ImpactDelay = 0.000000
0 float ReloadTime = 5.000000
0 int ReloadAnim = 1
 
War Bow:
0 int AttackSpeed = 1
0 int UiAttackSpeed = 2
0 float SpeedFactor = 1.000000
0 float AttackHitTime = 0.400000
0 float throwSpeed = 40.000000
0 float ImpactDelay = 0.000000
 
Hunting Bow:
0 int AttackSpeed = 1
0 int UiAttackSpeed = 1
0 float SpeedFactor = 1.000000
0 float AttackHitTime = 0.400000
0 float throwSpeed = 40.000000
0 float ImpactDelay = 0.000000
 
Dagger:
0 int AttackSpeed = 1
0 int UiAttackSpeed = 1
0 float SpeedFactor = 1.000000
0 float AttackHitTime = 0.400000
 

 

 

So the 1st and 3rd questions are still open.

Edited by MaxQuest
Posted

3. Probably it's the animations then. Good luck changing those.

 

Try opening the Gunner talent and see what stat it modifies. Find the corresponding stat in CharacterStats, then look where it's used. ModifiedStat won't show any usages, probably because it's an enum, so you have to look at CharacterStats.

  • Like 1
  • 2 weeks later...
Posted

 

 

1. These values are overwritten by game assets. Look for an asset for the one-handed bonus.

 

 

 

1. Yeah, I have looked for those. But the only assets having something like "one-handed" in their filename are those related to one-handed fighting. From their data it is seen that they add 30% graze-to-hit conversion. It's not it.

 

AttackData is in the "Global" asset bundle (along with a number of other components that hold similar global data.

  • Like 1
Posted (edited)

AttackData is in the "Global" asset bundle (along with a number of other components that hold similar global data.

I am probably blind... :(

I have inspected every single asset from the /assetbundles/prefabs/objectbundle/global.unity3d bundle.

Have found weapon clips/audiobanks, textures, world time, etc; but couldn't find any AttackData like base attack time, base recovery time, the overridden values for Single1HWeapNoShieldAccuracyBonus and alike...

Edited by MaxQuest
Posted

My bad, it's actually in "ingameglobal".  Forgot we had two of those.  I don't know what you're using to get at the data, but I can see it in ingameglobal in a hex editor.

  • Like 1
Posted (edited)

^ Holly Molly!

ingameglobal.unity3d weights 80MB. There are hundreds of mono behaviors...

 

- update -

 

Luckily I've stumbled upon AttackData pretty fast.

To answer your question: I use AssetBundleExtractor. It looks like this.

 

The last things to figure out:

- Why does crossbow reloading speed both in it's asset and in ingameglobal is set to 5.0. While frapsing does consistently show that it has 100 frames duration (i.e. 3.33s)

- The mini idle delay (of ~0.2s) preceding each attack animation. Where does it come form?

Edited by MaxQuest

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...