Jump to content

weapon animations


phordicus

Recommended Posts

clipped this from bgtweaks. i've looked and studied and can't find the highlighted info. i want to add other weapon types, specifically 2H & long & bastard swords and katanas. thanks in advance.

 

COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~ // animation adjustments

PATCH_IF (SOURCE_SIZE > 0x71) THEN BEGIN // protects against invalid files

READ_BYTE 0x18 "flags"

READ_ASCII 0x22 "anim" (2)

READ_BYTE 0x31 "prof"

READ_LONG 0x64 "abil_off"

READ_SHORT 0x68 "abil_num"

PATCH_IF ((("%prof%" = 100) OR ("%prof%" = 101)) AND ("%anim%" STRING_COMPARE_CASE "ms" = 0)) BEGIN

WRITE_ASCII 0x22 "MC"

END

PATCH_IF ((("%flags%" BAND 0b00000010) = 0b00000000) AND // one-handed...

(("%anim%" STRING_COMPARE_CASE "cl" = 0) OR // club

("%anim%" STRING_COMPARE_CASE "mc" = 0) OR // mace

("%anim%" STRING_COMPARE_CASE "ms" = 0))) BEGIN // or morningstar

FOR (index = 0 ; index < abil_num ; index = index + 1) BEGIN

READ_BYTE ("%abil_off%" + ("%index%" * 0x38)) "type"

PATCH_IF ("%type%" = 1) BEGIN

WRITE_SHORT ("%abil_off%" + 0x2C + ("%index%" * 0x38)) 50 // Overhead

WRITE_SHORT ("%abil_off%" + 0x2E + ("%index%" * 0x38)) 50 // Backhand

WRITE_SHORT ("%abil_off%" + 0x30 + ("%index%" * 0x38)) 0 // Thrusting

END

END

END ELSE

Link to comment

Info link... so long swords and katanas are easy.

 

That's chancing this:

("%anim%" STRING_COMPARE_CASE "mc" = 0) OR // mace
("%anim%" STRING_COMPARE_CASE "ms" = 0))) BEGIN // or morningstar

To be this:

("%anim%" STRING_COMPARE_CASE "mc" = 0) OR // mace
("%anim%" STRING_COMPARE_CASE "s1" = 0) OR // 1 handed long sword
("%anim%" STRING_COMPARE_CASE "s3" = 0) OR // katana
("%anim%" STRING_COMPARE_CASE "ms" = 0))) BEGIN // or morningstar

 

With the two handed part, the whole thing should look like this:

PATCH_IF (((("%flags%" BAND 0b00000010) = 0b00000000) AND // one-handed...
("%anim%" STRING_COMPARE_CASE "mc" = 0) OR // mace
("%anim%" STRING_COMPARE_CASE "s1" = 0) OR // long sword
("%anim%" STRING_COMPARE_CASE "s3" = 0) OR // katana
("%anim%" STRING_COMPARE_CASE "ms" = 0))) OR // or morningstar
((("%flags%" BAND 0b00000010) = 0b00000010) AND // two-handed...
("%anim%" STRING_COMPARE_CASE "s2" = 0))))) BEGIN //th-sword

But ...

Link to comment

Keep in mind that some animations are shared between weapons; S1 is used by long swords, bastard swords, and ninja-tos. You'll have to check additional characteristics (like proficiency type) if you want to differentiate between them. In addition, you may need to account for the different animations used by flaming swords.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...