Let GET_RESOURCE_KVP_* have a default value

Currently using GET_RESOURCE_KVP_* you have to handle if the kvp isn’t set, which is fine for GetResourceKvpString as it defaults to nil, but trying to use it with GetResourceKvpInt which defaults to 0, it ruins one of the use cases that I wanted to use it for, as I wanted to use it as a boolean, which is default to true, but there’s no way to tell if it got set to 0 as default or by the end user.

What I’m proposing is basically exactly like GetConvarInt, where the first argument is the convar and the second is the default value

Example:
GetResourceKvpInt('pma-voice_enableRadioClicks', 1)

2 Likes

I know this is old, but any workarounds?
I could really use the option to set a default value…