[Tool] TpacTool - An unofficial asset explorer [0.2.0]

Currently Viewing (Users: 0, Guests: 1)

szszss

Recruit
Best answers
0
Hey there. It's been a month since the early access of Bannerlord was released, and its modding community has grown a lot. However there is still no way to manipulate the game assets, so I made a tool to open the asset packages, i.e. tpac files.

Although its name contains "Tool", it still lacks some important features. For example, importing. So far it can only preview and export models, textures and skeletons. That's why I call it an explorer. There is some distance to a complete editor, anyway.

And I'm sure you guys know the rules. Everything extracted from the tpac files belongs to its producer - in other words, belongs to Taleworlds. You should only use them for studying and modding purposes.


Model


Material


Texture






Some exported models in Blender. Show the rigged model and the morph (facial expression ).

Download: https://1drv.ms/u/s!AvLke0JkRmqFgZIxQxavIobTbiP8Dg?e=f6sdn5

Website: https://github.com/szszss/TpacTool

TpacTool is an open source software. You can keep track of its progress on that website, and even contribute to its development.

v0.2.0
Support latest (1.5.2) Bannerlord.
Support to load tpac files from sub directories. Now you can assign EmAssetPackages as the working directory. (And it's recommended because the tpacs in EmAssetPackages contain textures!)
New model previewer.
Fixed the broken horse skeleton exporting.
Fixed the crash when export mega textures. (For example, main_map_area. It took me one minute and 5G memory to export it, good luck.)
Fixed a Collada (.dae) exporting bug which caused the exported model cannot be imported by Blender 2.83+
Slight performance improving.

Q: Why are so many textures missing?
A: About half of the textures of Bannerlord are stored in the TileSets archives (*.gtex files). It's a private file format of Graphine, and I can't decode it. Unfortunately, all these textures are important. For example, the diffuse (color) and normal of the material.
I'm still studying the clockwork toy of Graphine. But don't expect it too much, it will cost lots of time, patience, sanity and luck…
Update: Taleworlds has packed most textures into the files in EmAssetPackages. You can select it as the working directory to view those textures.

Q: My Photoshop cannot open some exported DDS textures
A: The dds plugin of your Photoshop is outdated. Install the Nvidia DDS Plugin or the Intel DDS Plugin, or try other alternative software, e.g. Paint.NET.
 
Last edited:

Gaktan

Recruit
Best answers
0
You were saying in your github that you needed help with force fields. What do you need to know about that?
 

szszss

Recruit
Best answers
0
You were saying in your github that you needed help with force fields. What do you need to know about that?
I googled the vector field and I learnt that it's a kind of particle system. This should be correct because all PVFs are in the particles package. Whatever, it's beyond my knowledge.
Anyway, it's not a high priority task. There are only two PVFs in the game assets, and they even don't have regular names. Seems that even Taleworlds doesn't take it seriously.
 

gkx

Developer
WB
Best answers
0
Hi there, really nice job on reverse engineering tpacs, i didnt expect it that soon, grats! Just to add, we dont really mind if tpacs are broken or not, but gtex format is not ours, it is Graphine's property, i can't really talk for them but reverse engineering that files can be problematic.
 

Gaktan

Recruit
Best answers
0
I googled the vector field and I learnt that it's a kind of particle system. This should be correct because all PVFs are in the particles package. Whatever, it's beyond my knowledge.
Anyway, it's not a high priority task. There are only two PVFs in the game assets, and they even don't have regular names. Seems that even Taleworlds doesn't take it seriously.
Not exactly, a vector field is like a 3D area (field) where for each point, we can indicate a direction (vector). Usually this is represented using a 3D texture, where the rgb values represent a 3D vector (not necessarily normalized). You can think of it as a 3D flow map if you are familiar with that.
This is usually used for particles as you mentioned, to simulate wind or some kind of motion on particles on a small scale.

Now about the procedural part, I'm really not sure what they mean by this. It could be that the vector fields can be created on the fly and can change over time, so that they don't need to store a 3D texture for that, but instead it's represented by mathematical functions.

I didn't notice any example of them being used in the game so far (maybe on the title screen?), so yeah, probably not the highest prio for now.
 

csxmd

Recruit
Best answers
0
If Taleworlds is angry, there may not be a good MOD editor This will kill all mods. Or Taleworlds will be more likely to add more restrictions. . Please stop the import function first. . Taleworlds needs more time to perfect its game.
 

Buckzor123

Recruit
Best answers
0
Wow, didn't expect a tool like this so soon!

Having trouble exporting large textures. Mainly main_map_area, main_map_n. Seems to crash. Still a great tool!
 

legomir

Recruit
Best answers
0
Wow! It's great! One thing that I could suggest would be using either alembic or USD as export format rather than obj. Both of them are open source and are scene description rather than just geometry description. Trying to add by myself, but I'm still learning C#
 
Last edited:

Nemerius

Baron
WBWF&SNW
Best answers
0
Hi there, really nice job on reverse engineering tpacs, i didnt expect it that soon, grats! Just to add, we dont really mind if tpacs are broken or not, but gtex format is not ours, it is Graphine's property, i can't really talk for them but reverse engineering that files can be problematic.
tw just release the tools while you have all these people. so modders can fix the game . Great job
 

Rafalongo

Veteran
Best answers
0
great job! until objects cannot be imported we are not going to see good mods. I hope they don't take long to release the tools editor.

te red one is from warband, they are quite similar in size, change the position of the arms, and the bannerlord models are lying down

 
Last edited: