New Feature: .tar support

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Post Reply
TrueBrain
OpenTTD Developer
OpenTTD Developer
Posts: 1370
Joined: 31 May 2004 09:21

New Feature: .tar support

Post by TrueBrain »

As of tomorrows nightly you can enjoy .tar support in OpenTTD.

This feature is mostly meant for 32bpp PNGs and to allow GRF-packs, like for the coop guys. It works very simple:

Put which ever files you want packed in a dir, say: data_pack/, and put in it the dir-structure you need, like if it was in the root of your data/ dir. Remember: it doesn't matter WHERE the .tar file is, it works relative from the data/ dir. So putting it in data/tar/ doesn't change a thing.

Run, in the data_pack dir: tar cf ../data/mypack.tar *

Now start OpenTTD, and your files will be loaded like they were unpacked in the data/ dir. Simple, efficient, easy ;) Of course you need *nix, or mingw to use 'tar' like that, but you get the point ;)

Compression formats will _not_ be supported, as they are very slow. '.tar' is a container format, meaning it stores the files byte-by-byte (without any compression) in the file, keeping a header with the data.

If there are any bugs or questions, feel free to post them here.
The only thing necessary for the triumph of evil is for good men to do nothing.
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Re: New Feature: .tar support

Post by Wolf01 »

for windows users: there is also 7zip which allow to create tar archives, simply select the folder/files you want -> right click on the selection -> 7z add to archive and select tar from the dropdown list (you can chose between zip, 7z and tar)
User avatar
thgergo
Route Supervisor
Route Supervisor
Posts: 391
Joined: 29 Mar 2005 12:44
Location: Hungary

Re: New Feature: .tar support

Post by thgergo »

I have a question, will newgrf actions be supported in tar files someday?
Image
Image
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Re: New Feature: .tar support

Post by Wolf01 »

you already can use a newgrf with the actions and the external sprites in 32bpp in the folder with the same name of the newgrf (but the grf should have the sprites in it, i think is enough a blank sprite, as you can only replace them with the external ones in 32bpp, like the standard ones)
User avatar
glx
OpenTTD Developer
OpenTTD Developer
Posts: 622
Joined: 02 Dec 2005 15:43
Location: Drancy(93) - France
Contact:

Re: New Feature: .tar support

Post by glx »

Wolf01 wrote:for windows users: there is also 7zip which allow to create tar archives, simply select the folder/files you want -> right click on the selection -> 7z add to archive and select tar from the dropdown list (you can chose between zip, 7z and tar)
For now, tar files are not supported by windows versions of openttd.
And tar made using 7z are not "valid" tar for openttd.
TrueBrain
OpenTTD Developer
OpenTTD Developer
Posts: 1370
Joined: 31 May 2004 09:21

Re: New Feature: .tar support

Post by TrueBrain »

And the time flies when you are having fun: the latest revision now also support 'old' tar format (read: 7z tars), and has a bunch of small fixes (like win32 support) :)
The only thing necessary for the triumph of evil is for good men to do nothing.
User avatar
dannys9
Engineer
Engineer
Posts: 29
Joined: 23 Nov 2004 17:16
Location: Dassendorf, Germany

Re: New Feature: .tar support

Post by dannys9 »

Still doesn't work for me an win32. The files get loaded correctly but are not used in game.

I've placed a file gui.tar into the data directory.
Within the tar I've files like "sprites\trg1r\680.png"
I run openttd -b 32bpp-anim.

So, what am I doing wrong? I tried it with 7-zip and GNU tar 1.15.1 files.
English™ - powered by Dictionary™
User avatar
glx
OpenTTD Developer
OpenTTD Developer
Posts: 622
Joined: 02 Dec 2005 15:43
Location: Drancy(93) - France
Contact:

Re: New Feature: .tar support

Post by glx »

Using a >=r11116 win32 build?
User avatar
dannys9
Engineer
Engineer
Posts: 29
Joined: 23 Nov 2004 17:16
Location: Dassendorf, Germany

Re: New Feature: .tar support

Post by dannys9 »

Erm, of course...
English™ - powered by Dictionary™
TrueBrain
OpenTTD Developer
OpenTTD Developer
Posts: 1370
Joined: 31 May 2004 09:21

Re: New Feature: .tar support

Post by TrueBrain »

Please post your .tar, so we can take a look at it.
The only thing necessary for the triumph of evil is for good men to do nothing.
User avatar
dannys9
Engineer
Engineer
Posts: 29
Joined: 23 Nov 2004 17:16
Location: Dassendorf, Germany

Re: New Feature: .tar support

Post by dannys9 »

It's attached...

edit: File removed, it was meant for testing purposes only and a collection I just made for myself
Last edited by dannys9 on 16 Sep 2007 09:13, edited 1 time in total.
English™ - powered by Dictionary™
TrueBrain
OpenTTD Developer
OpenTTD Developer
Posts: 1370
Joined: 31 May 2004 09:21

Re: New Feature: .tar support

Post by TrueBrain »

Okay, tnx. This is a Windows only problem, as on Linux it runs just fine. We are looking into this problem. Tnx for the report!
The only thing necessary for the triumph of evil is for good men to do nothing.
Grolsch
Transport Coordinator
Transport Coordinator
Posts: 283
Joined: 08 May 2004 07:48
Location: Alkmaar, The Netherlands

Re: New Feature: .tar support

Post by Grolsch »

"Gui.tar" :lol:
Beer equals power
TrueBrain
OpenTTD Developer
OpenTTD Developer
Posts: 1370
Joined: 31 May 2004 09:21

Re: New Feature: .tar support

Post by TrueBrain »

In tomorrows nightly (and latest revision) the .tar problems for Windows are fixed.
The only thing necessary for the triumph of evil is for good men to do nothing.
User avatar
dannys9
Engineer
Engineer
Posts: 29
Joined: 23 Nov 2004 17:16
Location: Dassendorf, Germany

Re: New Feature: .tar support

Post by dannys9 »

Now everything's fine :D Tnx TrueLight!
English™ - powered by Dictionary™
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 21 guests