Jump to content

GAMEMODE: Difference between revisions

875 bytes added ,  27 September 2021
Made a few changes to the "GameSettings" section, also added some information on a new flag in 3.1-alpha.
(Added a section that explains the "GameSettings" and "LockedGameSettings" feature in 3.1-alpha, and some examples showing how to use them.)
(Made a few changes to the "GameSettings" section, also added some information on a new flag in 3.1-alpha.)
Line 3: Line 3:


<pre>
<pre>
GAMEMODENAME {
GAMEMODENAME
     removeflag FLAGNAME1
{
     addflag FLAGNAME2
     RemoveFlag FLAGNAME1
     AddFlag FLAGNAME2
 
    GameSettings
    {
        flagname1 = true
        flagname2 = false
    }
 
    LockedGameSettings
    {
        flagname3 = true
    }
}
}
</pre>
</pre>
Line 34: Line 46:
*''USETEAMITEM''
*''USETEAMITEM''
*''MAPRESET_RESETS_MAPTIME''
*''MAPRESET_RESETS_MAPTIME''
*''DONTPRINTPLAYERSLEFT'' {{Devfeature|3.1|alpha}}
Prevents the "x allies/opponents left" message from being drawn on the screen.


=Gameplay and compatibility settings=
=Gameplay and compatibility settings=
Line 50: Line 64:
* '''LockedGameSettings''' - flags can never be changed, and attempting to do so will print an error message. This is useful for mods that need certain flags enabled or disabled and don't want the host to mess with those settings.
* '''LockedGameSettings''' - flags can never be changed, and attempting to do so will print an error message. This is useful for mods that need certain flags enabled or disabled and don't want the host to mess with those settings.


Flags are enabled using either <code>true</code> or <code>1</code>, or disabled using either <code>false</code> or <code>0</code>.
If you want to initialize flags universally for your mod, you can add the '''DefaultGameSettings''' or '''DefaultLockedGameSettings''' blocks at the beginning of the file, which are applied across all game modes. You may then override some of these flags by also adding them to specific game modes. Additionally, if you want to remove a flag from a game mode, use '''RemoveGameSetting''' followed by the flag's name. Flags are enabled using either <code>true</code> or <code>1</code>, or disabled using either <code>false</code> or <code>0</code>.
 
'''Note:''' loading another '''DefaultGameSettings''' or '''DefaultLockedGameSettings''' block in a subsequent GAMEMODE lump will reset all the flags and their attributes back to zero.


=Gamemode names=
=Gamemode names=