Skip to content

Commit

Permalink
Described offence/defence values (#45 #50 #52)
Browse files Browse the repository at this point in the history
  • Loading branch information
dertseha committed May 7, 2017
1 parent 310bef8 commit 1996017
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion fileFormat/PropertyFiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ At the end of the file is the table with common properties. For each object type
000E byte Vulnerabilities (matching Damage Type from [Generic Weapon Info](../levelObjects/GenericWeaponInfo.md))
000F byte Special vulnerabilities (matching Special Damage Type from [Generic Weapon Info](../levelObjects/GenericWeaponInfo.md))
0010 [2]byte Unused
0012 byte Unknown
0012 byte Defence value
0013 byte Unknown - found to be 0x00, 0x03 and 0x04
0014 int16 Flags
0016 int16 3D model index, based on chunk 0x08FC
Expand All @@ -89,6 +89,9 @@ At the end of the file is the table with common properties. For each object type
001A byte Unknown


The ```defence value``` is compared to the ```offence value``` of a weapon or projectile. Higher defence values will decrease the damage, higher offence values will increase the damage.
> It is not clear how much is added/removed. First tests indicated it's not the difference between the two values.
> Unknown field 0x0000 is considered to be mass, yet changing its values did not show any effect.
> ```3D model index``` is also set to some values for render type ```0x02```, effect unknown.
Expand Down
3 changes: 2 additions & 1 deletion levelObjects/GenericWeaponInfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ This structure is reused for various offensive items.
**Generic Weapon Info** (8 bytes)

0000 sint16 Damage
0002 byte Unknown
0002 byte Offence value
0003 byte Damage type
0004 byte Special damage type
0005 [2]byte Unused
0007 uint8 Armour penetration

The ```offence value``` is compared to the defence value of the target object. See [common properties](../fileFormat/PropertyFiles.md#common-table) for details.

If ```Armour penetration``` is equal or higher than the ```Armour``` value of the object being hit, the full ```Damage``` is applied. Otherwise, the difference is subtracted from ```Damage```. If the resulting value reaches 0 or lower, "No Damage" is displayed.

Expand Down

0 comments on commit 1996017

Please sign in to comment.