The International Simutrans Forum

 

Author Topic: makeobj error  (Read 1551 times)

0 Members and 1 Guest are viewing this topic.

Offline Sij ph

  • *
  • Posts: 5
  • Languages: PH, EN
makeobj error
« on: February 20, 2019, 03:23:27 AM »
Good day! I need some help for making a modified pak128 addon. I don't know how to fix the error. Any response will be appreciated. :)
« Last Edit: February 20, 2019, 03:36:48 AM by Sij »

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2737
    • My addons, mostly roadsigns
  • Languages: EN, CS
Re: makeobj error
« Reply #1 on: February 20, 2019, 07:36:34 AM »
Could you share the image as well?

Offline Sij ph

  • *
  • Posts: 5
  • Languages: PH, EN
Re: makeobj error
« Reply #2 on: February 20, 2019, 12:27:23 PM »
This is the image of the object. Originally, this is for pak64. I could just use resizeobj. But I chaged the maximum speed of the road itself. So I must use makeobj.

Offline Leartin at

  • Devotee
  • *
  • Posts: 1281
  • PAK-DEV P192C
  • Languages: DE, EN
Re: makeobj error
« Reply #3 on: February 20, 2019, 01:53:48 PM »
Using "makeobj pak128" tells makeobj to cut the graphics in tiles, 128px². Since the tiles in the graphics are only 64px², the third tile in the first row would be outside the graphic provided, hence an error.

You need to resize the graphic. If you want to keep the exact same graphic, you can resize with nearest-neighbour - that's what ms paint uses, so just changing size to 200% would suffice. To perhaps get a slightly better quality, you might try out a specialized tool with different upscaling algorithms: https://code.google.com/archive/p/2dimagefilter/downloads - however, in the end, upscaling will never look as good as a graphic made in the right size, so don't expect quality beyond "acceptable in a pinch"

Offline Sij ph

  • *
  • Posts: 5
  • Languages: PH, EN
Re: makeobj error
« Reply #4 on: February 22, 2019, 11:50:29 PM »
So the image must be 128x128? Or 256x256?

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2737
    • My addons, mostly roadsigns
  • Languages: EN, CS
Re: makeobj error
« Reply #5 on: February 23, 2019, 01:01:14 AM »
Each tile must be 128x128. The whole image size must be in multiples of 128

Offline Sij ph

  • *
  • Posts: 5
  • Languages: PH, EN
Re: makeobj error
« Reply #6 on: February 24, 2019, 01:35:22 AM »
I was back at this error again. The picture is already at 128x128. :(

Offline martin

  • Web Team
  • Devotee
  • *
  • Posts: 66
  • Languages: EN, NL, DE
Re: makeobj error
« Reply #7 on: February 24, 2019, 02:53:43 PM »
the provided image is 4 tiles wide by 7 tiles high. So total image size should be:  4 x 128 pixels by 7 x 128 pixels for pak128. Otherwise makeobj will fail and throw an error.

Offline Sij ph

  • *
  • Posts: 5
  • Languages: PH, EN
Re: makeobj error
« Reply #8 on: February 25, 2019, 02:28:38 AM »
I made it. Thank you for your help! :)