News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

Odd numbers in Makeobj 60.06

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

0 Members and 1 Guest are viewing this topic.

RealAmerican1776

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?

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.

RealAmerican1776

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.

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).

RealAmerican1776

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

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.

RealAmerican1776

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.

RealAmerican1776

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.