Besides the user configurable Name and Description fields in a variant, the variant itself also has three base string values that the variant editor uses (these values are not configurable by the user). I'll just get this out of the way, as it's just interesting to note: all the variant's various strings can be defined for all supported locales (ie, English, Spanish, etc). Those three "base" string values I talked about are the Name, Description, and Category. The base name would be like "CTF" or "Slayer". The category is how the UI sorts the variant into somewhat neat little lists. Of course, that shit gets really painful to browse when you have dozens of variants in one category.
The variant also has user options. These options are what the player can edit. The megalo script itself uses these options in the actual trigger logic. An example of a user option would be "Flag Carrier Cooldown", in the case of CTF. THe variant can also define "hidden" options. These aren't configurable by the player, but a game designer up in the Ivory Tower, can. An example of where they use "hidden" options is in the Slayer variant. They have a game type option, which has options like 'SWAT' or 'Bro Slayer'. This enables them to easily build on and add to the base Slayer variant.
The variant also defines its engine icon, so that's not actually a fixed thing. Potentially, you could have a Slayer variant display with a CTF-style icon.
Building on how customizable Megalo variants are (at least to the game designers), they can easily define variant specific game statistics. For example, CTF has a statistic for flag returns. It's all defined by the megalo variant itself, it's not hardcoded.
Getting a little bit deeper, the variant can also define objects which a map variant must have placed. If the map variant doesn't have any instances of these expected objects, then that's when you run into the "this map isn't compatible with this variant blah blah" message.
There are obviously HUD widgets too (eg, the speedometer in Race), but I haven't really gave them too much of my attention.
The actual script part of a Megalo variant is pretty frickin' crazy. However, I'll save that for a future post
