Synergy Documentation
SDK and Editing : Class System

1. Introduction
1. Home
2. About
3. F.A.Q.
2. Gameplay
1. Game Types
2. Starting a Game
3. Maintaining a Server
4. Playing the Game
5. Steam Mounts
3. SDK and Editing
1. Setting Up
2. Custom Sounds
3. Player Models
4. Custom NPCs
5. Custom NPC Sounds
6. Custom Weapons
7. Map Config Files
8. Class System
9. Life System
10. New Entities
Levels in Synergy can specify their own classes, by using class data files. These files can be found in the "maps/classes/" directory.
You can have as many classes as you wish, but it would be best to keep the classes under 10 or so.

Here is a sample class data file:

ClassData
{
    "The Test Class 1"    // class name
    {
        limit    0 // total number of players allowed to use this class
        team    0 // team number this class is for (2 = Combine, 3 = Rebels)

        jump    1.0 // jump scale
        speed    1.0 // speed scale

        health    100 // health and max health
        armor    100 // max armor

        models    // random model list
        {
            1    "male_01"
            2    "male_03"
            3    "police"
        }

        skins    // skin group list (should match value count of models)
        {
            1    0
            2    1
            3    2
        }

        skin    // skin index for model

        load    50 // weapon load for this class
        forceitems    0 // forces this class to use only specified items

        items    // items this class will spawn with (and can use)
        {
            // list of items this class will spawn with (item classname and count)
            // "weapon_crowbar" 1
            // "weapon_shotgun" 0
            // "item_battery" 3
        }
    }
}
Just a little note on the "forceitems" key. If you enable this, players using this class will not be able to drop weapons or pick up weapons that are not listed on the "items" list.
Items on this "items" list will be given to the player when spawned. However, if you wish to not give an item to the player, set it's count to "0".

For levels that have no classes, you may want to create a default class file; simply name your class data file as "default.mcd" and this file will be used automatically.

Content Copyright © Synergy Development Team
2005 - 2007