The International Simutrans Forum

 

Author Topic: addons restric size limit  (Read 6395 times)

0 Members and 1 Guest are viewing this topic.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2908
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
addons restric size limit
« on: September 18, 2010, 05:20:04 PM »
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.

Offline jonasbb

  • Web Team
  • *
  • Posts: 167
Re: addons restric size limit
« Reply #1 on: September 18, 2010, 05:29:04 PM »
Yes, signs can only stand on one tile.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2908
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Re: addons restric size limit
« Reply #2 on: September 18, 2010, 05:57:06 PM »
Thanks.
But there's anything I can add over road way with more than 1 tile?

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: addons restric size limit
« Reply #3 on: September 18, 2010, 06:03:09 PM »
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)...

Offline ӔO

  • Devotees (Inactive)
  • *
  • Posts: 2345
  • Hopefully helpful
  • Languages: en, jp
Re: addons restric size limit
« Reply #4 on: September 19, 2010, 01:40:58 AM »
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.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2908
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Re: addons restric size limit
« Reply #5 on: September 19, 2010, 11:05:19 PM »
@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?

Offline ӔO

  • Devotees (Inactive)
  • *
  • Posts: 2345
  • Hopefully helpful
  • Languages: en, jp
Re: addons restric size limit
« Reply #6 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.

Offline Frank

  • Inactive/Retired
  • *
  • Posts: 1431
  • Languages: DE
Re: addons restric size limit
« Reply #7 on: September 19, 2010, 11:48:00 PM »
...
@AEO
If I create a pak256 res building it becomes a 2x2 res building in a pak128?

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.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2908
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Re: addons restric size limit
« Reply #8 on: September 20, 2010, 12:42:47 AM »
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?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9569
  • Languages: De,EN,JP
Re: addons restric size limit
« Reply #9 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.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2908
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Re: addons restric size limit
« Reply #10 on: September 20, 2010, 01:52:43 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?:
Code: [Select]
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)

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: addons restric size limit
« Reply #11 on: September 20, 2010, 09:23:38 AM »
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).


Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2908
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Re: addons restric size limit
« Reply #12 on: September 20, 2010, 04:41:24 PM »
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

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: addons restric size limit
« Reply #13 on: September 20, 2010, 06:00:58 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.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2908
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Re: addons restric size limit
« Reply #14 on: September 22, 2010, 01:18:54 AM »
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?
« Last Edit: October 20, 2010, 12:27:29 AM by An_dz »

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: addons restric size limit
« Reply #15 on: September 22, 2010, 11:20:03 AM »
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).

Offline yoshi

  • Devotee
  • *
  • Posts: 133
  • PAK128.Japan Maintainer
    • pak128.Japan
  • Languages: JA
Re: addons restric size limit
« Reply #16 on: September 22, 2010, 01:46:32 PM »
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.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4603
  • Languages: EN, DE, AT
Re: addons restric size limit
« Reply #17 on: September 22, 2010, 02:07:03 PM »
could you upload png / dat?

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2908
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Re: addons restric size limit
« Reply #18 on: September 22, 2010, 05:24:55 PM »
Can anyone send me the latest makeobject that works for pak256?
I don't mind if it's a nightly.

Offline yoshi

  • Devotee
  • *
  • Posts: 133
  • PAK128.Japan Maintainer
    • pak128.Japan
  • Languages: JA
Re: addons restric size limit
« Reply #19 on: September 22, 2010, 10:11:57 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.
Code: [Select]
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 ./ ./

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4603
  • Languages: EN, DE, AT
Re: addons restric size limit
« Reply #20 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?

Code: [Select]
> ../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)

Offline yoshi

  • Devotee
  • *
  • Posts: 133
  • PAK128.Japan Maintainer
    • pak128.Japan
  • Languages: JA
Re: addons restric size limit
« Reply #21 on: September 23, 2010, 07:50:58 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.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4603
  • Languages: EN, DE, AT
Re: addons restric size limit
« Reply #22 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.

Offline yoshi

  • Devotee
  • *
  • Posts: 133
  • PAK128.Japan Maintainer
    • pak128.Japan
  • Languages: JA
Re: addons restric size limit
« Reply #23 on: September 24, 2010, 11:28:25 PM »
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.