News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Help with Google SketchUp

Started by velohr, September 02, 2009, 08:22:18 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

velohr

Hello everyone!
I'm constructing buildings for a long time in SketchUp. But, I'm having some problems in converting it into a playable .pak file for pak.128 simutrans. So I'm curious if anyone could make it for me. I'll send you my models, and you should just convert it and send me it, or better, publish it here for everyone! Thank you!

Here are some of my models:
[/URL[URL=http://img143.imageshack.us/i/tower.png/]

vilvoh

Well, you're very close to the end. The hardest part is done (modeling and adding textures) so I guess the problem is the camera position, am I wrong? If not, you just need to write the dat file, and there are lots of examples along the forum. Come on, you can finish it alone.. ;)

Escala Real...a blog about Simutrans in Spanish...

velohr

Yes, modeling is easy for me, and I enjoy it, but writing the dat file is harder, and plus, I read all the instructions on simutrans wiki, but I don't get it. And makeobj isn't working on my computer...Aaaaaarghhh!
:)

vilvoh

As they're simple buildings, the dat files are really easy to create..You can use samples from the Simutrans pakset sources at the SVN repository.

For the makeobj issue, if you're a windows user the best choice is using Pakhelper.

Escala Real...a blog about Simutrans in Spanish...

velohr

Oh, could you please just make the first model for me, the church? Pleaseeeeee, just to see how does it go!!!

vilvoh

Uhm....Ok, but just that one exceptionally. :)...Please, post the png images with the right size and I'll help you with the dat file.

Escala Real...a blog about Simutrans in Spanish...

velohr



If you need anything more just say!

vilvoh

First of all, please align the building's background with the bottom of the image. After that, let's go with the dat file.. I'll code it as a curiosity building located inside the city

The whole content of the dat file

Obj=building
Name=Church
copyright=velohr
Type=cur
Passengers=5
Build_Time=150
intro_year=1410
retire_year=1960
needs_ground=1
climates=tropic,mediterran,temperate,tundra,rocky,arctic
BackImage[0][0][0][0][0][0]=church_img.0.0


Short explanation (ignoring the first three lines):

  • There're different buiding types depending on the use of the building (comercial, industrial, residential, tourist attraction, monument, etc..) In this case, the right value for Type, as we're considering it as a curiosity building, is cur.
  • After that, every curiosity building has its passengers level (Passengers) and a flag that sets up when is it going to be built according to the city population (Build_Time).
  • The intro_year and retire_year are optional, but interesting to make the object compatible with games with timeline enabled.
  • If the object's own background doesn't fill the whole tile, you must indicate the graphic engine that it has to fill the gaps with terrain background, so the proper value for needs_ground would be 1.
  • climates are also optional. If you don't set them, the object will be available in all climates.
  • Finally goes the image reference called BackImage. In this case, the object occupies a single 128-size tile, so we write just one line. You must replace church_img by the name of the church's png image. The rest of details are explained in deep at the wiki.

Copy that code in a txt file and save it with dat extension. Then, use Pakhelper to create the pak file from the dat and png files. You don't need to modify the image as it's 128x128, that means it takes a single square. If it's bigger (2x1, 3x3, etc..) you must chop it with another tool called Tilecutter.

Again, I recommend you to read the wiki carefully and try follow the examples, using the sources from the SVN to make some tests.. Practicing is the shortest way to learn.  ;)

Escala Real...a blog about Simutrans in Spanish...

velohr

like this???
I' tried to make it myself, it works, but it doesn't look good, you can see that background of the picture...:(

vilvoh

In this case, It's better to render the image and then use a program like Ms Paint, GIMP or Photoshop to correct the possible alignment problems, among many other details. See the attached png.

Btw, I forgot to mention that the img background color must be E7FFFF (it's the transparent color code in Simutrans)

Escala Real...a blog about Simutrans in Spanish...

velohr

it doesn't work...thank you for your time and help