News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

addons restric size limit

Started by An_dz, September 18, 2010, 05:20:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

An_dz

I'm creating an addon and can't get it to work, so I want to ask which object types have a restrictive size limit.
On my searches I found that com, res, ind and station can only be 1 tile, but there's any other that has it's restriction?
In preference I want to know if signs have it.

jonasbb

Yes, signs can only stand on one tile.

An_dz

Thanks.
But there's anything I can add over road way with more than 1 tile?

DirrrtyDirk

A way-object maybe... but that allows only start-grahic -> middle graphic (repeatedly if wanted) -> end graphic ... and only one tile wide. It would be easier if you gave us a hint of what you're trying to do - that way we could more easily say if it's possible (and how)...
  
***** PAK128 Dev Team - semi-retired*****

ӔO

one possible workaround, if you need more than one tile of painting room, is to use a larger pak size.
The only catch to this is that it can be tedious to get the alignment correct.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

An_dz

@DirrrtyDirk
Well I'm current creating a suspension bridge. I found one here at the forums but I didn't liked the model, so I want to create mine.
This version comes with lot of tiles and I don't want to create billions of pieces like that, so I thought about creating a sign so you place it on the bridge and can rotate it. It should be easier, like the start of the bridge can be the same piece for the end but rotated.

@AEO
If I create a pak256 res building it becomes a 2x2 res building in a pak128?

ӔO

yes, pak256 gives you twice the resolution, but also twice the size.

easiest way to see what happens is to put some pak128 files into pak64.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

Frank

Quote from: An_dz on September 19, 2010, 11:05:19 PM
...
@AEO
If I create a pak256 res building it becomes a 2x2 res building in a pak128?

Quote from: AEO on September 19, 2010, 11:17:05 PM
yes, pak256 gives you twice the resolution, but also twice the size.

easiest way to see what happens is to put some pak128 files into pak64.

it not full correct

res building is restrictet to one field

For the amount it is possible to use larger graphics.

For the area it is not possible. Since there are still limits or errors are displayed graphic.

An_dz

Tilecutter maximum is pak240, makeobject can't create a pak256?
It become too difficult creating what I want.
I think it's better using DirrrtyDirk suggestion way-object, I was looking pak96.comic and it comes with some stations with this feature. But it allows a height of 2?

prissi

Next makeobj (or if you compile it yourself) supports paksize up to 65535 ... so there is probably not the limitation anymore.

An_dz

Quote from: prissi on September 20, 2010, 12:59:27 AM
Next makeobj (or if you compile it yourself) supports paksize up to 65535 ... so there is probably not the limitation anymore.
:o :o :o
How much bigger than a FullHD is this? That's really huge, I think i don't need it. :D
Anyway, I'll use DirrrtyDirk suggestion, I thought here for a while and made some draws and it will be better using a way-object.
Can anyone show me an example file for a way-object with this 3 images feature? I tried looking in the wiki but didn't understood how to add the images. It should be like this?:

obj=way-object
Name=Suspension
copyright=An_dz
intro_month=5
intro_year=1920
waytype=road
cost=3000
icon=> suspension.4.5
cursor=suspension.4.6
dims=1,1,8
Image[0][0][0][0][0][0]=suspension.0.0 (North view First end)
Image[0][0][0][1][0][0]=suspension.0.0 (North view First end second height)
Image[1][0][0][0][0][0]=suspension.0.0 (East view First end)
Image[1][0][0][1][0][0]=suspension.0.0 (East view First end second height)
Image[2][0][0][0][0][0]=suspension.0.0 (South view First end)
Image[2][0][0][1][0][0]=suspension.0.0 (South view First end second height)
Image[3][0][0][0][0][0]=suspension.0.0 (West view First end)
Image[3][0][0][1][0][0]=suspension.0.0 (West view First end second height)

Image[0][1][0][0][0][0]=suspension.0.0 (North view middle)
Image[0][1][0][1][0][0]=suspension.0.0 (North view middle second height)
Image[1][1][0][0][0][0]=suspension.0.0 (East view middle)
Image[1][1][0][1][0][0]=suspension.0.0 (East view middle second height)
Image[2][1][0][0][0][0]=suspension.0.0 (South view middle)
Image[2][1][0][1][0][0]=suspension.0.0 (South view middle second height)
Image[3][1][0][0][0][0]=suspension.0.0 (West view middle)
Image[3][1][0][1][0][0]=suspension.0.0 (West view middle second height)

Image[0][2][0][0][0][0]=suspension.0.0 (North view Second end)
Image[0][2][0][1][0][0]=suspension.0.0 (North view Second end second height)
Image[1][2][0][0][0][0]=suspension.0.0 (East view Second end)
Image[1][2][0][1][0][0]=suspension.0.0 (East view Second end second height)
Image[2][2][0][0][0][0]=suspension.0.0 (South view Second end)
Image[2][2][0][1][0][0]=suspension.0.0 (South view Second end second height)
Image[3][2][0][0][0][0]=suspension.0.0 (West view Second end)
Image[3][2][0][1][0][0]=suspension.0.0 (West view Second end second height)

DirrrtyDirk

No, it doesn't work this way.

Way-objects behave (and are created) like ways, not like buildings (with the exception that ways use only "Image", while way-objects use "FrontImage" and "Backimage" paramters instead), so instead of lines like

Image[0][0][0][0][0][0]=suspension.0.0

you'd have something like

BackImage[N]=suspension.0.0

So I doubt that you will manage a height of 2 with way-objects... at least I cannot think of a way to do it spontaneously.

The japanese community produced a suspension bridge (maybe that's the one you saw) but that is quite tricky to build in game and it uses various tricks (including building stations/stops IIRC) to make things work.

I don't think there is much else you can do for a large suspension bridge with pillars of bigger height than 1... Simutrans doesn't really support things like that (yet).

  
***** PAK128 Dev Team - semi-retired*****

An_dz

Ohh, really tricky

I just wanted a 2 height to look better, but I think I can modify it to fit 1 tile, or I combine your idea with AEO's idea.
I think with a pak240 object I can create what I want. I'll post it on pak128 addons when I finally get it at least working.

But wait, that means that the images have only 2 views? S->N and W->E

DirrrtyDirk

Quote from: An_dz on September 20, 2010, 04:41:24 PM
But wait, that means that the images have only 2 views? S->N and W->E

Yes, but with separate pictures for all the ends - and that is the part that's probably interesting for you.

Way-objects are usually catenaries, for example, and they use images like that:

A-B-B-B-[...]-B-C.

Now, B is just the repetition of the same image over and over, but A and C (=the ends) can be unique.

Same is true for the other direction, you have a repeating image E and two unique images D and F.

D
|
E
|
E
|
E
|
[...]
E
|
F

Of course you don't need to actually build a tile with B (or E), just A-C or

D
|
F

also work.

But yes, it is tricky and only a work-around - you have to see for yourself if you can use it for your purposes or not. And if you want to do so, too.
  
***** PAK128 Dev Team - semi-retired*****

An_dz

#14
I think I can't create it, i will show you the first design I made.
It's a very famous bridge here in Brazil, Hercílio Luz is a historical bridge built to connect Florianópolis to the continent.
Here are some screens:
Pic1 Pic2 Pic3

What I can do to make this placeable on Simutrans? Any help?

DirrrtyDirk

Wow, what a project!  :o

Ok, it is (or at least it should be) technically possible to do this in Simutrans.

BUT:

It might require a lot of work, and it would probably be very tricky - both, to create and to build in game.

It also depends on how strictly you want to stick to the original. Some deviations there might make a few things a little easier and more versatile as well... Let's face it: if you want to use something like your graphic (which is nice by the way) 1:1, you'd have to do what the japanese community did: use stations on the basic bridge, one for each tile. And basically this would require the bridge to be built in game with one specific length only (as any single tile shorter or longer would distort the look).
However, if you decide to allow some of the cables' angles to be changed... then it might work with stations just for the area of the pillars, making things easier to build and allow for different lengths (within limits) in game as well...

As I said: a lot of work. And it might still come to the point where you find out it really doesn't work after all (or at least not well enough for you to be happy with the result).
  
***** PAK128 Dev Team - semi-retired*****

yoshi

Quote from: prissi on September 20, 2010, 12:59:27 AM
Next makeobj (or if you compile it yourself) supports paksize up to 65535 ... so there is probably not the limitation anymore.

I have downloaded rev. 3806 and compiled makeobj. It worked fine with pak64, 128, and 192, but not for 384. Is there a newer version? Or did I do something wrong.

I want to make such a bridge.
http://en.wikipedia.org/wiki/Cable-stayed_bridge
This should be easier than a suspension bridge to create in Simutrans.

Dwachs

Parsley, sage, rosemary, and maggikraut.

An_dz

Can anyone send me the latest makeobject that works for pak256?
I don't mind if it's a nightly.

yoshi

Quote from: Dwachs on September 22, 2010, 02:07:03 PM
could you upload png / dat?

Dat
http://simutrans-germany.com/files/upload/hashi160.dat
PNG for pak384
http://simutrans-germany.com/files/upload/hashi160.png
PNG for pak128 (this worked)
http://simutrans-germany.com/files/upload/hashi160_128.png


Error message I have got when I tried to make pak384 object.

Makeobj version 51 for simutrans 102.3 Nightly and higher
(c) 2002-2006 V. Meyer , Hj. Malthaner, M. Pristovsek (markus@pristovsek.de)


   Usage:
      MakeObj CAPABILITIES
         Gives the list of objects, this program can read
      MakeObj PAK <pak file> <dat file(s)>
         Creates a ready to use pak file for Simutrans from the dat files
      MakeObj pak128 <pak file> <dat file(s)>
         Creates a special pak file for with 128x128 images
         Works with PAK16 up to PAK255 but only 32 to 192 are tested
      MakeObj LIST <pak file(s)>
         Lists the contents ot the given pak files
      MakeObj DUMP <pak file> <pak file(s)>
         List the internal nodes of a file
      MakeObj MERGE <pak file library> <pak file(s)>
         Merges multiple pak files into one new pak file library
      MakeObj EXTRACT <pak file archieve>
         Creates single files from a pak file library

      with QUIET as first arg copyright message will be omitted
      with a trailing slash a direcory is searched rather than a file
      default for PAK is PAK ./ ./

Dwachs

I compiled makobj, and got the following result. Lots of warnings, but a pak file of 74kB was written. Maybe you missed the 'pak384' argument?


> ../makeobj pak384

Makeobj version 51 for simutrans 102.3 Nightly and higher
(c) 2002-2006 V. Meyer , Hj. Malthaner, M. Pristovsek (markus@pristovsek.de)

Image size is set to 384x384
writing invidual files to ./
   reading file ./hashi160.dat
   writing file ./bridge.hashi160.pak
      packing bridge.hashi160
WARNING: not frontimage[ns] specified (but might be still working)
WARNING: not frontimage[ew] specified (but might be still working)
WARNING: not frontstart[n] specified (but might be still working)
WARNING: not frontstart[s] specified (but might be still working)
WARNING: not frontstart[e] specified (but might be still working)
WARNING: not frontstart[w] specified (but might be still working)
WARNING: not frontramp[n] specified (but might be still working)
WARNING: not frontramp[s] specified (but might be still working)
WARNING: not frontramp[e] specified (but might be still working)
WARNING: not frontramp[w] specified (but might be still working)
Parsley, sage, rosemary, and maggikraut.

yoshi

Quote from: Dwachs on September 23, 2010, 07:18:06 AM
I compiled makobj, and got the following result. Lots of warnings, but a pak file of 74kB was written. Maybe you missed the 'pak384' argument?

These warning messages are exactly the same as I have received when I paked the pak128 version.
I don't think I missed "pak384" argument. But, OK, I think I have done something wrong.
I will recompile makeobj and retry. Thanks for your help.

By the way, I'm on Windows XP and using MinGW to compile.

Dwachs

Actually, prissi silently fixed a bug :) Please update the source code to revision 3822. This should fix it. I used makeobj rev 3822 above.
Parsley, sage, rosemary, and maggikraut.

yoshi

Quote from: Dwachs on September 23, 2010, 08:15:08 AM
Actually, prissi silently fixed a bug :) Please update the source code to revision 3822. This should fix it. I used makeobj rev 3822 above.

I tried with rev. 3826 and the pak384 bridge was paked. But apparently the makeobj ignores the image offset.