Best way to set or read global property?

I am extending a mod someone else wrote. In that mod, a button increments a global variable “Res_Roman” by 1 when it is pressed. I can emulate the button press in code, so that the value goes up by 1, by using the named key command associated with the button. There is also a decrement button, so I achieve any desired value, but it is clumsy.

What would be the appropriate way to set the value of “Res_Roman” directly?

Similarly, how do I find out the current value of “Res_Roman”?

Thanks for any help you can provide.