Difference between revisions of "Team configs"
Splittingred (Talk | contribs) |
Splittingred (Talk | contribs) m (→Example Configuration) |
||
(10 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Team config files are CFG files that load specific settings for each team in KAG. They are usually named "team1.cfg" and "team2.cfg". | Team config files are CFG files that load specific settings for each team in KAG. They are usually named "team1.cfg" and "team2.cfg". | ||
+ | '''NOTE''': When editing .cfg and .gm files, ''make sure'' to copy them to a separate Rules/ subfolder with your own gamemode. Otherwise, they will get automatically overwritten during KAG updates. | ||
+ | |||
+ | == Example Configuration == | ||
An example team1.cfg might look like this: | An example team1.cfg might look like this: | ||
− | <syntaxhighlight lang=" | + | <syntaxhighlight lang="actionscript" enclose="div"> |
classes = Rules/CTF/builder.cfg; Rules/CTF/knight.cfg; Rules/CTF/archer.cfg | classes = Rules/CTF/builder.cfg; Rules/CTF/knight.cfg; Rules/CTF/archer.cfg | ||
Line 49: | Line 52: | ||
| | | | ||
| References to location of class configuration files (.cfg), delimited by semi-colon ';'. | | References to location of class configuration files (.cfg), delimited by semi-colon ';'. | ||
+ | |- | ||
+ | | spawn_type | ||
+ | | int | ||
+ | | 0 | ||
+ | | Usually set to 0 for player-based teams. For AI teams, 1 will spawn Actors at random places, 2 will set it to a specific "hot" spot to spawn at. | ||
|- | |- | ||
| emblem | | emblem | ||
Line 125: | Line 133: | ||
You can create any sort of team configuration for your mod by adjusting the variables above. | You can create any sort of team configuration for your mod by adjusting the variables above. | ||
+ | === Unlimited Score Limit === | ||
+ | |||
+ | To give the team an unlimited score limit, simply set score_limit to 0: | ||
+ | <syntaxhighlight lang="actionscript" enclose="div">score_limit = 0</syntaxhighlight> | ||
+ | |||
+ | === Adjusting Unit Counts === | ||
+ | |||
+ | Unit counts are determined proportionally by player counts on the server. For example, if I had 8 players on the server, and my "unit_count" was set to 10, each match would start with a unit count (or "tickets" as they are referred to in-game) of 80. | ||
+ | |||
+ | If you want to restrict to only one life, you can set unit_count to 0: | ||
+ | |||
+ | <syntaxhighlight lang="actionscript" enclose="div">unit_count = 0</syntaxhighlight> | ||
+ | |||
+ | Or, if you want to enable unlimited units, set unit_count to -1 | ||
+ | |||
+ | <syntaxhighlight lang="actionscript" enclose="div">unit_count = -1</syntaxhighlight> | ||
+ | |||
+ | This will give the class unlimited units, meaning that the round will not end until a time or score limit is reached. | ||
+ | |||
=== Limiting Classes === | === Limiting Classes === | ||
Let's say you wanted to build a team that could use archer and builder only. You'd simply remove the builder from the classes list: | Let's say you wanted to build a team that could use archer and builder only. You'd simply remove the builder from the classes list: | ||
− | < | + | <syntaxhighlight lang="actionscript" enclose="div"> |
classes = Rules/CTF/knight.cfg; Rules/CTF/archer.cfg; | classes = Rules/CTF/knight.cfg; Rules/CTF/archer.cfg; | ||
− | </ | + | </syntaxhighlight> |
What if I wanted knight and archer for everyone but superadmins, which could have builder as well? Then you'd leave the classes variable with all 3: | What if I wanted knight and archer for everyone but superadmins, which could have builder as well? Then you'd leave the classes variable with all 3: | ||
− | < | + | <syntaxhighlight lang="actionscript" enclose="div"> |
classes = Rules/CTF/builder.cfg; Rules/CTF/knight.cfg; Rules/CTF/archer.cfg | classes = Rules/CTF/builder.cfg; Rules/CTF/knight.cfg; Rules/CTF/archer.cfg | ||
− | </ | + | </syntaxhighlight> |
And then in your security levels files, in "Security/premium.cfg" and "Security/normal.cfg", you'd put in the "features" list: | And then in your security levels files, in "Security/premium.cfg" and "Security/normal.cfg", you'd put in the "features" list: | ||
− | < | + | <syntaxhighlight lang="actionscript" enclose="div">no_class_builder; no_class_runner;</syntaxhighlight> |
This tells KAG to not allow builders for anyone who is just a normal (non-gold) or premium player. Admins, VIPs, guards and superadmins would get the ability to use the builder class. | This tells KAG to not allow builders for anyone who is just a normal (non-gold) or premium player. Admins, VIPs, guards and superadmins would get the ability to use the builder class. | ||
+ | |||
+ | = See also = | ||
+ | * [[gamemode.cfg]] | ||
+ | * [[MapCycle.cfg]] | ||
+ | * [[class configs]] | ||
+ | |||
+ | [[Category:Modding]] |
Latest revision as of 15:10, 9 January 2013
Team config files are CFG files that load specific settings for each team in KAG. They are usually named "team1.cfg" and "team2.cfg".
NOTE: When editing .cfg and .gm files, make sure to copy them to a separate Rules/ subfolder with your own gamemode. Otherwise, they will get automatically overwritten during KAG updates.
Contents
Example Configuration
An example team1.cfg might look like this:
name = Blue Team
emblem = GUI/emblem1.png
teamcolor = 29; 133; 171
unit_count = 6 # units in team = unit_count * number of players; 0 one life; -1 unlimited
score_limit = 1 # score_limit; 0 no limit
spawn_type = 0
stone_warmup = 1500
wood_warmup = 2500
gold_warmup = 100
arrows_warmup = 500
bombs_warmup = 0
stone_amount = 150
wood_amount = 250
gold_amount = 10
arrows_amount = 40
bombs_amount = 0
This gives the Blue Team a normal lives limit, sets the score limit for the team to 1, and gives them some resources during the warmup period.
Config Variables
There are special configuration variables available to team config files. They are:
Name | Type | Default Value | Description |
---|---|---|---|
name | string | "Default team" | Team name to be shown on scoreboard, team swap menu, and displayed after match is won. |
classes | string ARRAY | References to location of class configuration files (.cfg), delimited by semi-colon ';'. | |
spawn_type | int | 0 | Usually set to 0 for player-based teams. For AI teams, 1 will spawn Actors at random places, 2 will set it to a specific "hot" spot to spawn at. |
emblem | string | Reference to location of image to be associated with team (.png) | |
teamcolor | Color | RGB Value that defines the color of team. Affects player character sprites and scoreboard colors. | |
unit_count | f32 | Amount of units (lives/respawns) for team. Value is multiplied by amount of players. 0 = no respawns, -1 = unlimited respawns. | |
score_limit | u16 | 1 | Number of times the enemy flag has to be captured to win. |
stone_warmup | int | 0 | Size of stone pile by tent when a new match begins. Slowly depletes. |
wood_warmup | int | 0 | Size of wood pile by tent when a new match begins. Slowly depletes. |
gold_warmup | int | 0 | Size of gold pile by tent when a new match begins. Slowly depletes. |
arrows_warmup | int | 0 | Size of arrow pile by tent when a new match begins. Slowly depletes. |
bombs_warmup | int | 0 | Size of bomb pile by tent when a new match begins. Slowly depletes. |
stone_amount | int | 100 | Amount of stone a player may take from the warmup-pile at one time. |
wood_amount | int | 200 | Amount of wood a player may take from the warmup-pile at one time. |
gold_amount | int | 50 | Amount of gold a player may take from the warmup-pile at one time. |
arrows_amount | int | 25 | Amount of arrows a player may take from the warmup-pile at one time. |
bombs_amount | int | 1 | Amount of bombs a player may take from the warmup-pile at one time. |
Customizing
You can create any sort of team configuration for your mod by adjusting the variables above.
Unlimited Score Limit
To give the team an unlimited score limit, simply set score_limit to 0:
Adjusting Unit Counts
Unit counts are determined proportionally by player counts on the server. For example, if I had 8 players on the server, and my "unit_count" was set to 10, each match would start with a unit count (or "tickets" as they are referred to in-game) of 80.
If you want to restrict to only one life, you can set unit_count to 0:
Or, if you want to enable unlimited units, set unit_count to -1
This will give the class unlimited units, meaning that the round will not end until a time or score limit is reached.
Limiting Classes
Let's say you wanted to build a team that could use archer and builder only. You'd simply remove the builder from the classes list:
What if I wanted knight and archer for everyone but superadmins, which could have builder as well? Then you'd leave the classes variable with all 3:
And then in your security levels files, in "Security/premium.cfg" and "Security/normal.cfg", you'd put in the "features" list:
This tells KAG to not allow builders for anyone who is just a normal (non-gold) or premium player. Admins, VIPs, guards and superadmins would get the ability to use the builder class.