The International Simutrans Forum

 

Author Topic: Pak file  (Read 8616 times)

0 Members and 1 Guest are viewing this topic.

Offline danivenk

  • *
  • Posts: 100
  • Languages: EN, NL, JP
Pak file
« on: February 11, 2013, 03:28:45 PM »
Does somebody know how to make a pak file with makeobj and where to find it? (at the computer)
I have this files allready.
I want to have them in a pak file.
I hope someone can help me.  ;)

Offline Combuijs

  • Web Team
  • Devotee
  • *
  • Posts: 1406
  • Maintainer of maps.simutrans.com
    • Combuijs
  • Languages: EN, NL
Re: Pak file
« Reply #1 on: February 11, 2013, 03:35:20 PM »
Download makeobj.exe (see Download Simutrans). Put it in the same directory as both files and execute makeobj pak128. That will create your pak file.

If you are using windows you best make a batch file in which you put that

makeobj pak128

command.

Edit: Nice bus by the way!

Offline danivenk

  • *
  • Posts: 100
  • Languages: EN, NL, JP
Re: Pak file
« Reply #2 on: February 11, 2013, 03:39:01 PM »
Can you put the files in the makeobj directory too?

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: Pak file
« Reply #3 on: February 11, 2013, 03:39:13 PM »
Try this for the beginning:

Put your .png file, your .dat file and makeobj.exe into a specific folder.

Also, create a .bat file (e.g. create.bat) - essentially just a plain text file, just with another file-extension - there with the following line in it
Code: [Select]
makeobj pak128
There are a dozen ways to make this process somewhat "cleaner" (like putting makeobj in a specific folder and add that folder to your windows "path" variable... or specify exactly the name of the dat file to be used (the above version will try to pak all .dat files in the folder)... or specify a name for the pak-file to be created instead of using the object name from the .dat, etc.)

Edit: I need to be quicker, I think ;)

Offline danivenk

  • *
  • Posts: 100
  • Languages: EN, NL, JP
Re: Pak file
« Reply #4 on: February 11, 2013, 03:41:45 PM »
How to create a .bat file??

Offline danivenk

  • *
  • Posts: 100
  • Languages: EN, NL, JP
Re: Pak file
« Reply #5 on: February 11, 2013, 03:50:02 PM »
but where do I find my file??

Offline Combuijs

  • Web Team
  • Devotee
  • *
  • Posts: 1406
  • Maintainer of maps.simutrans.com
    • Combuijs
  • Languages: EN, NL
Re: Pak file
« Reply #6 on: February 11, 2013, 04:00:49 PM »
How to create a .bat file??

Make a text file, give it extension .bat and put the line in DirrrtyDirk mentioned. After saving double-click on that file and you will see it runs (very quick!)

but where do I find my file??

In the same directory as the dat and png file.

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: Pak file
« Reply #7 on: February 11, 2013, 04:15:07 PM »
Make a text file, give it extension .bat and put the line in DirrrtyDirk mentioned. After saving double-click on that file and you will see it runs (very quick!)

Unless you use Microsoft's standard setting of hiding all known extensions...

Offline danivenk

  • *
  • Posts: 100
  • Languages: EN, NL, JP
Re: Pak file
« Reply #8 on: February 12, 2013, 08:54:04 AM »
By my simutrans don't work my pak file
can somebody try if it does work by his or her simutrans?

Offline Combuijs

  • Web Team
  • Devotee
  • *
  • Posts: 1406
  • Maintainer of maps.simutrans.com
    • Combuijs
  • Languages: EN, NL
Re: Pak file
« Reply #9 on: February 12, 2013, 09:31:46 AM »
Without looking at it, I can see it won't work. Its size is too small. Typically a pak128 vehicle file is around 20K. So, either your batch-file is wrong (did you specify pak128 as a target) or you dat file is wrong.

Offline danivenk

  • *
  • Posts: 100
  • Languages: EN, NL, JP
Re: Pak file
« Reply #10 on: February 12, 2013, 09:41:46 AM »
You can look at my dat file if there is something wrong it is in the fist message.

Offline Combuijs

  • Web Team
  • Devotee
  • *
  • Posts: 1406
  • Maintainer of maps.simutrans.com
    • Combuijs
  • Languages: EN, NL
Re: Pak file
« Reply #11 on: February 12, 2013, 10:08:10 AM »
I have downloaded your dat and png file. Nothing wrong with the dat file, it is the png file. Its size should be multiples of 128 pixels in both directions. Its length is 1025 which should be shortened to 1024.

If you add a "pause" on the next line of the batch file, you will see an error message. I've included such a batch file in the post, you should remove the .txt extension, as this forum does not accept .bat files...

Offline danivenk

  • *
  • Posts: 100
  • Languages: EN, NL, JP
Re: Pak file
« Reply #12 on: February 12, 2013, 11:00:58 AM »
But what was wrong about the png high?

Offline VS

  • Senior Plumber (Devotee)
  • Moderator
  • *
  • Posts: 4856
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Pak file
« Reply #13 on: February 12, 2013, 11:13:04 AM »
For pak128:

width = 128 * n
height = 128 * m

Not a pixel more or less! That's all :)

Offline IgorEliezer

  • Devotee
  • Administrator
  • *
  • Posts: 4111
  • I have nothing to do with it!
    • Igor Eliezer Architect and Urban Planner/Arquiteto e Urbanista
  • Languages: PT, EN, AutoLISP, Python
Re: Pak file
« Reply #14 on: February 12, 2013, 11:14:03 AM »
But what was wrong about the png high?

(...) it is the png file. Its size should be multiples of 128 pixels in both directions. Its length is 1025 which should be shortened to 1024.
Dude, dude. To get it working properly, a PNG image should be made of squares of 128x128 pixels. No less, no more.

The height of your image is correct (128), but the length is not (1025; it should be 1024, as in 128px x 8 squares = 1024px long).

Offline Combuijs

  • Web Team
  • Devotee
  • *
  • Posts: 1406
  • Maintainer of maps.simutrans.com
    • Combuijs
  • Languages: EN, NL
Re: Pak file
« Reply #15 on: February 12, 2013, 11:14:10 AM »
Yes, so png height was ok (128), but width was one too much (1025), or 127 too short...

Offline danivenk

  • *
  • Posts: 100
  • Languages: EN, NL, JP
Re: Pak file
« Reply #16 on: February 12, 2013, 11:16:08 AM »
okay

Offline IgorEliezer

  • Devotee
  • Administrator
  • *
  • Posts: 4111
  • I have nothing to do with it!
    • Igor Eliezer Architect and Urban Planner/Arquiteto e Urbanista
  • Languages: PT, EN, AutoLISP, Python
Re: Pak file
« Reply #17 on: February 12, 2013, 11:17:40 AM »
Gooooooood, let's see if it works. :)

Offline danivenk

  • *
  • Posts: 100
  • Languages: EN, NL, JP
Re: Pak file
« Reply #18 on: February 12, 2013, 11:23:20 AM »
there is a little problem my pak file is 320 KB.  :(
here are all my files without my pak file.

Offline Combuijs

  • Web Team
  • Devotee
  • *
  • Posts: 1406
  • Maintainer of maps.simutrans.com
    • Combuijs
  • Languages: EN, NL
Re: Pak file
« Reply #19 on: February 12, 2013, 12:11:21 PM »
Strange, I get 13KB, which seems to be right. As I don't have pak128, maybe you can test it?

Offline IgorEliezer

  • Devotee
  • Administrator
  • *
  • Posts: 4111
  • I have nothing to do with it!
    • Igor Eliezer Architect and Urban Planner/Arquiteto e Urbanista
  • Languages: PT, EN, AutoLISP, Python
Re: Pak file
« Reply #20 on: February 12, 2013, 12:14:50 PM »
HEY Combuijs! You're faster than me. I had compiled it myself and was about to post it.

Anyway, it worked pretty fine in the game.

Offline greenling

  • Lounger
  • *
  • Posts: 1728
  • Simutransarchology it my hobby!
  • Languages: DE,EN
Re: Pak file
« Reply #21 on: February 12, 2013, 04:47:44 PM »
Woh that go fast.