The International Simutrans Forum

PakSets and Customization => Pak128 => Topic started by: Sij on February 20, 2019, 03:23:27 AM

Title: makeobj error
Post by: Sij 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. :)
Title: Re: makeobj error
Post by: Vladki on February 20, 2019, 07:36:34 AM
Could you share the image as well?
Title: Re: makeobj error
Post by: Sij 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.
Title: Re: makeobj error
Post by: Leartin 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"
Title: Re: makeobj error
Post by: Sij on February 22, 2019, 11:50:29 PM
So the image must be 128x128? Or 256x256?
Title: Re: makeobj error
Post by: Vladki on February 23, 2019, 01:01:14 AM
Each tile must be 128x128. The whole image size must be in multiples of 128
Title: Re: makeobj error
Post by: Sij on February 24, 2019, 01:35:22 AM
I was back at this error again. The picture is already at 128x128. :(
Title: Re: makeobj error
Post by: martin 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.
Title: Re: makeobj error
Post by: Sij on February 25, 2019, 02:28:38 AM
I made it. Thank you for your help! :)