News:

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

Odd numbers in Makeobj 60.06

Started by Ronin1996, September 14, 2020, 07:30:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ronin1996

Hello, I was just working on a house for pak256-release-2.0.3.0 and I accidentally punched in pak267 instead of pak256 in makobj. Now, the thing is, makeobj didnt crash or say it was unable to do it but instead it just said FATAL ERROR: while loading PNG - Invalid image size in ./traditional house 4 n.png. My question is, can we create things with odd numbers like 267 and have it work in Simutrans?

Vladki

I'm not sure if odd number is a problem or not. But the message you got was, because the size of PNG you referenced in dat file, was not a multiple of 267 pixels.

Ronin1996

Right, so what if we can get a png to that number. We would have to multiply 256 by a decimal in order to get 267. If we can get the image size to 267, will it work? I've always been told we couldn't do it. It has to be a multiple of two, so 64 times two is 128, while 128 times two is 256 etc.

Vladki

The easiest way is to try it. Existing pak sizes are 32, 48, 64, 96, 128, 192 and 256. So they do not have to be powers of 2. If anything, a multiple of 16 may be needed, as there are 16 "steps" in tile used for vehicle lenghts (and maybe movements too).

Ronin1996

So let me get this straight, 128 times 16 is 2048, are you telling me we can have a pak.2048?

Vladki

Quote from: TheRoadmaster1996 on September 14, 2020, 11:16:37 PM
So let me get this straight, 128 times 16 is 2048, are you telling me we can have a pak.2048?
No, I have not said anything like that. I think that there used to be limit 255 but it was raised so that pak 256 is possible now.
I don't know if a pakset size has to be a multiple of any value. Just suggesting that it may be good to keep it a multiple of 16.

Ronin1996

I see. On tilecutter, the max size is 512 and if your like me, I need tilecutter for stuff larger then a tile.

prissi

Simutrans should handle anything also odd sizes have not been tested for zooming.

Ronin1996

I feel like the tiles would also be off as well which would mean the buildings would be out of scale so maybe it's not a good idea.

Vladki

What are you trying to achieve?

Make whole new pakset with some odd tile size?
Or just make an object that is larger than one tile?

If you want a multi tile building just cut it using tilecutter, and use the same tile size as the rest of pakset.

Use tile size bigger than the rest of pakset, only if you are making big vehicles (planes and ships)

Ronin1996

No, I wasn't trying to do that. I just found it interesting that Makeobj didn't say it couldn't do it. So I wanted to bring it to the forum for conversations and ideas about it. I've always been told that you couldn't do it and it had to be a multiple of two.