The Forum is up for sale: XeNTaX Forum looking for new owner

World of Tanks Map format.

Post questions about game models here, or help out others!
Post Reply
SkaceKachna
advanced
Posts: 66
Joined: Thu Jan 14, 2016 11:32 am
Has thanked: 9 times
Been thanked: 19 times

Re: World of Tanks Map format.

Post by SkaceKachna »

You're right, it's table index and offset. I just cracked entire bswg file and extracted the vertices parts from it.
Just give me some time to write script and description how it works.

There are still some unfigured data, but finally, entire file is described!

Sorry I wasn't answering your questions, but I'm just so excited I finally found something! Also I was deep inside the code. :mrgreen:
User avatar
Coffee
ultra-veteran
ultra-veteran
Posts: 518
Joined: Thu Aug 06, 2015 5:57 pm
Has thanked: 74 times
Been thanked: 205 times

Re: World of Tanks Map format.

Post by Coffee »

Great!

Yes.. I'll need a detailed layout of the format. I program in .NET and I barely can read python.
Make sure this works with ENSK OK?
I'd love to change the world but I can't get my hands on the code.
User avatar
Coffee
ultra-veteran
ultra-veteran
Posts: 518
Joined: Thu Aug 06, 2015 5:57 pm
Has thanked: 74 times
Been thanked: 205 times

Re: World of Tanks Map format.

Post by Coffee »

I know they have converted a lot of string numbers in to actual real floats in the data.. Like matrices.
We will need to be able to associate the correct matrix with each models vertices and indices.
Also.. almost all buildings on the maps contains 2 sets of UVs and 3 textures...
Some have 4 textures if they are also using the PBS shaders.
I'd love to change the world but I can't get my hands on the code.
SkaceKachna
advanced
Posts: 66
Joined: Thu Jan 14, 2016 11:32 am
Has thanked: 9 times
Been thanked: 19 times

Re: World of Tanks Map format.

Post by SkaceKachna »

I described the format here:
http://wiki.vbaddict.net/pages/BWSG

I hope it's descriptive enought. I'll attach the scripts tomorrow, I'm too tired now.
User avatar
ShadowHunterRUS
n00b
Posts: 17
Joined: Wed Jan 13, 2016 11:04 am
Location: Russia
Has thanked: 9 times
Been thanked: 5 times

Re: World of Tanks Map format.

Post by ShadowHunterRUS »

SkaceKachna wrote:Here's script that extract all informations currently known by me:
http://cerno.ch/~kamen/upload/test-bswg.py

3. TABLE -> purpose uknown
4. TABLE -> one item, length of rest of the file

We now have entire BWSG file covered!
Please write your scripts compatible with Python3 :)

It is not difficult => http://www.koreanrandom.com/forum/topic ... /?p=310323
SkaceKachna
advanced
Posts: 66
Joined: Thu Jan 14, 2016 11:32 am
Has thanked: 9 times
Been thanked: 19 times

Re: World of Tanks Map format.

Post by SkaceKachna »

Here is complete script (py3 compatible :P )

http://cerno.ch/~kamen/upload/test-bswg.py

It takes the BWSG file and extracts its contents into vertices folder. Which is useless, but it demonstrates the positions and sizes.
SkaceKachna
advanced
Posts: 66
Joined: Thu Jan 14, 2016 11:32 am
Has thanked: 9 times
Been thanked: 19 times

Re: World of Tanks Map format.

Post by SkaceKachna »

Note that table structure is reocurring theme,
BWST is only table of key -> string
BWMO contains only tables in this format (with some references to BWST - BW strings?)
User avatar
Coffee
ultra-veteran
ultra-veteran
Posts: 518
Joined: Thu Aug 06, 2015 5:57 pm
Has thanked: 74 times
Been thanked: 205 times

Re: World of Tanks Map format.

Post by Coffee »

Nice work on the page SkaceKachna

Basically everything we sorted out yesterday.
Id recommend you bracket "( )" the math. I have seen strange things happen in different compilers.

I can help a lot with the cdata files and also how the ctree data works.

For now Lets figure out how to reassemble the data for the models.


I know that the SpTr file contains matrices, each followed by its key and than 2 unt32s both always equaling 1.
At the end of this file there is some extra data. Some of these are floats and on ensk.. match the 1/2 width of the map. This could be a coincidence. There is what appears to be a key in there. One thing I said before is all the trees will use the same shader and flag settings.
ONLY BWSG contains the speedtree paths.
Consider SpTr hacked!

There is something I noticed about BWSG.
Almost every entry ends with "/vertices"
Where, BWST contains all kinds of names including .dds texture names.
Also.. BWST has no other tables than the index and the strings.
You can find the keys in BWST's index table in BWSG's 2nd table.
This in turn points in the the large chunks at the end.
I have a feeling (not tested) that these large chunks are a list of keys from
both the BWST and BSMI or some other matrix file. BMSI contains 4585 matrices.

There is no matching keys in the BSMI (matrix file) for entries in BWST.
They must come from some where else.
Also,
there are duplicate names in BWST.
I WAS WRONG.. THERE DOES NOT APPEAR TO BE DUPLICATE NAMES IN BWSG
There has to be a matrix for every model on the map so
this makes since.
The mission as I see it is to find where all the keys are to put the names in groups that are in BWST.
I believe BWST contains the data for creating the .visual needed for each model. It contains many more strings than BWSG.
Last edited by Coffee on Fri Jan 22, 2016 5:39 pm, edited 1 time in total.
I'd love to change the world but I can't get my hands on the code.
SkaceKachna
advanced
Posts: 66
Joined: Thu Jan 14, 2016 11:32 am
Has thanked: 9 times
Been thanked: 19 times

Re: World of Tanks Map format.

Post by SkaceKachna »

Yes, so far keys from BWST are used in:
WGSD ((multiple times, always pointing to strings that ends with .dds)
BSMO (multiple times, always pointing to strings that ends with .primitive)

- both consists only of tables (same format as other)
User avatar
Coffee
ultra-veteran
ultra-veteran
Posts: 518
Joined: Thu Aug 06, 2015 5:57 pm
Has thanked: 74 times
Been thanked: 205 times

Re: World of Tanks Map format.

Post by Coffee »

That makes sense.
WGSD : WarGaming Section DDS
BSMO : Bigworld Section Map Object?
I'd love to change the world but I can't get my hands on the code.
User avatar
ShadowHunterRUS
n00b
Posts: 17
Joined: Wed Jan 13, 2016 11:04 am
Location: Russia
Has thanked: 9 times
Been thanked: 5 times

Re: World of Tanks Map format.

Post by ShadowHunterRUS »

SkaceKachna wrote:Here is complete script (py3 compatible :P )
http://cerno.ch/~kamen/upload/test-bswg.py
I love to nitpick. [roll]
Python code #2 -> http://www.koreanrandom.com/forum/topic ... /?p=310323
SkaceKachna
advanced
Posts: 66
Joined: Thu Jan 14, 2016 11:32 am
Has thanked: 9 times
Been thanked: 19 times

Re: World of Tanks Map format.

Post by SkaceKachna »

BSMA - contains informations about materials:

1. table -> uknown (size: 12)
2. table -> only shader paths (size: 4 -> index in BWST table)

Example:
(0, 'shaders/std_effects/PBS_ext_dual.fx')

3. table -> [key -> value] thingy,
size: 12
0 -> BWST key, key of list
4 -> ?
8 -> BWST key or value ... value of list

Example:
(0, 'diffuseMap')
(8, 'content/Environment/env616_Background_trees/env616_Background_Trees.dds')

4. table -> unknown (size: 64)
5. table -> unknown (size: 16)
User avatar
Coffee
ultra-veteran
ultra-veteran
Posts: 518
Joined: Thu Aug 06, 2015 5:57 pm
Has thanked: 74 times
Been thanked: 205 times

Re: World of Tanks Map format.

Post by Coffee »

Nice work..

Here are all the keys for gaf010_FenceTile2.primitives I can find using the .visual as reference
There are 312 found keys matching 37066838 in BWSG
BWSG:
37066838 gaf010_FenceTile2.primitives/vertices
1FEFB938 xyznuvtb

BWST:
93446CBA gaf010_Fence.dds
3BEDC63F gaf010_Fence_NM.dds
250638E5 gaf010_Fence_SM.dds
DB756A17 diffuseMap
74F50CF6 normalMap
B2F70F7B doubleSided
0E5639FE alphaTestEnable
379B7275 alphaReference
DB50B7BF specularMap


138CFE57 normalmap_specmap.fx

Some where all this is tied together.
I'd love to change the world but I can't get my hands on the code.
User avatar
Coffee
ultra-veteran
ultra-veteran
Posts: 518
Joined: Thu Aug 06, 2015 5:57 pm
Has thanked: 74 times
Been thanked: 205 times

Re: World of Tanks Map format.

Post by Coffee »

Lot of fence tile sections..
There are indeed 311 entries in table 2 for these models for the ENSK map.

In order to place the models on the map I need at least the transform matrix data for each model.
If the models are in the sandbox, I can get everything else from there.
I'd love to change the world but I can't get my hands on the code.
SkaceKachna
advanced
Posts: 66
Joined: Thu Jan 14, 2016 11:32 am
Has thanked: 9 times
Been thanked: 19 times

Re: World of Tanks Map format.

Post by SkaceKachna »

I won't be able to progress next few days, need to study. Just note almost every chunk has the more ENTRY_SIZE and ENTRY_COUNT structures with some entries pointing to BWST...
Post Reply