MV Show Picture Dynamic Spacing

So I have a chest, that contains random 3 to 7 items. Then when I open the chest, the chest is filled up at random selecting values from an array (filled with item IDs from database). Then, the object,s picture all are shown in a single row. I use the show picture with "reward"+ID for the picture name. I got the spacing coordinates x and y for the odd number sizes, but it gets tedious to adjust for the even number size. Like i need to use the array.length to determine which group of coordinates to use.

is there a way to make them display themselves automatically in the screen? The pictures are 98 x 98 pixels and the spacing should be 20 pixels. They will all be displayed in 1 row.

here's a sample image

1635719958241.png
So I have a chest, that contains random 3 to 7 items. Then when I open the chest, the chest is filled up at random selecting values from an array (filled with item IDs from database). Then, the object,s picture all are shown in a single row. I use the show picture with "reward"+ID for the picture name. I got the spacing coordinates x and y for the odd number sizes, but it gets tedious to adjust for the even number size. Like i need to use the array.length to determine which group of coordinates to use.

is there a way to make them display themselves automatically in the screen? The pictures are 98 x 98 pixels and the spacing should be 20 pixels. They will all be displayed in 1 row.
Do you have a concept/sample picture of how it should look like? I am having a hard time picturing this :/
Currently I am imagining this:
1635702232419.png

So you start the chest event and then 3-7 random items are selected as loot and then it is displayed in a row in a message window? Or similar?
Do you have a concept/sample picture of how it should look like? I am having a hard time picturing this :/
Currently I am imagining this:
View attachment 205410
So you start the chest event and then 3-7 random items are selected as loot and then it is displayed in a row in a message window? Or similar?


this one from kuro dcupu

Original thread: https://forums.rpgmakerweb.com/threads/show-picture-dynamic-spacing.141692/