Skip to main content
Topic: Setting up a pak file (Read 16578 times) previous topic - next topic

Setting up a pak file

Well i was going to leave this, but its bugging me and i can't seem to find what the problem is.

I am using

8 png images painstakingly created with paint (and in need of more touching up before they're totally done)
a dat file.

I think the problem is with the dat file, i've not happened to use one before.

mallard.dat

Code: [Select]
obj=vehicle 
name=mallard
copyright=gambit
intro_month=1
intro_year=1938
retire_month=1
retire_year=1963
runningcost=3000
cost=200000
weight=100
power=1450
speed=180
payload=0
length=8
waytype=track
engine_type=steam
emptyimage[S]=mallard.1.0
emptyimage[E]=mallard.1.1
emptyimage[SE]=mallard.1.2
emptyimage[SW]=mallard.1.3
emptyimage[N]=mallard.1.4
emptyimage[W]=mallard.1.5
emptyimage[NW]=mallard.1.6
emptyimage[NE]=mallard.1.7

Re: Setting up a pak file

Reply #1
Would be helpful if you could post the png file.  ****uming your png is only one tile deep and 8 tiles wide (e.g. 128x1024 if using 128x128), then the images are defined wrong.  Each image should point to mallard.0.x rather than mallard.1.x.  You should also remove the ! before the S in the S image (but I ****ume you've added the comment because you know that already and it was to avoid formatting problems on the forum!).

Re: Setting up a pak file

Reply #2
Code: [Select]
emptyimage[!S]=mallard.1.0   ## added ! to stop strikeout

I suspect that this line cases the problem.
Remove the comment or put it onto a line of it own, and try again?

 

Re: Setting up a pak file

Reply #3
@Hajo - I think that the ! has been put in to avoid the forum producing strikeout formatting...

Re: Setting up a pak file

Reply #4
Ok.

Code: [Select]
emptyimage[S]=mallard.1.0

Code block should work, though ... without formatting. Maybe it helps to know for the next posting :)

Re: Setting up a pak file

Reply #5
@thehood

yes was because of the forum strikeout, didn't think of the code block :)

I'll upload the pictures tomorrow when i can, until then should it be working with the dat like that?

the images were in 8 pieces each one 1tile size 64x64 should it be 1 piece 64x512? that would've made it alot easier to use the template lol.

each image was saved mallard.1.x.png

Re: Setting up a pak file

Reply #6
The .y.x is not part of file name - this tells makeobj which portion of image should it use. Writing somefile.y.x means essentially something along the lines of "give me a part of image stored in somefile.png, which is in y-th row and x-th column." (counting starts at zero).

edit: here's an example for 128 tile size.

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!


Re: Setting up a pak file

Reply #8
I'll upload the dat file + photos tomorrow, i think they're the problem, i tried the suggestions in here and couldn't get it to work. I'm sure I'm just missing one small things ;) going to smarten up the png's a bit. Cheers for the help so far guys, definitely a friendly forum :)