The International Simutrans Forum

Simutrans Extended => Simutrans-Extended gameplay discussion => Topic started by: RealAmerican1776 on September 14, 2020, 07:30:59 PM

Title: Odd numbers in Makeobj 60.06
Post by: RealAmerican1776 on September 14, 2020, 07:30:59 PM
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?
Title: Re: Odd numbers in Makeobj 60.06
Post by: Vladki on September 14, 2020, 07:47:49 PM
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.
Title: Re: Odd numbers in Makeobj 60.06
Post by: RealAmerican1776 on September 14, 2020, 10:56:39 PM
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.
Title: Re: Odd numbers in Makeobj 60.06
Post by: Vladki on September 14, 2020, 11:04:55 PM
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).
Title: Re: Odd numbers in Makeobj 60.06
Post by: RealAmerican1776 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?
Title: Re: Odd numbers in Makeobj 60.06
Post by: Vladki on September 15, 2020, 12:45:42 AM
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.
Title: Re: Odd numbers in Makeobj 60.06
Post by: RealAmerican1776 on September 15, 2020, 01:10:09 AM
I see. On tilecutter, the max size is 512 and if your like me, I need tilecutter for stuff larger then a tile.
Title: Re: Odd numbers in Makeobj 60.06
Post by: prissi on September 15, 2020, 06:01:02 AM
Simutrans should handle anything also odd sizes have not been tested for zooming.
Title: Re: Odd numbers in Makeobj 60.06
Post by: RealAmerican1776 on September 15, 2020, 02:47:55 PM
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.
Title: Re: Odd numbers in Makeobj 60.06
Post by: Vladki on September 15, 2020, 04:23:22 PM
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)
Title: Re: Odd numbers in Makeobj 60.06
Post by: RealAmerican1776 on September 15, 2020, 10:53:57 PM
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.