Defining a new mode only takes a single line here:
modeID=name, description, rulesOverride, mapFilter, randomMapsAllowed
modeID - The next number available from all modes. In unmodified YR, the last number is 9, so start with 10. Don't duplicate numbers; the game will IE.
name - The name of the string with the display name of the mode. This is an entry in ra2(md).csf. Usually prefixed with GUI. This should be just a couple of words.
description - The name of the string with the description. Another entry in ra2(md).csf. Usually prefixed with STT. This should contain a single-sentence description of what changes in this mode.
rulesOverride - The filename of the override INI to use. More on this later. Include the .ini extension.
mapFilter - The group of maps allowed to be played under this mode. Creating new filters is beyond the scope of this guide; use "standard" or "teamgame".
randomMapsAllowed - Defines whether the Random Map Generator can be used on this mode. This should be "true" or "false".
For example, right under 9=GUI:TeamGame...
10=GUI:Eternal, STT:Eternal, MPEternal.ini, standard, true
Now for the more complex part. Create a new INI file and name it whatever you typed for the "rulesOverride" field. In this example, the file is named mpeternal.ini (not case sensitive, for once). This INI file you created is the equivalent of rules(md).ini for this mode only. The catch is, entries in this file override existing entries in rules(md).ini. So anything you don't want to change - probably the vast majority of the existing rules - can just be left out of this file.
For example, this is all the file has to contain to make Eternal Battle work.
[IQ] RepairSell=0; This is the building auto-repair code [GACNST]; This adds these entries onto the existing definition of GACNST Radar=yes SpySat=yes ProduceCashAmount=10 ProduceCashDelay=5 [NACNST] Radar=yes SpySat=yes ProduceCashAmount=10 ProduceCashDelay=5 [YACNST] Radar=yes SpySat=yes ProduceCashAmount=10 ProduceCashDelay=5
Just about anything that can go into rules(md).ini can go into one of these override INIs. Be careful to keep tags under the correct headings, though. A tag under [General] in rules(md).ini needs to go under a [General] section in the override file. Although I've not tested it, I believe that RP/NP entries will work just as well in one of these files.