Guide: How to swap armors in TERA (1 Viewer)

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>"
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! :)

ibmyno3bwaxabg.jpg ibl0INoyuq5BLc.jpg
 
Last edited by a moderator:

YoungKai

Content Creator
Joined
Apr 30, 2012
Wow! That's a breakthrough! Thank you for the detailed guide!
Have a question though, if i wish to use H0 instead of H00 (actual undie as default armor), I'd edit 00 to be 0, but why also need to edit "vice versa" (0 to 00)? Is that just to make up the missing bytes that were deleted? If yes, i can potentially do a 01 to 01A instead, and modding all armors to appears as H0 would be out of questions using this method then?
 

trumpdog

Vivacious Visitor
Joined
Apr 20, 2012
Can you post a screen of what you mean by locate package identifier? thats where im getting lost, i can locate the armor skel fine.
What hex edit should i be using....im using XVI32 hex editor
 

patches13

Avid Affiliate
Joined
Apr 25, 2012
Thank you so much for posting this guide. I do have 2 questions for you if you don't mind answering them, first do you plan on releasing any "mod's" (like all starter gear to underwear for all races), and second will this be compatible with the KTera files or am I going into the KTera files that Naduron has (I never adjust anything in my files for Naduron's KTera versions I just paste those into my CH file and pull them out when it's update time).
 

suxxorz777

Potential Patron
Joined
May 4, 2012
Well..Ive been able to get the armor swap of the same identifier size to work no problem (i.e. 12 for 00 and vice versa). Thank you very much for the guide! Unfortunately, I cannot find the "vice versa" for the 0 armor in order to keep the file size the same. I did end up adding enough bytes to keep the client stable but...I keep getting a floating head instead of bikini lol. Am I missing something? O.o
 

eyenight

Content Creator
Joined
Apr 27, 2012
Ahaha.. Thanks.. Finally got it for my human sorcerer..
 
Last edited by a moderator:

suxxorz777

Potential Patron
Joined
May 4, 2012
Ahaha.. Thanks.. Finally got it for my human sorcerer..

Did you have to use a kTera version of the file set Eyenight or is that modded from the current American client files? I swear I can't seem to make those stupid bikini's show up :eek:. All other armor swaps are fine but that stupid 0 won't cooperate =/
 

eyenight

Content Creator
Joined
Apr 27, 2012
Did you have to use a kTera version of the file set Eyenight or is that modded from the current American client files? I swear I can't seem to make those stupid bikini's show up :eek:. All other armor swaps are fine but that stupid 0 won't cooperate =/

I did use the KTERA files, but I think the western TERA files will work too since it has the same mesh for _skel files.
 

trumpdog

Vivacious Visitor
Joined
Apr 20, 2012
now would the same method work from one gpk to another?
Also, there seems to be animation issues with certain armors, for example. i swapped a low lvl robe for the catsuit with the tail and the tail and robe sleeves float. Any known work arounds for that or do you have to use an armor with the same amount of bones as the one your replacing?
 
Last edited by a moderator:

infinity496

Content Creator
Joined
Apr 26, 2012
now would the same method work from one gpk to another?

I've not tried it but... conceivably, if you made swapped the <race>_<gender>_<armor class> parts of every mesh, you could get sorcerers wearing heavy armor or elin with baraka bodies. Feel free to experiment...just be sure to backup your files before you do. It's really easy to make a single (or more) mistake(s).

As far as mixing content of GPKs... not until we have a means of repacking the content. The identifiers this guide refers to link to parts of the file that is totally binary data. It might be possible to copy and paste chunks of the data to swap one model for another, one texture for another, but I'm not sure yet of the compression scheme. From my work in another Unreal 3 game, it does not seem that the texture parts are any kind of DDS file uncompressed.

is there a way to make it readable for nonmodder?^^

There is, but I'm too lazy (to help lazy people). No really, I'd rather see people passionate enough about the mod to learn more about what is happening. I deliberately wrote the guide to force people to understand more than the average lurker. There really isn't a whole lot to learn to be able to do this, and I've applied the same principle to modding Blade & Soul (my first run-in with the Unreal 3 engine).

do you plan on releasing any "mod's" (like all starter gear to underwear for all races)?

No, for the same reason stated above. If someone else wishes to upload >2GB of modified GPK files, I can't stop them, but I'm not going to do it. It'd be much easier (and better for the community, IMO) for people to learn how to perform the mod themselves.

To answer your second question, and add to what eyenight said...

Any version of the GPK files should work, and I've used the method on the latest official NA ones as well as kTERA OB files.

Well..Ive been able to get the armor swap of the same identifier size to work no problem (i.e. 12 for 00 and vice versa). Thank you very much for the guide! Unfortunately, I cannot find the "vice versa" for the 0 armor in order to keep the file size the same. I did end up adding enough bytes to keep the client stable but...I keep getting a floating head instead of bikini lol. Am I missing something? O.o

If the game doesn't crash when trying to load an armor from the GPK, then it likely means that while your sizes are correct, the mesh names don't match up with the package identifiers pointing to them. "0" is the only package with a size of 1. So swapping it with anything means that you need to insert bytes into the file. When you insert the file should grow and everything shifts. Then when turning the other package into the new "0" everything should shift back (because now you're deleting bytes) and the rest of the file should be as it was (same memory addresses).
 

trumpdog

Vivacious Visitor
Joined
Apr 20, 2012
hmm...cant get the bikini working for anything, i insert the 0 to make 00 and delete 0 from the default, change the 02 00 00 00 to
03 00 00 00 and vice versa.
Insert the extra 0 onto the bikini and delete one from the default and i crash to desktop when i launch the game.
 

eyenight

Content Creator
Joined
Apr 27, 2012
I think there is a bug for humans leather armor, in character creation it still showed the original mesh. But it works after I entered the game, so no problem.


hmm...cant get the bikini working for anything, i insert the 0 to make 00 and delete 0 from the default, change the 02 00 00 00 to
03 00 00 00 and vice versa.
Insert the extra 0 onto the bikini and delete one from the default and i crash to desktop when i launch the game.

Here is another way that I used:
-Select the 03 00 00 00 03 03 and cut, remember the location
-Paste before 02 00 00 00 03
-Select the 02 00 00 00 03 and cut
-Paste on the location 03 00 00 00 03 03 before you cut it

The same way for _skel..
 

trumpdog

Vivacious Visitor
Joined
Apr 20, 2012
no luck...oh well, same deal...crash to DT

---------- Post added at 10:09 PM ---------- Previous post was at 10:04 PM ----------

this is the error i get
Error: 000a:0000Insufficient Memory


TERA stops working when there is an issue with memory allocation. We talk more about this error and possible solutions to this error at the link below.


 

obmit

Potential Patron
Joined
Apr 12, 2012
trump, you have to change the identifier length number (02 00 00 00 to 03 00 00 00, etc.) for all the items (body, leg, hand) as well as the package identifier length.

For example:

I swapped the female highelf (Highelf_F_R.gpk) starter dress to bikini
Package Identifier: 0 (02 00 00 00) <-> 00 (03 00 00 00)
Body Identifier: Highelf_R0_Body_Skel (17 00 00 00) <-> Highelf_R00_Body_Skel (18 00 00 00)
Hand Identifier: Highelf_R0_Hand_Skel (17 00 00 00) <-> Highelf_R00_Hand_Skel (18 00 00 00)
Leg Identifier: Highelf_R0_Leg_Skel (16 00 00 00) <-> Highelf_R00_Leg_Skel (17 00 00 00)

Btw, 17 hex is 23 decimal, so that's where the extra spot for the terminator comes in, as was pointed out.

Thanks Infinity for a detailed guide!

PS:

For the Highelf at least, the R00 (starter outfit) comes after R09, if you don't feel like using the search function and confusing yourself, you can just scroll through in the hex editor to find it. R0 (bikini/underwear) is the first outfit you'll find after the biped stuff.
 
Last edited by a moderator:

trumpdog

Vivacious Visitor
Joined
Apr 20, 2012
figured out the problem, i made a mistake with one of the identifiers. 1 typo eff'ed it all up.restored and did it over again, now works
fine.Thanks for the tutorial.

---------- Post added at 12:12 AM ---------- Previous post was at 12:05 AM ----------


is there anyway to work around the animation issue with some of the armors?
 

YoungKai

Content Creator
Joined
Apr 30, 2012
I think there is a bug for humans leather armor, in character creation it still showed the original mesh. But it works after I entered the game, so no problem.

Amen! I've redone that file like 10 times trying to figure out what the heck I did wrong. Thank you for confirming!!
 

Kazume

Potential Patron
Joined
Apr 25, 2012
Got it working too, thank you! Smart idea, i'd never would have thought of this.

I got one question however, and that is although it's working, it seems the texture mapping is off. (on the lingerie model, it's partly non reflective for instance)
That probably means you have to swap out the diffuse, bump maps etcetera too, right?
 

Users who are viewing this thread

Top


Are you 18 or older?

This website requires you to be 18 years of age or older. Please verify your age to view the content, or click Exit to leave.