I'd have to see it, but make sure your class variant is for Rogues first. It should count as a Rogue. Also, make sure it is not removing any class features.
As for the special ability, it depends on what the magic item does. If you don't need a script for the magic item, then you can create a special that you bootstrap to the class variant. Have this special show in charges and use a script to determine how may charges. Something like:
Code:
field[hTotal].value = round(#levelcount[Rogue]/2,0,-1)
It will need to run post-levels.
If you need a script for the magic item itself you'll have to say what it does.