From ericderkovits, on Discord:
Quote from: ericderkovitsi just noticed in your snow tile set there are 46 terrain pieces (0 to 45), but in the snow.ini it says tiles = 37 so when playing a snow level it crashes. In the snow.ini, it should say tiles = 46
My instinct here is to simply remove the need to manually index terrain pieces in the .ini.
Unlike objects, which need object-specific data to be present in the .ini on a per-object basis, terrain pieces can simply be counted. As long as the pieces are named correctly (i.e. 'nameofstyle_n' where n increases from 0 with each additional piece), the required index can be built from there.
We now count (and cache) the terrain pieces for each style, guaranteeing that the index is always up to date.
Implemented in RLPlayer commit 08996a9.