Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Rounded RenPy GUI Kit

A rounded GUI kit for your RenPy projects. · By NovelKit

Fix for broken pagination in gallery & music room

A topic by wrecked3d created 74 days ago Views: 28
Viewing posts 1 to 1

Hi! The pagination on the music room and the gallery currently breaks the code if you put enough galleries or music files in it to have more than one page. It is calculating how many pages are needed wrongly and crashing the game because it feeds a float to the pagination instead of an integer (asking the game to i.e. create 2,07 pages instead of 2). It's a simple fix:

In line 88 of music_room.rpy and line 99 of gallery.rpy, simple add round() around the $pages variable calculation.

This means line 88 of the music room should look like this:

$ pages = round(((len(music_room.tracks)) / mr_cells) + 1)

And line 99 of the gallery should look like this:

$ pages = round(((len(gallery_thumbnails)) / gal_cells) + 1)


Just wanted to share this for anyone bumping into this issue!