• Welcome to MX Bikes Official Forum. Please login or sign up.
 
September 19, 2020, 12:55:42 AM

News:

MX Bikes beta14e available! :)


Mod file size optimization

Started by Some_Doofus, September 07, 2020, 06:10:30 PM

Previous topic - Next topic

Some_Doofus

I've always thought the way paints for bikes and gear are handled is pretty poorly optimised, but crunching some numbers on my last KTM skin I've realised it's worse than I thought.

The issue comes up when your skin has multiple colourways with the same base/normals/reflection, and even worse when these skins are put in multiple bikes folders.

For example, for my last KTM skin I had the diffuse for the livery, metals and 2t engine, with normals and reflection maps for each one, along with wheels and chain which I didn't touch, which is 11 files for 1 skin (could be more with stand etc.). I had 4 colourways, and put them on all of the 6 KTMs, so all up thats 264 files totaling 822mb. The issue is the vast majority of these files are just copies. All the norms, reflections, 2t engine, wheels and chain files are the same for every skin. The only thing I changed for each one was the livery and metals diffuse. So really, there's only 17 unique files (~40mb when packed) and 247 unnecessary copies.

My suggestion is we use a base skin that has all the norms, reflection, metals etc. and have separate files for different colourways that only contain the files that are different from the base (livery/metals diffuse). On top of this we could pair each skin with a config file that tells the game which bikes can use the skin, so in the file you have a list of the compatible bikes and a true/false option for each bike. This way you would only need one copy of each skin but could still use it on every compatible bike.

I know this would require a lot of work from devs/content creators/players to implement, but with mods folders getting up to 50+GB for some people I think it's worth looking into. It would allow us to download a lot more mods which encourages creators and we'd be able to see everyone looking sexy online too, which is the main reason I have so many mods downloaded.

I also think that this should come with some improvements to the sorting of mods ingame. When you've got heaps installed it gets messy and hard to find specific skins. I'd like to see filters or sorting options or more categories, and a favourites function would be very useful.