The International Simutrans Forum

Community => Simutrans Help Center => Topic started by: jamespetts on December 23, 2008, 03:39:36 pm

Title: Having some difficulties creating ****ets
Post by: jamespetts on December 23, 2008, 03:39:36 pm
I am in the process of experimenting with creating ****ets for Pak128/PakBritain using makeobj, but I am having some difficulty in getting it to work. I managed to find an excellent .dat file template on the old forum for pak128, and I have looked at the Wiki pages, but whenever I try to create a .pak file using Makeobj and PakHelper, I end up with a rather useless 69byte file with the correct name that does not come up with a vehicle in the game. PakHelper does not produce any error messages (I can find none in the logs), so I am somewhat confused as to whether the problem is the .dat file or the .png file. I cannot find detailed information on exactly how to interact with the image files. I have not created my own image file, but am trying to use a generic image file just to test the various properties of the .dat files. So far, I have tried using one of the Czech trolleybuses, and the "vehicle-template.png" files, without any success on either occasion.

My testing .dat file is as follows:

Code: [Select]
# Generic 'bus template
# For testing purposes.
#
#
obj=vehicle
name = Generic_Bus
copyright = jamespetts
waytype = road
engine_type=diesel
freight = P****agiere
payload = 24
speed = 50
power = 100
gear = 100
weight = 4
cost = 10000
runningcost = 65
intro_year = 1750
intro_month = 1
retire_year = 1940
retire_month = 6
constraint[next][0] = none
constraint[next][1] = none
constraint[prev][0] = none
emptyimage[w]=Czech_trolleybus.0.1
emptyimage[nw]=Czech_trolleybus.0.2
emptyimage[n]=Czech_trolleybus.0.3
emptyimage[ne]=Czech_trolleybus.0.4
emptyimage[e]=Czech_trolleybus.0.5
emptyimage[se]=Czech_trolleybus.0.6
emptyimage[s]=Czech_trolleybus.0.7
emptyimage[sw]=Czech_trolleybus.0.8

Can anyone render any ****istance? I should be most grateful.
Title: Re: Having some difficulties creating ****ets
Post by: Frank on December 23, 2008, 03:46:25 pm
retire_month = 6
constraint[next][0] = none
constraint[next][1] = none
constraint[prev][0] = none

under Linux filename case sensitiv

the extension of image file must .png not .PNG
Title: Re: Having some difficulties creating ****ets
Post by: jamespetts on December 23, 2008, 03:50:11 pm
Frank,

thank you for your reply. I deleted the line as suggested, and changed the entire image filename to lowercase (and reflected that change in the .dat file), but I still get the 69 byte file.
Title: Re: Having some difficulties creating ****ets
Post by: TommPa9 on December 23, 2008, 03:52:49 pm
maybe
name = Generic_Bus
name=Generic_Bus

don't use break

Code: [Select]
obj=vehicle
cost=560000
payload=72
speed=46
weight=7
good=P****agiere
runningcost=39
name=skoda 1 tr
intro_year=1930
intro_month=1
retire_year=1938
retire_month=1
waytype=road
freight=P****agiere
engine_type=electric
power=66
copyright=TommPa9
Constraint[Prev][0]=none
Constraint[Next][0]=none

emptyimage[w]=tr.0.1
emptyimage[nw]=tr.0.2
emptyimage[n]=tr.0.3
emptyimage[ne]=tr.0.4
emptyimage[e]=tr.0.5
emptyimage[se]=tr.0.6
emptyimage[s]=tr.0.7
emptyimage[sw]=tr.0.8

Title: Re: Having some difficulties creating ****ets
Post by: jamespetts on December 23, 2008, 03:59:23 pm
TommPA9 - thank you for the suggestion. I tried that, with, I am afraid, the same 69 byte result...
Title: Re: Having some difficulties creating ****ets
Post by: Frank on December 23, 2008, 04:01:06 pm
please upload the png and dat file
Title: Re: Having some difficulties creating ****ets
Post by: DirrrtyDirk on December 23, 2008, 04:01:44 pm
The images need to go from 0.0 to 0.7 - not from 0.1 to 0.8
Title: Re: Having some difficulties creating ****ets
Post by: TommPa9 on December 23, 2008, 04:02:22 pm
TommPA9 - thank you for the suggestion. I tried that, with, I am afraid, the same 69 byte result...

is size of your .png correct?
The images need to go from 0.0 to 0.7 - not from 0.1 to 0.8

yes and no too!

i have the 0.0 not fuel.
Title: Re: Having some difficulties creating ****ets
Post by: DirrrtyDirk on December 23, 2008, 04:06:34 pm
Ah ok, when you left a blank space in the graphic, then it's correct.
Title: Re: Having some difficulties creating ****ets
Post by: TommPa9 on December 23, 2008, 04:13:08 pm
Ah ok, when you left a blank space in the graphic, then it's correct.

I know it.
Im sorry but I don't have picture of posited trolleybus yet, is't czech fire truck Škoda 706 RTHP
Title: Re: Having some difficulties creating ****ets
Post by: DirrrtyDirk on December 23, 2008, 04:17:27 pm
I just tried this
Code: [Select]
# Generic 'bus template
# For testing purposes.
#
#
obj=vehicle
name=Generic_Bus
copyright=jamespetts
waytype=road
engine_type=diesel
freight=P****agiere
payload=24
speed=50
power=100
gear=100
weight=4
cost=10000
runningcost=65
intro_year=1750
intro_month=1
retire_year=1940
retire_month=6
constraint[next][0]=none
Constraint[prev][0]=none
emptyimage[w]=Czech_trolleybus.0.1
emptyimage[nw]=Czech_trolleybus.0.2
emptyimage[n]=Czech_trolleybus.0.3
emptyimage[ne]=Czech_trolleybus.0.4
emptyimage[e]=Czech_trolleybus.0.5
emptyimage[se]=Czech_trolleybus.0.6
emptyimage[s]=Czech_trolleybus.0.7
emptyimage[sw]=Czech_trolleybus.0.8

Together with the .png from TommPa9's post above (of course renamed to Czech_trolleybus.png) and it worked (file size 10kb). So the .dat seems correct. That leaves either the picture or makeobj (which version do you use, by the way?)... or  pakhelper (which I've never used) as the problem...
Title: Re: Having some difficulties creating ****ets
Post by: jamespetts on December 23, 2008, 04:54:05 pm
I am still having trouble, I am afraid. I have downloaded MakeObj 49. I have downloaded the image very helpfully supplied by TommPa9, and renamed it "generic_vehicle.png". I have set makeobj to run from the commandline with the command: makeobj pak128 generic_bus.dat generic_bus.pak, and it still produces a 69 byte generic_bus.pak file. DirrrtyDirk - how did you get it to work?
Title: Re: Having some difficulties creating ****ets
Post by: DirrrtyDirk on December 23, 2008, 05:05:12 pm
makeobj pak128 generic_bus.dat generic_bus.pak

Try
makeobj pak128 generic_bus.pak generic_bus.dat

First .pak then .dat(s)!
Title: Re: Having some difficulties creating ****ets
Post by: Frank on December 23, 2008, 05:13:21 pm
Try
makeobj pak128 generic_bus.pak generic_bus.dat

First .pak then .dat(s)!

or simple

makeobj pak128

Title: Re: Having some difficulties creating ****ets
Post by: TommPa9 on December 23, 2008, 05:21:37 pm
or PakHelper. There is no problemm. You can download it here: http://minami-fukuoka.simutrans.net/english/pakhelper/PakHelper_3.2.zip (http://minami-fukuoka.simutrans.net/english/pakhelper/PakHelper_3.2.zip)
Title: Re: Having some difficulties creating ****ets
Post by: VS on December 23, 2008, 05:57:31 pm
Ummmmm... you do use makeobj version from release, not a home-baked latest trunk?

Are both files (png and dat) in the same folder?

What does makeobj say - does it output anything at all?

Can you try just "makeobj pak128" ?
Title: Re: Having some difficulties creating ****ets
Post by: jamespetts on December 23, 2008, 06:39:32 pm
I think that I've managed to make it work - the problem might have been that I had saved the text file as unicode. Thank you all for your help!