News:

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

About pak the vehicle

Started by alexko, May 29, 2015, 01:16:14 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

alexko

When I  follow the step to pak my aircraft into pak file, however, it is not successful. May I ask whether the step is correct or not?

Step 1: use base colour of RGB 231,255,255 with 1024px x 128px
Step 2: draw 8 directions of the aircraft
Step 3: use notepad to enter data and save as .dat file
Step 4: create a new file and copy the .dat file into the new file
Step 5: create new file and copy the aircraft into new file
Step 6: save as .png file in the new file
Step 7: use 128.bat to create pak file

Ters

Sted 4 and 5 makes no sense to me, although your mention of 128.bat suggest you use some tool that is not part of core Simutrans.

You draw something in a certain way and save it as png, you write some (cryptic) commands in a .dat file in the same directory using a plain text editor of your choice, then you run makeobj (somehow) on the dat file. That's how it works. Other tools may hide these details. I don't know about them.

alexko

Quote from: Ters on May 29, 2015, 02:28:40 PM
Sted 4 and 5 makes no sense to me, although your mention of 128.bat suggest you use some tool that is not part of core Simutrans.

You draw something in a certain way and save it as png, you write some (cryptic) commands in a .dat file in the same directory using a plain text editor of your choice, then you run makeobj (somehow) on the dat file. That's how it works. Other tools may hide these details. I don't know about them.

Would you mind to recommend which software can be used to test whether the pak can be worked or not?

Ters

Quote from: alexko on June 02, 2015, 02:22:57 AM
Would you mind to recommend which software can be used to test whether the pak can be worked or not?

I can't. I don't know of any. All I have used is makeobj, plus the simple (to someone who know such concepts) build system of pak64. They don't test anything, they compile the pak (set) or fail trying.

gauthier

Step 4,5,6: could you explain why are you doing those ?

Could you upload your .dat file and also 128.bat please ?

alexko

#5
Quote from: gauthier on June 02, 2015, 09:07:35 AM
Step 4,5,6: could you explain why are you doing those ?

Could you upload your .dat file and also 128.bat please ?

my content of dat file

#Airbus A330-200   
#Passenger intercontinental/continental transport
#-------------------------------------------------------------------------------
obj=vehicle
name=Dragonair_A330
waytype=air
engine_type=diesel
freight=Passagiere
copyright=Alex
payload=250
speed=920
power=23000
weight=120
gear=80
cost=1000000
runningcost=500
intro_year=1900
intro_month=4
sound=5
smoke=-1
Constraint[Prev][0]=none
Constraint[Next][0]=none
EmptyImage[W]=HKA_A330.1.0,-24,-36
EmptyImage[NW]=HKA_A330.1.1,-24,-36
EmptyImage[N]=HKA_A330.1.2,-24,-36
EmptyImage[NE]=HKA_A330.1.3,-24,-36
EmptyImage[E]=HKA_A330.1.4,-24,-36
EmptyImage[SE]=HKA_A330.1.5,-24,-36
EmptyImage=HKA_A330.1.6,-24,-36
EmptyImage[SW]=HKA_A330.1.7,-24,-36




May I ask that would someone could help me to convert the file into pak 128?

gauthier

Ok now I understand about your private message ... There's no need to send me a message if you put things here. Please avoid double posts too, you can edit your posts.

Your dat file looks right. Could you also copy here your file named "128.bat" along with your source image if possible ?

gauthier

The answer was easy but I did not pay enough attention to the dat file. The problem is in your image references, the first line of the image is 0, not 1, so that could not work. I attached the corrected dat file. Also take care of the image name, it is not the same in the .dat file you wrote.

I also advise you to update your makeobj, and to use 24 bits png (without alpha channel) instead of 32. Latest version of makeobj ignores alpha channel but if you had succeeded with your current version, you would have encountered this problem.

In your .bat file, add a file descriptor redirection to get error messages in a text file at the end of makeobj's execution. This would have told you the error immediatly.
Quotemakeobj pak128 ./ ./ 2>err.txt
Actually you could even just write
Quotemakeobj pak128 2>err.txt

Finally, some graphical advice: you rendered your plane so it faces wrong directions in game. On North-West and South-East (the horizontal ones) views, your plane even looks like leaning dangerously. Also you should notice that in pak128 planes are compiled as pak176 objects so the plane can be bigger. I'm not sure of how to do it but I assume that replacing "pak128" with "pak176" in your command line is enough.

alexko

When I run it, it seems like that.
How to tackle with the issue?
Is it my computer's problem?

p.s: Thanks for gauthier's help. It is difficult to make the plane's pak file.

gauthier

Don't worry, it's always difficult for beginners ;)

Your plane is too high on the source image or has a very bad offset in the .dat file. Check both. Explanation about offset here.

alexko

#10
After the adjustment, it also can't work

p.s: is there some software for me to check whether the content of .dat file is correct or not?
       And Is there some website or aircraft pak files?

Sorry for my mistake because i forgot to upload my file

An_dz


gauthier

Quoteit also can't work
If you want precise help, you will have to post precise description of your problem. Why can't it work ? Makeobj does not compile ? The plane does not appear in game ? something else ?

I don't know any software to check dat files, just run makeobj and see if there is any error message in the final report (err.txt if you use the commande "makeobj pak128 2>err.txt").

If you look for pak128's planes, they are here.

alexko

Thx for all your help
Got successful for the pak

Next target maybe try to pak A330 of hong kong airlines (more difficult on painting and drawing)

anglababy