infinity496
Content Creator
- Joined
- Apr 26, 2012
Before you do anything, Backup any file you intend to alter!!
Disclaimer:
I will not be responsible if you corrupt your game files. In the worst case, you should be able to download a clean copy of any altered file via the support options on the TERA Launcher, but that will wipe out any modifications you may have made, including the use of kTERA files. If you change a file and break your game, it's not my fault. If you get banned from the game, it's not my fault. If <fill in the blank> happens, it's not my fault.
What you will need:
A hex editor and knowledge of how to use it.
I'm assuming you know which GPK file you want to modify. There is one for each race, gender, and armor class combination. This guide only covers swapping one set for another within the GPK for the same race/gender/armor class (0-18A).
There are 4 specific swaps that must be made.
The first swap is of the package identifiers located at the beginning of the file, e.g. "00" or "01A". Most of these are 2 characters in length.
The other 3 are the Body, Hand, and Leg mesh identifiers. They all end in "_Skel". For example, if you were swapping the light armor "00" for "04" for high elf females, you would need to change "HighElf_F_L00_Body_Skel" to "HighElf_F_L04_Body_Skel" and vice versa.
If the package identifiers being swapped are the same length, then that's all that needs to happen.
However, if the package identifiers are not the same length (e.g. swapping "0" for "00"), then there are 4 other changes to be made.
Preceding each of the above identifiers is a 4 byte hexadecimal number representing how long the identifier name is. This must match the length of the name following it (including an extra spot for the null byte terminator of the string). So referring to the previous example, the package identifier for "0" (which became "00") now needs to show "03 00 00 00" in front of it instead of "02 00 00 00". The extra "0" placed into the actual identifier must be inserted, while the dropped "0" from "00" must be deleted.
The same holds true for all the mesh names as well. For example, "HighElf_F_L00_Body_Skel" would become "HighElf_F_L0_Body_Skel" and vice versa. Again, you must insert and delete from the file where the names aren't the same length, so that the parsing of the file isn't screwed up.
Note: Each insert/delete will cause the file to grow/shrink by a byte, but you should end up with the same file size in the end.
If what you want to see is skin tight and you don't care how the other armor looks, skip this part.
If there is any part of either armor that sticks out and doesn't move directly with the body, you'll likely want to swap the animations related to that bone skeleton. First, you'll need to know what bone skeletons each uses and swap their names. You'll also need to swap the names of the animations within the animation files (*_Att<skeleton code>_ANI) as well as the animation file names themselves. Unfortunately, all the animations for a single bone type are defined in one file across all armor classes.
Attachment Animation Definition Order:
The first name looks like <race>_<gender>_Att<skeleton code>. I believe this is like the package name for the animations and must be swapped.
The next 8 are class specific animations, denoted by "_Class<number>"
The next 12 are shared animations, all possessing "_Share_" in their names.
The following are repeated (as a group) for H/L/R in that order:
Note: Be sure to follow the same idea from the previous section if the skeleton names are different lengths. Unfortunately, this means that you cannot swap everything. You'll have to "sacrifice" some of the animation names to get the ones you want to work. In my own case, I found some animation definitions for Att18 in the (original) Att16 GPK and added 8 characters to one of their names, and subtracted 8 characters from the Heavy Talking animations for (what was originally) AttC. The reason I say 8 is because I only swapped the 4 shared animations, the package definition, and the robe class animations (sorc/priest/mystic), which lead to a difference in 8 bytes.
As I said, it's messy. :p
In my first swap, I traded High Elf female R11 for R16, which meant that I broke R10 as it relied on the C animations, which I replaced with 16. I doubt any of the light or heavy armors use the C skeleton as it's meant for skirts.
Skeleton usage: (very incomplete)
High Elf female
0
00
A
B
C R10, R11
15 R15
16 R16
Because R10 also uses the C skeleton, it became broken when I switched skeletons on it.
Once the 4 aforementioned identifiers have been swapped and the length descriptors have been adjusted (if need be) to match the new identifier names, you should be able to start the game and see one armor in place of another.
Happy modding! :)
Disclaimer:
I will not be responsible if you corrupt your game files. In the worst case, you should be able to download a clean copy of any altered file via the support options on the TERA Launcher, but that will wipe out any modifications you may have made, including the use of kTERA files. If you change a file and break your game, it's not my fault. If you get banned from the game, it's not my fault. If <fill in the blank> happens, it's not my fault.
What you will need:
A hex editor and knowledge of how to use it.
I'm assuming you know which GPK file you want to modify. There is one for each race, gender, and armor class combination. This guide only covers swapping one set for another within the GPK for the same race/gender/armor class (0-18A).
There are 4 specific swaps that must be made.
The first swap is of the package identifiers located at the beginning of the file, e.g. "00" or "01A". Most of these are 2 characters in length.
The other 3 are the Body, Hand, and Leg mesh identifiers. They all end in "_Skel". For example, if you were swapping the light armor "00" for "04" for high elf females, you would need to change "HighElf_F_L00_Body_Skel" to "HighElf_F_L04_Body_Skel" and vice versa.
If the package identifiers being swapped are the same length, then that's all that needs to happen.
However, if the package identifiers are not the same length (e.g. swapping "0" for "00"), then there are 4 other changes to be made.
Preceding each of the above identifiers is a 4 byte hexadecimal number representing how long the identifier name is. This must match the length of the name following it (including an extra spot for the null byte terminator of the string). So referring to the previous example, the package identifier for "0" (which became "00") now needs to show "03 00 00 00" in front of it instead of "02 00 00 00". The extra "0" placed into the actual identifier must be inserted, while the dropped "0" from "00" must be deleted.
The same holds true for all the mesh names as well. For example, "HighElf_F_L00_Body_Skel" would become "HighElf_F_L0_Body_Skel" and vice versa. Again, you must insert and delete from the file where the names aren't the same length, so that the parsing of the file isn't screwed up.
Note: Each insert/delete will cause the file to grow/shrink by a byte, but you should end up with the same file size in the end.
If what you want to see is skin tight and you don't care how the other armor looks, skip this part.
If there is any part of either armor that sticks out and doesn't move directly with the body, you'll likely want to swap the animations related to that bone skeleton. First, you'll need to know what bone skeletons each uses and swap their names. You'll also need to swap the names of the animations within the animation files (*_Att<skeleton code>_ANI) as well as the animation file names themselves. Unfortunately, all the animations for a single bone type are defined in one file across all armor classes.
Attachment Animation Definition Order:
The first name looks like <race>_<gender>_Att<skeleton code>. I believe this is like the package name for the animations and must be swapped.
The next 8 are class specific animations, denoted by "_Class<number>"
1=Warrior (L)
2=Lancer (H)
3=Beserker (H)
4=Slayer (L)
5=Sorceror (R)
6=Archer (L)
7=Priest (R)
8=Mystic (R)
The next 12 are shared animations, all possessing "_Share_" in their names.
The following are repeated (as a group) for H/L/R in that order:
General shared animations (ends in "_Anim")
Idle animations (ends in "_Anim_Level3I")
Social animations (ends in "_Anim_Level3S")
Talking animations (ends in "_Anim_Level3T")
Note: Be sure to follow the same idea from the previous section if the skeleton names are different lengths. Unfortunately, this means that you cannot swap everything. You'll have to "sacrifice" some of the animation names to get the ones you want to work. In my own case, I found some animation definitions for Att18 in the (original) Att16 GPK and added 8 characters to one of their names, and subtracted 8 characters from the Heavy Talking animations for (what was originally) AttC. The reason I say 8 is because I only swapped the 4 shared animations, the package definition, and the robe class animations (sorc/priest/mystic), which lead to a difference in 8 bytes.
As I said, it's messy. :p
In my first swap, I traded High Elf female R11 for R16, which meant that I broke R10 as it relied on the C animations, which I replaced with 16. I doubt any of the light or heavy armors use the C skeleton as it's meant for skirts.
Skeleton usage: (very incomplete)
High Elf female
0
00
A
B
C R10, R11
15 R15
16 R16
Because R10 also uses the C skeleton, it became broken when I switched skeletons on it.
Once the 4 aforementioned identifiers have been swapped and the length descriptors have been adjusted (if need be) to match the new identifier names, you should be able to start the game and see one armor in place of another.
Happy modding! :)
Last edited by a moderator: