News:

Simutrans Forum Archive
A complete record of the old Simutrans Forum.

Pak file

Started by danivenk, February 11, 2013, 03:28:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

danivenk

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.  ;)

Combuijs

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!
Bob Marley: No woman, no cry

Programmer: No user, no bugs



danivenk

Can you put the files in the makeobj directory too?

DirrrtyDirk

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
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 ;)
  
***** PAK128 Dev Team - semi-retired*****

danivenk

How to create a .bat file??

danivenk

but where do I find my file??

Combuijs

Quote from: danivenk on February 11, 2013, 03:41:45 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!)

Quote from: danivenk on February 11, 2013, 03:50:02 PM
but where do I find my file??

In the same directory as the dat and png file.
Bob Marley: No woman, no cry

Programmer: No user, no bugs



DirrrtyDirk

Quote from: Combuijs on February 11, 2013, 04:00:49 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...
  
***** PAK128 Dev Team - semi-retired*****

danivenk

By my simutrans don't work my pak file
can somebody try if it does work by his or her simutrans?

Combuijs

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.
Bob Marley: No woman, no cry

Programmer: No user, no bugs



danivenk

You can look at my dat file if there is something wrong it is in the fist message.

Combuijs

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...
Bob Marley: No woman, no cry

Programmer: No user, no bugs



danivenk

But what was wrong about the png high?

VS

For pak128:

width = 128 * n
height = 128 * m

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

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

IgorEliezer

Quote from: danivenk on February 12, 2013, 11:00:58 AM
But what was wrong about the png high?

Quote from: Combuijs on February 12, 2013, 10:08:10 AM
(...) 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).

Combuijs

Yes, so png height was ok (128), but width was one too much (1025), or 127 too short...
Bob Marley: No woman, no cry

Programmer: No user, no bugs




IgorEliezer

Gooooooood, let's see if it works. :)

danivenk

there is a little problem my pak file is 320 KB.  :(
here are all my files without my pak file.

Combuijs

Strange, I get 13KB, which seems to be right. As I don't have pak128, maybe you can test it?
Bob Marley: No woman, no cry

Programmer: No user, no bugs



IgorEliezer

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.

greenling

Opening hours 20:00 - 23:00
(In Night from friday on saturday and saturday on sunday it possibly that i be keep longer in Forum.)
I am The Assistant from Pakfilearcheologist!
Working on a big Problem!