The International Simutrans Forum

Community => Simutrans Help Center => Topic started by: odst23 on September 03, 2011, 08:47:15 PM

Title: Creating Pak Files: DAT file & PNG image corralation
Post by: odst23 on September 03, 2011, 08:47:15 PM
My question is how do I tell the DAT file what parts of the PNG image are which, and how to merge the two together. I looked in your wiki manuals for PNG image creation, they ether weren't links or the pages were blank. I am kinda new to the development of pak files, but I've cached on with a few things. I've got the DAT file down, I think, here it is:

obj=vehicle
name=(don't want my name stolen lol)
copywrite=FV_inc.
intro_month=5
intro_year=2200
runningcost=850
cost=650160
weight=9
gear=1
power=6582
speed=385
payload=0
freight=none
vehicle=8
waytype=rail
engine_type=hydrogen


Unfortunately, I also don't know how to post my PNG picture on here, but I will use an example PNG image from the simutrans wiki manual (DAT file creation) as a representation:

(http://simutrans-germany.com/wiki/wiki_img/source/wg.png)

My PNG image is kinda like that, only that every angle of my vehicle is in a single row, if it makes any difference, and that I want mine in pak128 format.

Here's the example image's example DAT file:

obj=vehicle
name=Güterwagen_1850
waytype=track
freight=Kohle
payload=5
speed=45
cost=25000
weight=4
RunningCost=1
intro_year=1850
intro_month=1
retire_year=1875
retire_month=7
EmptyImage(S)=wg.0.0 ##
EmptyImage(W)=wg.0.1 ##
EmptyImage(SE)=wg.0.2 ##
EmptyImage(SW)=wg.0.3 ##
FreightImage(S)=wg.1.0
FreightImage(W)=wg.1.1
FreightImage(SE)=wg.1.2
FreightImage(SW)=wg.1.3


I'm curious as to what unit of measurement the ## lines are using. I have the following programs you guys said I need to have:

-Gimp
-Pakmaker
-Makeobj
-Pakhelper

I learn quickly, so If anyone can briefly explain how to correlate the PNG image to the DAT file, and also use Pakhelper to 'pak' it all together, that'll be awesome!
Title: Re: Creating Pak Files: DAT file & PNG image corralation
Post by: vilvoh on September 03, 2011, 09:27:06 PM
The layout is the following:

(http://graphics.simutrans.com/albums/userpics/10026/Grid_64x64.gif)

The measure unit depends on the pakset, so if you are developing objects for pak128, the game engine will take squares of 128x128 pixels. In your case, the lines you mention are refering to the four views (squares) of the first top row of the image.

Check this tutorial about how to create an addon... http://www.simutrans-france.fr.nf/doku.php?id=fr:creation_daddons
Title: Re: Creating Pak Files: DAT file & PNG image corralation
Post by: odst23 on September 04, 2011, 07:48:30 PM
Thanks a bunch, that helped me a little and I fixed my PNG file accordingly, but I don't know how to use PakHelper to combine the PNG image and the Dat file into one Pak file, If you could help me in that aspect I'll basically be finished with my vehicle!
Title: Re: Creating Pak Files: DAT file & PNG image corralation
Post by: vilvoh on September 05, 2011, 12:08:18 AM
Check this tutorial about Pakhelper... http://forum.simutrans.com/index.php?topic=5007.0
Title: Re: Creating Pak Files: DAT file & PNG image corralation
Post by: odst23 on September 05, 2011, 01:28:03 AM
Where do you put the PNG image once the pak is done, because I couldn't see anything in pakhelper to combine the PNG image and DAT file, did I do something wrong or miss something? I put the pak file in simutrans, but it was like it didn't register it's existence.
Title: Re: Creating Pak Files: DAT file & PNG image corralation
Post by: vilvoh on September 05, 2011, 10:58:42 AM
Where exactly did you put the pak file? it must be inside the pakset folder. The pak file contains all the data from the source files, so once you have created it, you don't need the png or dat files. What size does de pak file have?
Title: Re: Creating Pak Files: DAT file & PNG image corralation
Post by: odst23 on September 05, 2011, 08:25:51 PM
answer to question #1: directly in the pakset folder along with the default Pak files

answer to question #2: 175 bytes
Title: Re: Creating Pak Files: DAT file & PNG image corralation
Post by: An_dz on September 06, 2011, 04:25:59 AM
175 bytes. I can say with 100% sure this pak file is broken. There's nothing inside it. A pak file easily gets 3kb.

I know what wrong, your dat have:
EmptyImage(S)=wg.0.0 - While the right is:
EmptyImage[S]=wg.0.0

Also the png file loaded will be wg.png

This site (http://www.simutrans-france.fr.nf/doku.php?id=en:tutovehicle) should give more explanation.
Title: Re: Creating Pak Files: DAT file & PNG image corralation
Post by: odst23 on September 06, 2011, 11:35:18 PM
Where do I put the PNG file in order for it to be registered as something I want packed? I put it in the folder PakHelper was in, is that right?
Title: Re: Creating Pak Files: DAT file & PNG image corralation
Post by: An_dz on September 07, 2011, 01:09:15 AM
It must be in the same folder the dat is. After compiling it's not needed anymore.
Title: Re: Creating Pak Files: DAT file & PNG image corralation
Post by: odst23 on September 07, 2011, 10:24:11 PM
I think I got it! pak file size: 3.63 kb. But, I put it in the simutrans pak folder, and played simutrans several times, correct year and month intro date, and it wasn't there
Title: Re: Creating Pak Files: DAT file & PNG image corralation
Post by: An_dz on September 08, 2011, 04:11:38 AM
It must be dropped inside the pak*** folder. Not on Simutrans root folder. Have you ever downloaded any addon?
If not, you better do this:
Go to Documents/Simutrans. Create a folder with the exact name of the folder of the pakset. Paste addons there. When you run the game you'll see a button with Load with addons, clicking it will open the pakset with all addons in the folder you created.
Title: Re: Creating Pak Files: DAT file & PNG image corralation
Post by: sharon123 on July 03, 2015, 04:18:12 PM
Do You Have PNG+Dat Rail?