Skip to content

Increase maximum WAD and skin counts

X.organic requested to merge X.organic/Kart-Public:uint8-wads-and-skins into next

I've discussed this with @SinnamonLat before, unfortunately too close to 1.4's release. WAD and skin indices can safely use UINT8 values, so long as the limits for both are lower than 256. I can attest from experience that having 255 or 254 WAD slots works fine, and I have checked that having 255 skin slots works by saving a replay with 139 skins available, 133th skin in use in freeplay, then playing it back and letting the addons load. As such, I'm increasing the limit for both to 255 – though I'm open to further changes to both limits, so long as neither goes far below 255. This also serves as futureproofing for Ring Racers, which will make bonuschars.kart part of the core WADs and thus reduce the amount of available character slots for servers like Original Server: Do Not Steal.

If you're wondering who would use 255 WADs or 255 skins, remember that the NVJR custom build exists and people use it.

This introduces an obvious netgame incompatibility for servers, thus I'm filing this MR for next, but clients can use this change to load music WADs on a server that's maxed out on WAD slots while staying compatible, which is why this branch is based on master.

EDIT 1: Fixed some phrasing and grammar.

EDIT 2: Updated for the limit being bumped again to 255. Sorry about WAD_MUSIC, himie, you'll have to find another workaround, drop that trick, merge futurepk3 and/or help backporting addfolder.

Edited by X.organic

Merge request reports