Your game mode classes should all derive from RangeGameModeBase if it contains base class functions the derived class will need to use.
To dynamically specify which game mode to open a level with, you can use the options parameter to change the game mode you want the level to use.
This forum question should get you moving in the right direction.