Update for Archive Viewer (viewing .bar files)

Here you can post about your scenario's, mods, custom maps and YouTube channels!
User avatar
Russia XaKOps
Skirmisher
Posts: 198
Joined: Sep 26, 2015
ESO: XaKOps

Update for Archive Viewer (viewing .bar files)

  • Quote

Post by XaKOps »

I think everyone understands that DE will break most of current projects and utilits. One of the utilities that will not work in DE is Archive Viewer from AOE3ed to view .bar files and its contents.

Short desciption of Arhive Viewer:
Spoiler
So as a Beta participant I have access to beta game files. I reworked Archive Viewer program and now it works even for AoE3: DE - it has all features(viewing .bar files, exctracting from .bar, preview xmb files) from the old version except for the preview of some DDT formats. I used decompression algorithm from ModHQ, but it doesn't work properly for DXT3 and DXT5 formats.

So if anyone has knowledge about DXT3 and DXT5 decompression and can explain what's wrong with my code, I'll be very grateful. Please, send DM in Discord (XaKOps#1244) if you interested in this work.
I also have source code of AOE3ed(C++), AOMed(Perl) and DDT Photoshop plugin(C++) but they use specific libs to decompress DDT image.
User avatar
Italy Blastkiller
Dragoon
Posts: 338
Joined: Mar 4, 2019
ESO: Blastkiller
Location: Italy

Re: Update for Archive Viewer (viewing .bar files)

Post by Blastkiller »

I have a question, I don't know if it is the suitable thread but in case I will delete it, when I open a .bar file with Archive Viewer and then it extracts everything in a folder, after having made changes to some XML files how can I convert the extracted folder back to a .bar file?
@XaKOps
No one will escape from me, from my Russians, neither a troll nor a hacker nor a smurf, they will all give days in front of my strelets
User avatar
Italy Mosx
Dragoon
Posts: 399
Joined: Dec 12, 2018
ESO: Mosx
Location: Viareggio,Italy

Re: Update for Archive Viewer (viewing .bar files)

Post by Mosx »

rename it .bar
@Blastkiller
op mechanics, op build order :export: :coin: :ugly: :uglylol: :maniac:

Image

https://www.twitch.tv/mosxgr
User avatar
Russia XaKOps
Skirmisher
Posts: 198
Joined: Sep 26, 2015
ESO: XaKOps

Re: Update for Archive Viewer (viewing .bar files)

Post by XaKOps »

Blastkiller wrote:I have a question, I don't know if it is the suitable thread but in case I will delete it, when I open a .bar file with Archive Viewer and then it extracts everything in a folder, after having made changes to some XML files how can I convert the extracted folder back to a .bar file?
@XaKOps
It is possible if you know structure of bar file. But current archive viewer doesn't support this operation. It can be implemented very easy.
User avatar
Italy Blastkiller
Dragoon
Posts: 338
Joined: Mar 4, 2019
ESO: Blastkiller
Location: Italy

Re: Update for Archive Viewer (viewing .bar files)

Post by Blastkiller »

Mosx wrote:rename it .bar
@Blastkiller
Surely with a folder you can do it :lol:
No one will escape from me, from my Russians, neither a troll nor a hacker nor a smurf, they will all give days in front of my strelets
User avatar
Italy Blastkiller
Dragoon
Posts: 338
Joined: Mar 4, 2019
ESO: Blastkiller
Location: Italy

Re: Update for Archive Viewer (viewing .bar files)

Post by Blastkiller »

XaKOps wrote:
Blastkiller wrote:I have a question, I don't know if it is the suitable thread but in case I will delete it, when I open a .bar file with Archive Viewer and then it extracts everything in a folder, after having made changes to some XML files how can I convert the extracted folder back to a .bar file?
@XaKOps
It is possible if you know structure of bar file. But current archive viewer doesn't support this operation. It can be implemented very easy.
Sorry, how can it be implemented? Can you give me an example?
No one will escape from me, from my Russians, neither a troll nor a hacker nor a smurf, they will all give days in front of my strelets
User avatar
United States of America musketeer925
Retired Contributor
Donator 01
Posts: 2483
Joined: Mar 28, 2015
ESO: musketeer925

Re: Update for Archive Viewer (viewing .bar files)

Post by musketeer925 »

Blastkiller wrote:
XaKOps wrote:
Blastkiller wrote:I have a question, I don't know if it is the suitable thread but in case I will delete it, when I open a .bar file with Archive Viewer and then it extracts everything in a folder, after having made changes to some XML files how can I convert the extracted folder back to a .bar file?
@XaKOps
It is possible if you know structure of bar file. But current archive viewer doesn't support this operation. It can be implemented very easy.
Sorry, how can it be implemented? Can you give me an example?
This tool is what I previously used for modifying the BAR file (though it's only in German...):
BAREditor.zip
(10.38 KiB) Downloaded 386 times
I eventually wrote a Python script that can edit BAR files, which is used in the EP build system:
https://gitlab.com/adamjseitz/aoe3-mod- ... _editor.py

@XaKOps
I also seem to have a DDT Photoshop plugin that claims to have been written by @kangcliff, so maybe he knows more about the format.

I have some DDT-related source code in a folder called "Archive viewer source", but I think that's probably what you already have. I can send it over if you're interested.

Hoping you chose to make your work open source :smile:
User avatar
Russia XaKOps
Skirmisher
Posts: 198
Joined: Sep 26, 2015
ESO: XaKOps

Re: Update for Archive Viewer (viewing .bar files)

Post by XaKOps »

@musketeer925 thank you. @Kevsoft already sent his source code and it works perfectly.
User avatar
Italy Blastkiller
Dragoon
Posts: 338
Joined: Mar 4, 2019
ESO: Blastkiller
Location: Italy

Re: Update for Archive Viewer (viewing .bar files)

Post by Blastkiller »

musketeer925 wrote:
Blastkiller wrote:
Show hidden quotes
Sorry, how can it be implemented? Can you give me an example?
This tool is what I previously used for modifying the BAR file (though it's only in German...):
BAREditor.zip
I eventually wrote a Python script that can edit BAR files, which is used in the EP build system:
https://gitlab.com/adamjseitz/aoe3-mod- ... _editor.py

@XaKOps
I also seem to have a DDT Photoshop plugin that claims to have been written by @kangcliff, so maybe he knows more about the format.

I have some DDT-related source code in a folder called "Archive viewer source", but I think that's probably what you already have. I can send it over if you're interested.

Hoping you chose to make your work open source :smile:
Thanks for everything
No one will escape from me, from my Russians, neither a troll nor a hacker nor a smurf, they will all give days in front of my strelets
User avatar
Romania mandosrex
Musketeer
Posts: 57
Joined: Mar 22, 2015

Re: Update for Archive Viewer (viewing .bar files)

Post by mandosrex »

On behalf of the AoE3 modding community, yes, we need everything! At least all tools we used on the original to be adjusted to work for DE. So that means AoE3Ed (I understand FILECONVERTER also has some issues with the new textures), BAREditor v0.9.2 and the PS plugin.

Immense thanks for your help.
User avatar
Russia XaKOps
Skirmisher
Posts: 198
Joined: Sep 26, 2015
ESO: XaKOps

Re: Update for Archive Viewer (viewing .bar files)

Post by XaKOps »

mandosrex wrote:On behalf of the AoE3 modding community, yes, we need everything! At least all tools we used on the original to be adjusted to work for DE. So that means AoE3Ed (I understand FILECONVERTER also has some issues with the new textures), BAREditor v0.9.2 and the PS plugin.

Immense thanks for your help.
It seems like file converter and PS plugin works fine. Main breaking change is that entries in bar files can be compressed (same algorithm as xmb files). But I want rework bareditor and fileconverter too.
User avatar
Russia XaKOps
Skirmisher
Posts: 198
Joined: Sep 26, 2015
ESO: XaKOps

Re: Update for Archive Viewer (viewing .bar files)

Post by XaKOps »

I added sorting by various columns and built-in syntax highlighting for files (XML/XMB, xs). Also want to add zoom ability for large textures. If you have some suggestions in mind tell me !
spoiler
User avatar
Romania mandosrex
Musketeer
Posts: 57
Joined: Mar 22, 2015

Re: Update for Archive Viewer (viewing .bar files)

Post by mandosrex »

That all looks amazing!

But the issues I'm talking about, with FILECONVERTER and ddt, it sometimes makes the converted file have a different grading over it (I dunno the official terms).
For example, this is the BaseColor texture of the alligator, which should be the normal texture that appears ingame:
Image
It's all red and stuff for some reason. Now on other BaseColor textures, this doesn't happen, they come out normal.
So there is something wrong with the tool.

And the Photoshop plugin just doesn't work for me. It says "problem with file-format".
I've attached the files.

Thank you for your amazing work.
Attachments
ddt.rar
(64.32 KiB) Downloaded 30 times
alligator.rar
(22.06 MiB) Downloaded 36 times
User avatar
Russia XaKOps
Skirmisher
Posts: 198
Joined: Sep 26, 2015
ESO: XaKOps

Re: Update for Archive Viewer (viewing .bar files)

Post by XaKOps »

@mandosrex can you say in what bar this DDT file locate ?
UPD: Plugin says that format is invalid because DDT file is compressed. I guess it is DE file right ?
UPD2: Seems like for DXT5 format alpha channel and red channel mixed up (It is bug both for FileConverter and DDT plugin).
spoiler
User avatar
Romania mandosrex
Musketeer
Posts: 57
Joined: Mar 22, 2015

Re: Update for Archive Viewer (viewing .bar files)

Post by mandosrex »

XaKOps wrote:@mandosrex can you say in what bar this DDT file locate ?
Art\units\animals\alligator\textures
XaKOps wrote:UPD: Plugin says that format is invalid because DDT file is compressed. I guess it is DE file right ?
DE is the subject of this thread so yes.
XaKOps wrote: UPD2: Seems like for DXT5 format alpha channel and red channel mixed up (It is bug both for FileConverter and DDT plugin).
Can they be fixed in your updated tools?
User avatar
Russia XaKOps
Skirmisher
Posts: 198
Joined: Sep 26, 2015
ESO: XaKOps

Re: Update for Archive Viewer (viewing .bar files)

Post by XaKOps »

mandosrex wrote:Can they be fixed in your updated tools?
i think yes. Btw is this bug exists only with DE files or with Complete Collection too ?
User avatar
Romania mandosrex
Musketeer
Posts: 57
Joined: Mar 22, 2015

Re: Update for Archive Viewer (viewing .bar files)

Post by mandosrex »

DE only. All tools worked fine on all files in the original.
No Flag tnors
Crossbow
Posts: 22
Joined: May 25, 2020

Re: Update for Archive Viewer (viewing .bar files)

Post by tnors »

anyone know where the <maxcardsperdeck> tag should be added to homecity.xml? does it go in the "deck" section or somewhere else?
No Flag tnors
Crossbow
Posts: 22
Joined: May 25, 2020

Re: Update for Archive Viewer (viewing .bar files)

Post by tnors »

also, how can the updated .xml file be imported back into data.bar? there's no import option in the bareditor
User avatar
Kiribati princeofcarthage
Retired Contributor
Posts: 8861
Joined: Aug 28, 2015
Location: Milky Way!

Re: Update for Archive Viewer (viewing .bar files)

Post by princeofcarthage »

@musketeer925 there is an English version of the bareditor also
Fine line to something great is a strange change.
User avatar
United States of America musketeer925
Retired Contributor
Donator 01
Posts: 2483
Joined: Mar 28, 2015
ESO: musketeer925

Re: Update for Archive Viewer (viewing .bar files)

Post by musketeer925 »

princeofcarthage wrote:@musketeer925 there is an English version of the bareditor also
I don't have it. Where?

Who is online

Users browsing this forum: No registered users and 5 guests

Which top 10 players do you wish to see listed?

All-time

Active last two weeks

Active last month

Supremacy

Treaty

Official

ESOC Patch

Treaty Patch

1v1 Elo

2v2 Elo

3v3 Elo

Power Rating

Which streams do you wish to see listed?

Twitch

Age of Empires III

Age of Empires IV