The International Simutrans Forum

 

Author Topic: Odd numbers in Makeobj 60.06  (Read 449 times)

0 Members and 1 Guest are viewing this topic.

Offline TheRoadmaster1996

  • *
  • Posts: 224
  • Languages: EN, some ES
Odd numbers in Makeobj 60.06
« 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?

Offline Vladki

  • Devotee
  • *
  • Posts: 3409
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Odd numbers in Makeobj 60.06
« Reply #1 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.

Offline TheRoadmaster1996

  • *
  • Posts: 224
  • Languages: EN, some ES
Re: Odd numbers in Makeobj 60.06
« Reply #2 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.

Offline Vladki

  • Devotee
  • *
  • Posts: 3409
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Odd numbers in Makeobj 60.06
« Reply #3 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).

Offline TheRoadmaster1996

  • *
  • Posts: 224
  • Languages: EN, some ES
Re: Odd numbers in Makeobj 60.06
« Reply #4 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?

Offline Vladki

  • Devotee
  • *
  • Posts: 3409
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Odd numbers in Makeobj 60.06
« Reply #5 on: September 15, 2020, 12:45:42 AM »
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.

Offline TheRoadmaster1996

  • *
  • Posts: 224
  • Languages: EN, some ES
Re: Odd numbers in Makeobj 60.06
« Reply #6 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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10147
  • Languages: De,EN,JP
Re: Odd numbers in Makeobj 60.06
« Reply #7 on: September 15, 2020, 06:01:02 AM »
Simutrans should handle anything also odd sizes have not been tested for zooming.

Offline TheRoadmaster1996

  • *
  • Posts: 224
  • Languages: EN, some ES
Re: Odd numbers in Makeobj 60.06
« Reply #8 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.

Offline Vladki

  • Devotee
  • *
  • Posts: 3409
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Odd numbers in Makeobj 60.06
« Reply #9 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)

Offline TheRoadmaster1996

  • *
  • Posts: 224
  • Languages: EN, some ES
Re: Odd numbers in Makeobj 60.06
« Reply #10 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.