For MaxWeight you would need to change it to behave the same as MaxItems since MaxItems already allows for custom values out of the box. You would probably need to recompile, after doing that, once.
That inclused making a variable that holds the amount of maxweight, a condition in the MaxWeight property and properly adding the maxweight variable into the serialize and deserialize methods.