The International Simutrans Forum

 

Author Topic: Modify .pak files  (Read 12137 times)

0 Members and 1 Guest are viewing this topic.

Offline fabio85

  • *
  • Posts: 32
Modify .pak files
« on: February 20, 2010, 09:32:46 PM »
Hi there!
I usually use pak128, but it lacks on passenger vehicles before 1920. I have tried to add trams and buses from pak128.Britain and it works, but prices are too high and it's impossibile to have a positive balance. I would want to modify them, but makeobj doesn't open them... what can I do?
Thanks!

Offline wlindley us

  • Devotee
  • *
  • Posts: 960
    • Hacking for fun and profit since 1977
  • Languages: EN, DE
Re: Modify .pak files
« Reply #1 on: February 20, 2010, 10:00:05 PM »
You could download the sources, edit the .dat files, and use makeobj to remake the .pak files. 

The Subversion repository is http://simutrans.svn.sourceforge.net/svnroot/simutrans/pak128.Britain/ and if you look around the board, there are other links to the sources too.

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Modify .pak files
« Reply #2 on: February 20, 2010, 10:21:17 PM »
This has been asked so many times... But I can't find that here on forum, so it seems another round of rehashing is in order :P

Standard answer: Pak files are not meant for editing.

Two better answers:
1) If you can get sources, why would you want to edit paks?
2) If you can use a hex-editor, do it. Format of pak files is described by source code which is publicly available. Nobody can stop you. But somebody might frown...

Offline The Hood

  • Devotee
  • *
  • Posts: 2889
  • pak128.Britain developer
Re: Modify .pak files
« Reply #3 on: February 21, 2010, 12:16:11 PM »
If you want to use pak128.Britain stuff, it is totally 100% OK to download the sources as wlindley describes and edit the prices and recompile with makeobj - this is (a) probably much easier than editing paks and (b) is legal.  As long as you don't try to pass any of the graphics off as your own elsewhere, of course :)

Offline fabio85

  • *
  • Posts: 32
Re: Modify .pak files
« Reply #4 on: February 21, 2010, 01:44:14 PM »
Thanks Wlindley! I am downloading .dat files and relative images to build new .pak files for pak128! ;)

@The Hood: I know open source's rules: I usually use Linux (Simutrans only on Linux) and it's impossible for a Debian user don't know them! ;) But, if I want to pass them to pak128, respecting owner's rights, what can I do? Earliest Pak128's vehicle is born on 1919, so Omnibus and steam trams are totally absent. From 1878 to 1948 a steam tram line passed near my home (I live near Milan , Italy), so I can add 40 years of history to Simutrans... I tried pak128.Britain that contains Omnibus and steam trams, but I think that is poor on ships and, I don't know why, graphics seems to be more simple than pak128. At the moment I use these packages for my Simutrans, but if I can do something to port them legally to pak128, I will be happy to do that!

Offline The Hood

  • Devotee
  • *
  • Posts: 2889
  • pak128.Britain developer
Re: Modify .pak files
« Reply #5 on: February 21, 2010, 02:09:03 PM »
There's nothing against re-making pak128.Britain objects with your own modified dat files and then making them into your own pak file.  You can then put that pak file you made into your pak128 folder, and they will appear in the depot in your pak128 game.  That's totally legal, but you would then have a customised version of pak128, with your own modified pak128.Britain add-on paks, so you'd just have to be careful if you tried sharing savegames with other people to make sure they also had your custom pak files too.

In any case, pak128.Britain shipping is being done at the minute, with some more available in the next release (so viable shipping exists at least from 1750-1900s, with patchy ships later on), so you may want to have another look at that.  I'm working on it though!

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Modify .pak files
« Reply #6 on: February 21, 2010, 03:07:03 PM »
I guess this dropped off the radar silently...

For those without svn access (almost everyone), I packed rev. 827 without non-free material and some useless items. A few non-free items might still persist in schwebebahn folder...

http://128.simutrans.com/download/128svn-export@827.7z

53 MB!