Difference between revisions of "Gamemode.cfg"

From King Arthur's Gold Wiki
Jump to: navigation, search
(Customizing)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
The gamemode.cfg file is what loads the "rules" of the game mode currently in effect. It must be loaded before the map is loaded.
 
The gamemode.cfg file is what loads the "rules" of the game mode currently in effect. It must be loaded before the map is loaded.
 +
 +
'''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.
  
 
== Customizing ==
 
== Customizing ==
Line 9: Line 11:
 
To make the bedrock in the map indestructible - useful for parkour maps or high-bomb gamemodes, you must set two configuration variables:
 
To make the bedrock in the map indestructible - useful for parkour maps or high-bomb gamemodes, you must set two configuration variables:
  
<pre>map_indestructible = yes
+
<syntaxhighlight lang="ini" enclose="div">map_indestructible = yes
map_bedrock_indestructible = yes</pre>
+
map_bedrock_indestructible = yes</syntaxhighlight>
  
 
Note that map_indestructible does not make the entire map indestructible like it says, as of build 590. Only bedrock is made indestructible.
 
Note that map_indestructible does not make the entire map indestructible like it says, as of build 590. Only bedrock is made indestructible.
Line 18: Line 20:
 
To limit to one team, simply set the teams list to only one team (replace MODE with your mod folder):
 
To limit to one team, simply set the teams list to only one team (replace MODE with your mod folder):
  
<pre>teams = Rules/MODE/team1.cfg;</pre>
+
<syntaxhighlight lang="ini" enclose="div">teams = Rules/MODE/team1.cfg;</syntaxhighlight>
  
 
=== Adding a Warmup Period ===
 
=== Adding a Warmup Period ===
Line 24: Line 26:
 
This will add a warmup period, or a time when there is a red barrier preventing teams from moving past a certain area, for 30 seconds at the start of the round:
 
This will add a warmup period, or a time when there is a red barrier preventing teams from moving past a certain area, for 30 seconds at the start of the round:
  
<pre>
+
<syntaxhighlight lang="ini" enclose="div">
 
break_time_static = .5
 
break_time_static = .5
 
warmup_barrier = 1
 
warmup_barrier = 1
</pre>
+
</syntaxhighlight>
  
 
If we wanted a more dynamic warmup time, you could set break_time, rather than break_time_static, to dynamically set the time period based upon how many players are in the server:
 
If we wanted a more dynamic warmup time, you could set break_time, rather than break_time_static, to dynamically set the time period based upon how many players are in the server:
  
<pre>
+
<syntaxhighlight lang="ini" enclose="div">
 
break_time = 5
 
break_time = 5
 
warmup_barrier = 1
 
warmup_barrier = 1
</pre>
+
</syntaxhighlight>
  
 
This would set the number of seconds for the warmup to (# of players * 5 seconds). So, for 8 players in the server, the warmup time would be 40 seconds.
 
This would set the number of seconds for the warmup to (# of players * 5 seconds). So, for 8 players in the server, the warmup time would be 40 seconds.
Line 138: Line 140:
 
| -1
 
| -1
 
| Defines which team wins when time-limit is reached. -1 means no team wins, draw occurs. 0 for Blue, 1 for Red.
 
| Defines which team wins when time-limit is reached. -1 means no team wins, draw occurs. 0 for Blue, 1 for Red.
 +
|-
 +
| break_time
 +
| u16
 +
| 0
 +
| Defines warm-up time in minutes as a multiple of current players.
 +
|-
 +
| break_time_static
 +
| s16
 +
| -1
 +
| Warm-up time in minutes. Overrides break_time.
 +
|-
 +
| minimum_players_inteam
 +
| s8
 +
| -1
 +
| Amount of players on each team needed to start match. -1 to always start when a player joins.
 +
|-
 +
| autoassign_teams
 +
| bool
 +
| false
 +
| Distributes players evenly amongst teams when connecting.
 +
|-
 +
| autoassign_classes
 +
| bool
 +
| false
 +
| Assigns players a class when connecting based on current class distribution.
 +
|-
 +
| do_ingame_autobalance
 +
| bool
 +
| true
 +
| Periodically reassigns player teams during match, if the teams become unbalanced.
 +
|-
 +
| autobalance_tolerance
 +
| f32
 +
| 0.15
 +
| Percentage of team balance that will be tolerated by do_ingame_autobalance. Higher makes for a more tolerant balancer.
 +
|-
 +
| red_team_size_ratio
 +
| f32
 +
| 1.0
 +
| Allows team 2 player-count to be disproportionate to team 1 by a defined factor. Higher increases disproportion.
 +
|-
 +
| swap_team_cooldown
 +
| s32
 +
| 1800
 +
| Amount of time required to pass before player can swap teams (value / 30 = seconds).
 +
|-
 +
| balance_teams_on_nextmap
 +
| bool
 +
| true
 +
| Distributes players when starting a new match based on their kills.
 +
|-
 +
| playerrespawn_seconds
 +
| float
 +
| 3.0
 +
| Amount of seconds to wait before respawning dead player.
 +
|-
 +
| nearspawn_multiplier
 +
| float
 +
| 3.0
 +
| Value multiplies playerrespawn_seconds if player dies near their spawn.
 +
|-
 +
| death_points
 +
| s16
 +
| 0
 +
| Amount that player score should be changed upon death (usually negative).
 +
|-
 +
| kill_points
 +
| s16
 +
| 0
 +
| Amount that player score should be changed upon killing something (player / ai).
 +
|-
 +
| selfkill_points
 +
| s16
 +
| 0
 +
| Amount that player score should be changed upon killing oneself (usually negative).
 +
|-
 +
| attackdamage_modifier
 +
| float
 +
| 0.5
 +
| Base value for calculating damage increments. Set higher for more damage!
 +
|-
 +
| falldamage_modifier
 +
| float
 +
| 1.0
 +
| Multiplies base fall damage value. Set to 0.0 for no fall damage.
 +
|-
 +
| falldamage_threshold
 +
| float
 +
| 7.0
 +
| Speed threshold to get stunned (not damaged) from a fall. Smaller value = lower speed.
 +
|-
 +
| falldamage_constant
 +
| float
 +
| 5.0
 +
| Speed needed to get damaged from a fall. Smaller value = lower speed.
 +
|-
 +
| friendlydamage_modifier
 +
| float
 +
| 0.0
 +
| Multiplies base damage value when attacking player on same team (0 = no team damage).
 +
|-
 +
| map_indestructible
 +
| bool
 +
| false
 +
| Makes the map immune to almost all damage if true. Currently does not work as of build 590.
 +
|-
 +
| map_bedrock_indestructible
 +
| bool
 +
| false
 +
| Makes bedrock tiles immune to all damage if true
 +
|-
 +
| builder_hit_damage
 +
| float
 +
| 0.5
 +
| Damage done by builders on hit.
 +
|-
 +
| knight_jab_damage
 +
| float
 +
| 1.0
 +
| Damage done by knights when jabbing
 +
|-
 +
| knight_slash_damage
 +
| float
 +
| 1.5
 +
| Damage done by knights when slashing
 +
|-
 +
| stomp_vel
 +
| float
 +
| Sets to falldamage_constant if not set
 +
| The velocity at which an actor can stomp another. Set to 0 to prevent stomp damage.
 +
|-
 +
| stomp_weak_damage
 +
| float
 +
| 1.0
 +
| Damage done when weakly stomping, and damage taken by the stomper when strongly stomping someone.
 +
|-
 +
| stomp_strong_damage
 +
| float
 +
| 2.0
 +
| Damage when strongly stomping.
 +
|-
 +
| wall_hit_damage
 +
| bool
 +
| false
 +
| Toggles application of fall damage when player slams into a wall at a high velocity.
 +
|-
 +
| support_factor
 +
| s32
 +
| 24
 +
| The total support given by structures (-> larger numbers = more skybridges)
 +
|-
 +
| support_added_vertical
 +
| s32
 +
| 1
 +
| The amount of support gained vertically.
 +
|-
 +
| support_cost_ladder
 +
| s32
 +
| 8
 +
| The amount of support taken by a ladder horizontallly
 +
|-
 +
| support_cost_bridge
 +
| s32
 +
| 4
 +
| The amount of support taken by a bridge horizontallly.
 +
|-
 +
| support_cost_castle
 +
| s32
 +
| 4
 +
| The amount of support taken by a castle block horizontallly.
 +
|-
 +
| support_cost_wood
 +
| s32
 +
| 3
 +
| The amount of support taken by a wood block horizontallly
 +
|-
 +
| no_shadowing
 +
| bool
 +
| false / true
 +
| Toggles darkness/shadows. *Gold servers only.
 +
|-
 +
| build_speed
 +
| s16
 +
| 8
 +
| Limits placement of blocks based on time passed. Smaller value = faster action. Note: Changing this will cause hacking warnings and kicks.
 +
|-
 +
| builder_hitspeed
 +
| s16
 +
| 14
 +
| Base value which determines attack / gather rate. Varies according to target type that's being 'hit'. Smaller value = faster action.
 +
|-
 +
| knight_drawtime
 +
| s16
 +
| 1
 +
| The amount of time slashes take to charge for a knight.
 +
|-
 +
| knight_maxthrow
 +
| s16
 +
| 120
 +
| Unknown.
 +
|-
 +
| knight_maxpower
 +
| s16
 +
| 28
 +
| Unknown.
 +
|-
 +
| knight_speed
 +
| s16
 +
| 13
 +
| Base value which determines attack / gather rate. Varies according to target type that's being 'hit'. Smaller value = faster action.
 +
|-
 +
| shield_stomp_velocity
 +
| float
 +
| 5.25
 +
| Minimum velocity that is needed to initiate a 'shield-stomp'.
 +
|-
 +
| max_bombs
 +
| s16
 +
| 3
 +
| Maximum amount of bombs that can be carried by a player.
 +
|-
 +
| build_arrow_speed
 +
| s16
 +
| 25
 +
| Rate at which arrows are created when gathering from trees. Smaller value = faster action.
 +
|-
 +
| archer_dig_speed
 +
| s16
 +
| 30
 +
| Rate that archers can 'dig' through 'dirt' tiles. Smaller value = faster action.
 +
|-
 +
| archer_drawtime
 +
| s16
 +
| 19
 +
| Required delay before player is able to shoot.
 +
|-
 +
| sword_knockdown
 +
| s16
 +
| 12
 +
| Amount of time victim is stunned after a successful 'slash'.
 +
|-
 +
| small_sword_knockdown
 +
| s16
 +
| 0
 +
| Amount of time victim is stunned after being 'jabbed'.
 +
|-
 +
| arrow_knockdown
 +
| s16
 +
| 0
 +
| Amount of time victim is stunned after an uncharged arrow attack.
 +
|-
 +
| charged_arrow_knockdown
 +
| s16
 +
| 12
 +
| Amount of time victim is stunned after an fully-charged arrow attack.
 +
|-
 +
| resupply_time
 +
| s16
 +
| 180
 +
| Amount of time you can swap classes and still get proper materials on the tent. Stepping off tent cancels it.
 +
|-
 +
| knight_reset_timer_on_hit
 +
| bool
 +
| false
 +
| If true, sets knights "attack" charge to reset when they are hit.
 +
|-
 +
| archer_maxpower
 +
| s16
 +
| 66
 +
| Determines amount of time required to charge arrow shots. Smaller value = faster action.
 +
|-
 +
| archer_nodamage_vel
 +
| float
 +
| 1.0
 +
| Minimum arrow velocity required for to apply damage to target.
 +
|-
 +
| archer_max_vel
 +
| float
 +
| 15.0
 +
| Maximum velocity an arrow can achieve when fully charged. Also determines arrow travel distance.
 +
|-
 +
| archer_slow_arrow_damage
 +
| float
 +
| 0.5
 +
| Amount of damage dealt when arrow is traveling slowly. Based on attackdamage_modifier.
 +
|-
 +
| archer_normal_arrow_damage
 +
| float
 +
| 1.0
 +
| Amount of damage dealt when arrow is traveling at a medium pace. Based on attackdamage_modifier.
 +
|-
 +
| archer_charged_arrow_damage
 +
| float
 +
| 1.5
 +
| Amount of damage dealt when arrow is traveling at at it's fastest pace. Based on attackdamage_modifier.
 +
|-
 +
| archer_shoot_arrow_ondeath
 +
| bool
 +
| false
 +
| Allows a dying archer to release a previously charged arrow upon death.
 +
|-
 +
| min_shieldbash_horiz_vel
 +
| float
 +
| 1.15
 +
| Minimum horizontal velocity required to apply shield-bash stun to victim where 1 = running speed.
 +
|-
 +
| max_shieldbash_push
 +
| float
 +
| 3.5
 +
| Maximum velocity applied to victim after being successfully shield bashed where 1 = running speed.
 +
|-
 +
| shieldbash_push_factor
 +
| float
 +
| 2.0
 +
| The amount that a shieldbash pushes.
 +
|-
 +
| shieldbash_uppysidey_ratio
 +
| float
 +
| 0.5
 +
| The angle of the push, between 0 (all up) and 1 (all side) (I think)
 +
|-
 +
| shieldbash_knockdown
 +
| s16
 +
| 5
 +
| Amount of time victim is stunned after being successfully shield bashed.
 +
|-
 +
| clientside_shieldbash
 +
| bool
 +
| false
 +
| Toggles whether shield bash happens on client or on server. Leave at server; changing to client can cause issues.
 +
|-
 +
| can_shieldbash
 +
| bool
 +
| false
 +
| Toggles the shield bash ability.
 +
|-
 +
| collide_when_crouching
 +
| bool
 +
| false
 +
| Toggles entity collisions when player is in crouched position. If false, entities can walk past crouched players.
 +
|-
 +
| can_glide_when_bombjumping
 +
| bool
 +
| true
 +
| Toggles ability to shield glide after successfully bomb jumping.
 +
|-
 +
| bomb_jump_scale
 +
| f32
 +
| 1
 +
| Scales the base "jump" velocity when bomb jumping.
 +
|-
 +
| mapresource_thickstone
 +
| u8
 +
| 4
 +
| Amount of stone given to player per hit when gathering from 'thick stone' tiles.
 +
|-
 +
| mapresource_stone
 +
| u8
 +
| 2
 +
| Amount of stone given to player per hit when gathering from 'stone' tiles.
 +
|-
 +
| mapresource_tree
 +
| u8
 +
| 6
 +
| Amount of wood given to player per hit when gathering from 'tree' tiles.
 +
|-
 +
| mapresource_arrow
 +
| u8
 +
| 1
 +
| Amount of arrows given to player (archer) per hit when gathering from 'tree' tiles.
 +
|-
 +
| mapresource_gold
 +
| u8
 +
| 2
 +
| Amount of gold given to player per hit when gathering from 'gold' tiles.
 +
|-
 +
| unlimited_resources
 +
| bool
 +
| false
 +
| Toggles inventory reduction of materials from player when placing tiles.
 +
|-
 +
| unlimited_ammo
 +
| bool
 +
| false
 +
| Toggles inventory reduction of arrows and bombs from player.
 +
|-
 +
| switch_teams_onrestart
 +
| bool
 +
| false
 +
| Automatically swaps all players team association when a new match starts.
 +
|-
 +
| new_sacks_in_tent
 +
| bool
 +
| true
 +
| Makes tents not give resources during warm up according to resource_warmup at builder.cfg, knight.cfg, archer.cfg. This variable could be read as “tent_doens't_give_resources_during_warmup”. Also if set to yes, resource_default at builder.cfg, knight.cfg, archer.cfg will have no effect.
 +
|-
 +
| heart_fallout_probability
 +
| u8
 +
| 2
 +
| Toggles hearts appearing when a player dies. 0 - no hearts; 1 - every death; 2.. - randomly probability of 2...
 +
|-
 +
| flags_count
 +
| u8
 +
| 0
 +
| Amount of flags that spawn at tent for each team. Never set to more than 1.
 +
|-
 +
| flags_score
 +
| u8
 +
| 1
 +
| Amount of score given to a team when an enemy flag is successfully captured. (doesn’t work)
 +
|-
 +
| flags_respawn
 +
| bool
 +
| false
 +
| Respawns flag to spawn point if it exits the battlefield.
 +
|-
 +
| flags_return
 +
| bool
 +
| false
 +
| Returns flag to spawn point of touched by a friendly player.
 +
|-
 +
| spawn_tent_onstart
 +
| bool
 +
| true
 +
| Spawns a tent, with flag, at points defined by map (and map generators).
 +
|-
 +
| restartmap_onlastplayer_disconnect
 +
| bool
 +
| true
 +
| Starts a new match when there are no players on server.
 +
|-
 +
| nocollapsing_nearspawn
 +
| bool
 +
| true
 +
| Toggles the prevention of tiles surrounding spawn-point being broken by a 'friendly' player (same team). AKA Anti-grief.
 +
|-
 +
| mirrormap
 +
| bool
 +
| true
 +
| Toggles horizontal reflection of the left side of a generated map.
 +
|-
 +
| coins_death_drop_percentage
 +
| u8
 +
| 20
 +
| Amount of coins a player will drop upon death, as a percentage of total.
 +
|-
 +
| coins_damage_enemy
 +
| u8
 +
| 5
 +
| Amount of coins player will receive when player attacks an enemy successfully.
 +
|-
 +
| coins_build_percentage
 +
| u8
 +
| 20
 +
| Amount of coins given to player when placing tiles based on percentage of material used.
 +
|-
 +
| room_config
 +
| string
 +
| "Entities/Rooms/CTF_Room.cfg"
 +
| Reference to the configuration file that defines workshops and their functions.
 +
|-
 +
| zombie_portal_config
 +
| string
 +
|
 +
| Reference to the configuration file that defines zombie portals (spawners).
 +
|-
 +
| party_mode
 +
| bool
 +
| false
 +
| Enables migrants and functionality for followers. Overrides unit-count variables.
 +
|-
 +
| warmup_barrier
 +
| bool
 +
| true
 +
| Enables one barrier from ⅓ to ⅔ of map that prevents movement during warmup.
 
|}
 
|}
  
<pre>
+
= See Also =
 
+
Variable: break_time
+
Type: u16
+
Default Value: 0
+
Description: Defines warm-up time in minutes as a multiple of current players.
+
 
+
 
+
Variable: break_time_static
+
Type: s16
+
Default Value: -1
+
Description: Warm-up time in minutes. Overrides break_time.
+
 
+
 
+
Variable: minimum_players_inteam
+
Type: s8
+
Default Value: -1
+
Description: Amount of players on each team needed to start match.
+
 
+
 
+
Type: bool
+
Variable: autoassign_teams
+
Default Value: false
+
Description: Distributes players evenly amongst teams when connecting.
+
 
+
Type: bool
+
Variable: autoassign_classes
+
Default Value: false
+
Description: Assigns players a class when connecting based on current class distribution.
+
 
+
Type: bool
+
Variable: autoassign_inventory
+
Default Value: false
+
Description: ???
+
 
+
 
+
Type: bool
+
Variable: do_ingame_autobalance
+
Default Value: true
+
Description: Periodically reassigns player teams during match.
+
 
+
 
+
Variable: autobalance_tolerance
+
Type: f32
+
Default Value: 0.15
+
Description: Percentage of team balance that will be tolerated by do_ingame_autobalance.
+
 
+
 
+
Variable: red_team_size_ratio
+
Type: f32
+
Default Value: 1.0
+
Description: Allows team 2 player-count to be disproportionate to team 1 by a defined factor.
+
 
+
 
+
Variable: swap_team_cooldown
+
Type: s32
+
Default Value: 1800
+
Description: Amount of time required to pass before player can swap teams (value / 30 = seconds).
+
 
+
 
+
Variable: balance_teams_on_nextmap
+
Type: bool
+
Default Value: true
+
Description: Distributes players when starting a new match based on their kills.
+
 
+
 
+
Variable: playerrespawn_seconds
+
Type: float
+
Default Value: 3.0
+
Description: Amount of seconds to wait before respawning dead player.
+
 
+
 
+
Variable: nearspawn_multiplier
+
Type: float
+
Default Value: 3.0
+
Description: Value multiplies playerrespawn_seconds if player dies near their spawn.
+
 
+
 
+
Variable: death_points:
+
Type: s16
+
Default Value: None
+
Description: Amount that player score should be changed upon death (usually negative).
+
 
+
 
+
Variable: kill_points
+
Type: s16
+
Default Value: None
+
Description: Amount that player score should be changed upon killing something (player / ai).
+
 
+
 
+
Variable: selfkill_points
+
Type: s16
+
Default Value: None
+
Description: Amount that player score should be changed upon killing oneself (usually negative).
+
 
+
 
+
Type: float
+
Variable: attackdamage_modifier
+
Default Value: 0.5
+
Description: Base value for calculating damage increments.
+
 
+
 
+
Variable: falldamage_modifier
+
Type: float
+
Default Value: 1.0
+
Description: Multiplies base fall damage value.
+
 
+
 
+
Variable: falldamage_threshold
+
Type: float
+
Default Value: 7.0
+
Description: Speed threshold to get stunned (not damaged) from a fall. Smaller value = lower speed.
+
 
+
 
+
Variable: falldamage_constant
+
Type: float
+
Default Value: 5.0
+
Description: Speed needed to get damaged from a fall. Smaller value = lower speed.
+
 
+
 
+
Variable: friendlydamage_modifier
+
Type: float
+
Default Value: 0.0
+
Description: Multiplies base damage value when attacking player on same team (0 = no team damage).
+
 
+
 
+
Variable: map_indestructible
+
Type: bool
+
Default Value: false
+
Description: Makes the map immune to almost all damage if true
+
 
+
 
+
Variable: map_bedrock_indestructible
+
Type: bool
+
Default Value: false
+
Description: Makes bedrock tiles immune to almost all damage if true
+
 
+
 
+
Variable: builder_hit_damage
+
Type: float
+
Default Value: 0.5
+
Description: Damage done by builders on hit
+
 
+
 
+
Variable: knight_jab_damage
+
Type: float
+
Default Value: 1.0
+
Description: Damage done by knights when jabbing
+
 
+
 
+
Variable: knight_slash_damage
+
Type: float
+
Default Value: 1.5
+
Description: Damage done by knights when slashing
+
 
+
 
+
Variable: stomp_vel
+
Type: float
+
Default Value: falldamage_constant
+
Description: The velocity at which an actor can stomp another
+
 
+
 
+
Variable: stomp_weak_damage
+
Type: float
+
Default Value: 1.0
+
Description: Damage done when weakly stomping, and damage taken by the stomper when strongly stomping someone.
+
 
+
 
+
Variable: stomp_strong_damage
+
Type: float
+
Default Value: 2.0
+
Description: Damage when strongly stomping.
+
 
+
 
+
Variable: wall_hit_damage
+
Type: bool
+
Default Value: false
+
Description: Toggles application of fall damage when player impacts a wall.
+
 
+
 
+
Variable: support_factor
+
Type: s32
+
Default Value: 24
+
Description: The total support given by structures (-> larger numbers = more skybridges)
+
 
+
 
+
Variable: support_added_vertical
+
Type: s32
+
Default Value: 1
+
Description: The amount of support gained verticaly
+
 
+
 
+
Variable: support_cost_ladder
+
Type: s32
+
Default Value: 8
+
Description: The amount of support taken by a ladder horizontallly
+
 
+
 
+
Variable: support_cost_bridge
+
Type: s32
+
Default Value: 4
+
Description: The amount of support taken by a bridge horizontallly
+
 
+
 
+
Variable: support_cost_castle
+
Type: s32
+
Default Value: 4
+
Description: The amount of support taken by a castle block horizontallly
+
 
+
 
+
Variable: support_cost_wood
+
Type: s32
+
Default Value: 3
+
Description: The amount of support taken by a wood block horizontallly
+
 
+
 
+
Variable: no_shadowing
+
Type: bool
+
Default Value: false / true
+
Description: Toggles darkness/shadows. *Gold servers only.
+
 
+
 
+
Variable: build_speed
+
Type: s16
+
Default Value: 8
+
Description: Limits placement of blocks based on time passed. Smaller value = faster action.
+
 
+
 
+
Variable: builder_hitspeed
+
Type: s16
+
Default Value: 14
+
Description: Base value which determines attack / gather rate. Varies according to target type that's being 'hit'. Smaller value = faster action.
+
 
+
 
+
Variable: knight_drawtime
+
Type: s16
+
Default Value: 1
+
Description: ???
+
 
+
 
+
Variable: knight_maxthrow
+
Type: s16
+
Default Value: 120
+
Description: Limits ??? of bombs thrown
+
 
+
 
+
Variable: knight_maxpower
+
Type: s16
+
Default Value: 28
+
Description: Limits ??? of bombs thrown
+
 
+
 
+
Variable: knight_speed
+
Type: s16
+
Default Value: 13
+
Description: Base value which determines attack / gather rate. Varies according to target type that's being 'hit'. Smaller value = faster action.
+
 
+
 
+
Variable: shield_stomp_velocity
+
Type: float
+
Default Value: 5.25
+
Description: Minimum velocity that is needed to initiate a 'shield-stomp'.
+
 
+
 
+
Variable: max_bombs
+
Type: s16
+
Default Value: 3
+
Description: Maximum amount of bombs that can be carried by a player.
+
 
+
 
+
Variable: build_arrow_speed
+
Type: s16
+
Default Value: 25
+
Description: Rate at which arrows are created when gathering from trees. Smaller value = faster action.
+
 
+
 
+
Variable: archer_dig_speed
+
Type: s16
+
Default Value: 30
+
Description: Rate that archers can 'dig' through 'dirt' tiles. Smaller value = faster action.
+
 
+
 
+
Variable: archer_drawtime
+
Type: s16
+
Default Value: 19
+
Description: Required delay before player is able to shoot.
+
 
+
 
+
Variable: sword_knockdown
+
Type: s16
+
Default Value: 12
+
Description: Amount of time victim is stunned after a successful 'slash'.
+
 
+
 
+
Variable: small_sword_knockdown
+
Type: s16
+
Default Value: 0
+
Description: Amount of time victim is stunned after being 'jabbed'.
+
 
+
 
+
Variable: arrow_knockdown
+
Type: s16
+
Default Value: 0
+
Description: Amount of time victim is stunned after an uncharged arrow attack.
+
 
+
 
+
Variable: charged_arrow_knockdown
+
Type: s16
+
Default Value: 12
+
Description: Amount of time victim is stunned after an fully-charged arrow attack.
+
 
+
 
+
Variable: resupply_time
+
Type: s16
+
Default Value: 180
+
Description: Amount of time you can swap classes and still get proper materials on the tent. Stepping off tent cancels it.
+
 
+
 
+
Variable: knight_reset_timer_on_hit
+
Type: bool
+
Default Value: false
+
Description: For raron, sets knights "attack" charge to reset when they are hit.
+
 
+
 
+
Variable: archer_maxpower
+
Type: s16
+
Default Value: 66
+
Description: Determines amount of time required to charge arrow shots. Smaller value = faster action.
+
 
+
 
+
Variable: archer_nodamage_vel
+
Type: float
+
Default Value: 1.0
+
Description: Minimum arrow velocity required for to apply damage to target.
+
 
+
 
+
Variable: archer_max_vel
+
Type: float
+
Default Value: 15.0
+
Description: Maximum velocity an arrow can achieve when fully charged. Also determines arrow travel distance.
+
 
+
 
+
Variable: archer_slow_arrow_damage
+
Type: float
+
Default Value: 0.5
+
Description: Amount of damage dealt when arrow is traveling slowly. Based on attackdamage_modifier.
+
 
+
 
+
Variable: archer_normal_arrow_damage
+
Type: float
+
Default Value: 1.0
+
Description: Amount of damage dealt when arrow is traveling at a medium pace. Based on attackdamage_modifier.
+
 
+
 
+
Variable: archer_charged_arrow_damage
+
Type: float
+
Default Value: 1.5
+
Description: Amount of damage dealt when arrow is traveling at at it's fastest pace. Based on attackdamage_modifier.
+
 
+
 
+
Variable: archer_shoot_arrow_ondeath
+
Type: bool
+
Default Value: false
+
Description: Allows a dying archer to release a previously charged arrow upon death.
+
 
+
 
+
Variable: min_shieldbash_horiz_vel
+
Type: float
+
Default Value: 1.15
+
Description: Minimum horizontal velocity required to apply shield-bash stun to victim where 1 = running speed.
+
 
+
 
+
Variable: max_shieldbash_push
+
Type: float
+
Default Value: 3.5
+
Description: Maximum velocity applied to victim after being successfully shield bashed where 1 = running speed.
+
 
+
 
+
Variable: shieldbash_push_factor
+
Type: float
+
Default Value: 2.0
+
Description: The amount that a shieldbash pushes.
+
 
+
 
+
Variable: shieldbash_uppysidey_ratio
+
Type: float
+
Default Value: 0.5
+
Description: The angle of the push, between 0 (all up) and 1 (all side) (I think)
+
 
+
 
+
Variable: shieldbash_knockdown
+
Type: s16
+
Default Value: 5
+
Description: Amount of time victim is stunned after being successfully shield bashed.
+
 
+
 
+
Variable: clientside_shieldbash
+
Type: bool
+
Default Value: false
+
Description: Toggles whether shield bash happens on client or on server.
+
 
+
 
+
Variable: can_shieldbash
+
Type: bool
+
Default Value: false
+
Description: Toggles the shield bash ability.
+
 
+
 
+
Variable: collide_when_crouching
+
Type: bool
+
Default Value: false
+
Description: Toggles entity collisions when player is in crouched position.
+
 
+
 
+
Variable: can_glide_when_bombjumping
+
Type: bool
+
Default Value: None
+
Description: Toggles ability to shield glide after successfully bomb jumping.
+
 
+
 
+
Variable: bomb_jump_scale
+
Type: f32
+
Default Value: None
+
Description: Scales the base "jump" velocity when bomb jumping.
+
 
+
 
+
Variable: mapresource_thickstone
+
Type: u8
+
Default Value: 4
+
Description: Amount of stone given to player per hit when gathering from 'thick stone' tiles.
+
 
+
 
+
Variable: mapresource_stone
+
Type: u8
+
Default Value: 2
+
Description: Amount of stone given to player per hit when gathering from 'stone' tiles.
+
 
+
 
+
Variable: mapresource_tree
+
Type: u8
+
Default Value: 6
+
Description: Amount of wood given to player per hit when gathering from 'tree' tiles.
+
 
+
 
+
Variable: mapresource_arrow
+
Type: u8
+
Default Value: 1
+
Description: Amount of arrows given to player (archer) per hit when gathering from 'tree' tiles.
+
 
+
 
+
Variable: mapresource_gold
+
Type: u8
+
Default Value: 2
+
Description: Amount of gold given to player per hit when gathering from 'gold' tiles.
+
 
+
 
+
Variable: unlimited_resources
+
Type: bool
+
Default Value: false
+
Description: Toggles inventory reduction of materials from player when placing tiles.
+
 
+
 
+
Variable: unlimited_ammo
+
Type: bool
+
Default Value: false
+
Description: Toggles inventory reduction of arrows and bombs from player.
+
 
+
 
+
Variable: force_weightclass
+
Type: u8
+
Default Value: 0
+
Description: ??? not implemented?
+
 
+
 
+
Variable: fog_of_war
+
Type: u8
+
Default Value: None
+
Description: ??? definitely not implemented...
+
 
+
 
+
Variable: auto_bots
+
Type: bool
+
Default Value: None
+
Description: ??? needs testing
+
 
+
 
+
Variable: switch_teams_onrestart
+
Type: bool
+
Default Value: None
+
Description: Automatically swaps all players team association when a new match starts.
+
 
+
 
+
Variable: new_sacks_in_tent
+
Type: bool
+
Default Value: yes
+
Description: Makes tents not give resources during warm up according to resource_warmup at builder.cfg, knight.cfg, archer.cfg. This variable could be read as “tent_doens't_give_resources_during_warmup”. Also if set to yes, resource_default at builder.cfg, knight.cfg, archer.cfg will have no effect.
+
Variable: sacks_count
+
Type: u8
+
Default Value: None
+
Description: ??? no longer valid?
+
 
+
 
+
Variable: gold_score_percentage
+
Type: u8
+
Default Value: 0
+
Description: ??? no longer valid?
+
 
+
 
+
Variable: heart_fallout_probability
+
Type: u8
+
Default Value: None
+
Description: Toggles hearts appearing when a player dies. 0 - no hearts; 1 - every death; 2.. - randomly probability of 2...
+
 
+
 
+
Variable: flags_count
+
Type: u8
+
Default Value: 0
+
Description: Amount of flags that spawn at tent for each team.
+
 
+
 
+
Variable: flags_score
+
Type: u8
+
Default Value: 1
+
Description: Amount of score given to a team when an enemy flag is successfully captured. (doesn’t work)
+
 
+
 
+
Variable: flags_respawn
+
Type: bool
+
Default Value: false
+
Description: respawns flag to spawn point if it exits the battlefield.
+
 
+
 
+
Variable: flags_return
+
Type: bool
+
Default Value: false
+
Description: Returns flag to spawn point of touched by a friendly player.
+
 
+
 
+
Variable: spawn_tent_onstart
+
Type: bool
+
Default Value: true
+
Description: Spawns a tent, with flag, at points defined by map (and map generators).
+
 
+
 
+
Variable: restartmap_onlastplayer_disconnect
+
Type: bool
+
Default Value: true
+
Description: Starts a new match when there are no players on server.
+
 
+
 
+
Variable: nocollapsing_nearspawn
+
Type: bool
+
Default Value: true
+
Description: Toggles the prevention of tiles surrounding spawn-point being broken by a 'friendly' player (same team). AKA Anti-grief.
+
 
+
 
+
Variable: mirrormap
+
Type: bool
+
Default Value: true
+
Description: Toggles horizontal reflection of the left side of a generated map.
+
 
+
 
+
Variable: coins_death_drop_percentage
+
Type: u8
+
Default Value: 20
+
Description: Amount of coins a player will drop upon death, as a percentage of total.
+
 
+
 
+
Variable: coins_damage_enemy
+
Type: u8
+
Default Value: 5
+
Description: Amount of coins player will receive when player attacks an enemy successfully.
+
 
+
 
+
Variable: coins_build_percentage
+
Type: u8
+
Default Value: 20
+
Description: Amount of coins given to player when placing tiles based on percentage of material used.
+
 
+
 
+
Variable: coins_bomb_cost
+
Type: u8
+
Default Value: 20
+
Description: Amount of coins required and deducted from player when purchasing a bomb from a workshop. (not in use anymore, price set on “room_config” file)
+
 
+
 
+
Variable: coins_arrows_cost
+
Type: u8
+
Default Value: 1
+
Description: Amount of coins required and deducted from player when purchasing an arrow from a workshop. (not in use anymore, refer to price set on “room_config” file)
+
 
+
 
+
 
+
Variable: coins_heal_cost
+
Type: u8
+
Default Value: 5
+
Description: Amount of coins required and deducted from player when being healed at a workshop. (not in use anymore, price set on “room_config” file)
+
 
+
 
+
 
+
Variable: room_config
+
Type: string
+
Default Value: "Entities/Rooms/CTF_Room.cfg"
+
Description: Reference to the configuration file that defines workshops and their functions.
+
 
+
 
+
Variable: zombie_portal_config
+
Type: string
+
Default Value: ""
+
Description: Reference to the configuration file that defines zombie portals (spawners).
+
 
+
 
+
Variable: party_mode
+
Type: bool
+
Default Value: false
+
Description: Enables migrants and functionality for followers. Overrides unit-count variables.
+
  
 +
* [[Modding]]
 +
* [[MapCycle.cfg]]
 +
* [[dedicated_autostart.gm]]
 +
* [[team configs]]
 +
* [[class configs]]
  
Variable: warmup_barrier
+
[[Category:Modding]][[Category:Server]]
Type: bool
+
Default Value: true
+
Description: Enables one barrier from ⅓ to ⅔ of map that prevents movement during warmup.
+
</pre>
+
  
 
= See also =
 
= See also =

Latest revision as of 15:07, 9 January 2013

The gamemode.cfg file is what loads the "rules" of the game mode currently in effect. It must be loaded before the map is loaded.

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.

Customizing

Customizing the gamemode is fairly simple, and can be done by editing configuration variables.

Making Bedrock Indestructible

To make the bedrock in the map indestructible - useful for parkour maps or high-bomb gamemodes, you must set two configuration variables:

map_indestructible = yes
map_bedrock_indestructible = yes

Note that map_indestructible does not make the entire map indestructible like it says, as of build 590. Only bedrock is made indestructible.

Limiting to 1 Team

To limit to one team, simply set the teams list to only one team (replace MODE with your mod folder):

teams = Rules/MODE/team1.cfg;

Adding a Warmup Period

This will add a warmup period, or a time when there is a red barrier preventing teams from moving past a certain area, for 30 seconds at the start of the round:

break_time_static = .5
warmup_barrier = 1

If we wanted a more dynamic warmup time, you could set break_time, rather than break_time_static, to dynamically set the time period based upon how many players are in the server:

break_time = 5
warmup_barrier = 1

This would set the number of seconds for the warmup to (# of players * 5 seconds). So, for 8 players in the server, the warmup time would be 40 seconds.

Configuration Variables

The following are variables that can be set in gamemode.cfg:

Variable Type Default Value Description
output_history bool true
player_light_radius u8 32 Distance that a player automatically (without a light source) illuminates the tiles around them.
minimap bool true Toggles the display of the mini-map.
max_zoom_out u8 2 Up to which zoom_lvl can be used. Maximum value is 3.
zoom_level_1 f32 2.0 Maximum viewing scale. ("Zoom-in")
zoom_level_2 f32 1.0 Default view scale.
zoom_level_3 f32 0.5 Minimum view scale. ("Zoom-out")
water_levelchange_time s16 0 Test this for time increment. Rate at which water level (defined in map file) will change. >0 = increase, <0 = decrease, 0 = no change.
water_suddendeath bool false Toggles water level change during sudden death (no units left). Based on water_levelchange_time.
teams string ARRAY References to locations of team configuration files (.cfg), delimited by semi-colon ';'
gamemode_name string "Default mode" Name of the gamemode to display in server browser and in-game.
gamemode_info string "Mine or steal gold" Additional info to be displayed in server browser and in-game during warm-up time.
match_time_formula_a u8 0 Determines match time based on the formula m*(a*sqrt(b*x)) where x = number of players in team, m = map size 0.8<=m<=1.2
match_time_formula_b u8 0 Determines match time based on the formula m*(a*sqrt(b*x)) where x = number of players in team, m = map size 0.8<=m<=1.2
match_time_override s16 0 Length of game in minutes. Overrides match_time_formula if set to non-0.
daycycle_speed u16 0 Amount of minutes full cycle of day / night. *Gold servers only.
daycycle_start f32 0.5 Day/Night cycle position at start of match. 0.5 = noon. 0/1 = midnight. *Gold servers only. Values of the order 0.01 work.
timepassed_teamwin s8 -1 Defines which team wins when time-limit is reached. -1 means no team wins, draw occurs. 0 for Blue, 1 for Red.
break_time u16 0 Defines warm-up time in minutes as a multiple of current players.
break_time_static s16 -1 Warm-up time in minutes. Overrides break_time.
minimum_players_inteam s8 -1 Amount of players on each team needed to start match. -1 to always start when a player joins.
autoassign_teams bool false Distributes players evenly amongst teams when connecting.
autoassign_classes bool false Assigns players a class when connecting based on current class distribution.
do_ingame_autobalance bool true Periodically reassigns player teams during match, if the teams become unbalanced.
autobalance_tolerance f32 0.15 Percentage of team balance that will be tolerated by do_ingame_autobalance. Higher makes for a more tolerant balancer.
red_team_size_ratio f32 1.0 Allows team 2 player-count to be disproportionate to team 1 by a defined factor. Higher increases disproportion.
swap_team_cooldown s32 1800 Amount of time required to pass before player can swap teams (value / 30 = seconds).
balance_teams_on_nextmap bool true Distributes players when starting a new match based on their kills.
playerrespawn_seconds float 3.0 Amount of seconds to wait before respawning dead player.
nearspawn_multiplier float 3.0 Value multiplies playerrespawn_seconds if player dies near their spawn.
death_points s16 0 Amount that player score should be changed upon death (usually negative).
kill_points s16 0 Amount that player score should be changed upon killing something (player / ai).
selfkill_points s16 0 Amount that player score should be changed upon killing oneself (usually negative).
attackdamage_modifier float 0.5 Base value for calculating damage increments. Set higher for more damage!
falldamage_modifier float 1.0 Multiplies base fall damage value. Set to 0.0 for no fall damage.
falldamage_threshold float 7.0 Speed threshold to get stunned (not damaged) from a fall. Smaller value = lower speed.
falldamage_constant float 5.0 Speed needed to get damaged from a fall. Smaller value = lower speed.
friendlydamage_modifier float 0.0 Multiplies base damage value when attacking player on same team (0 = no team damage).
map_indestructible bool false Makes the map immune to almost all damage if true. Currently does not work as of build 590.
map_bedrock_indestructible bool false Makes bedrock tiles immune to all damage if true
builder_hit_damage float 0.5 Damage done by builders on hit.
knight_jab_damage float 1.0 Damage done by knights when jabbing
knight_slash_damage float 1.5 Damage done by knights when slashing
stomp_vel float Sets to falldamage_constant if not set The velocity at which an actor can stomp another. Set to 0 to prevent stomp damage.
stomp_weak_damage float 1.0 Damage done when weakly stomping, and damage taken by the stomper when strongly stomping someone.
stomp_strong_damage float 2.0 Damage when strongly stomping.
wall_hit_damage bool false Toggles application of fall damage when player slams into a wall at a high velocity.
support_factor s32 24 The total support given by structures (-> larger numbers = more skybridges)
support_added_vertical s32 1 The amount of support gained vertically.
support_cost_ladder s32 8 The amount of support taken by a ladder horizontallly
support_cost_bridge s32 4 The amount of support taken by a bridge horizontallly.
support_cost_castle s32 4 The amount of support taken by a castle block horizontallly.
support_cost_wood s32 3 The amount of support taken by a wood block horizontallly
no_shadowing bool false / true Toggles darkness/shadows. *Gold servers only.
build_speed s16 8 Limits placement of blocks based on time passed. Smaller value = faster action. Note: Changing this will cause hacking warnings and kicks.
builder_hitspeed s16 14 Base value which determines attack / gather rate. Varies according to target type that's being 'hit'. Smaller value = faster action.
knight_drawtime s16 1 The amount of time slashes take to charge for a knight.
knight_maxthrow s16 120 Unknown.
knight_maxpower s16 28 Unknown.
knight_speed s16 13 Base value which determines attack / gather rate. Varies according to target type that's being 'hit'. Smaller value = faster action.
shield_stomp_velocity float 5.25 Minimum velocity that is needed to initiate a 'shield-stomp'.
max_bombs s16 3 Maximum amount of bombs that can be carried by a player.
build_arrow_speed s16 25 Rate at which arrows are created when gathering from trees. Smaller value = faster action.
archer_dig_speed s16 30 Rate that archers can 'dig' through 'dirt' tiles. Smaller value = faster action.
archer_drawtime s16 19 Required delay before player is able to shoot.
sword_knockdown s16 12 Amount of time victim is stunned after a successful 'slash'.
small_sword_knockdown s16 0 Amount of time victim is stunned after being 'jabbed'.
arrow_knockdown s16 0 Amount of time victim is stunned after an uncharged arrow attack.
charged_arrow_knockdown s16 12 Amount of time victim is stunned after an fully-charged arrow attack.
resupply_time s16 180 Amount of time you can swap classes and still get proper materials on the tent. Stepping off tent cancels it.
knight_reset_timer_on_hit bool false If true, sets knights "attack" charge to reset when they are hit.
archer_maxpower s16 66 Determines amount of time required to charge arrow shots. Smaller value = faster action.
archer_nodamage_vel float 1.0 Minimum arrow velocity required for to apply damage to target.
archer_max_vel float 15.0 Maximum velocity an arrow can achieve when fully charged. Also determines arrow travel distance.
archer_slow_arrow_damage float 0.5 Amount of damage dealt when arrow is traveling slowly. Based on attackdamage_modifier.
archer_normal_arrow_damage float 1.0 Amount of damage dealt when arrow is traveling at a medium pace. Based on attackdamage_modifier.
archer_charged_arrow_damage float 1.5 Amount of damage dealt when arrow is traveling at at it's fastest pace. Based on attackdamage_modifier.
archer_shoot_arrow_ondeath bool false Allows a dying archer to release a previously charged arrow upon death.
min_shieldbash_horiz_vel float 1.15 Minimum horizontal velocity required to apply shield-bash stun to victim where 1 = running speed.
max_shieldbash_push float 3.5 Maximum velocity applied to victim after being successfully shield bashed where 1 = running speed.
shieldbash_push_factor float 2.0 The amount that a shieldbash pushes.
shieldbash_uppysidey_ratio float 0.5 The angle of the push, between 0 (all up) and 1 (all side) (I think)
shieldbash_knockdown s16 5 Amount of time victim is stunned after being successfully shield bashed.
clientside_shieldbash bool false Toggles whether shield bash happens on client or on server. Leave at server; changing to client can cause issues.
can_shieldbash bool false Toggles the shield bash ability.
collide_when_crouching bool false Toggles entity collisions when player is in crouched position. If false, entities can walk past crouched players.
can_glide_when_bombjumping bool true Toggles ability to shield glide after successfully bomb jumping.
bomb_jump_scale f32 1 Scales the base "jump" velocity when bomb jumping.
mapresource_thickstone u8 4 Amount of stone given to player per hit when gathering from 'thick stone' tiles.
mapresource_stone u8 2 Amount of stone given to player per hit when gathering from 'stone' tiles.
mapresource_tree u8 6 Amount of wood given to player per hit when gathering from 'tree' tiles.
mapresource_arrow u8 1 Amount of arrows given to player (archer) per hit when gathering from 'tree' tiles.
mapresource_gold u8 2 Amount of gold given to player per hit when gathering from 'gold' tiles.
unlimited_resources bool false Toggles inventory reduction of materials from player when placing tiles.
unlimited_ammo bool false Toggles inventory reduction of arrows and bombs from player.
switch_teams_onrestart bool false Automatically swaps all players team association when a new match starts.
new_sacks_in_tent bool true Makes tents not give resources during warm up according to resource_warmup at builder.cfg, knight.cfg, archer.cfg. This variable could be read as “tent_doens't_give_resources_during_warmup”. Also if set to yes, resource_default at builder.cfg, knight.cfg, archer.cfg will have no effect.
heart_fallout_probability u8 2 Toggles hearts appearing when a player dies. 0 - no hearts; 1 - every death; 2.. - randomly probability of 2...
flags_count u8 0 Amount of flags that spawn at tent for each team. Never set to more than 1.
flags_score u8 1 Amount of score given to a team when an enemy flag is successfully captured. (doesn’t work)
flags_respawn bool false Respawns flag to spawn point if it exits the battlefield.
flags_return bool false Returns flag to spawn point of touched by a friendly player.
spawn_tent_onstart bool true Spawns a tent, with flag, at points defined by map (and map generators).
restartmap_onlastplayer_disconnect bool true Starts a new match when there are no players on server.
nocollapsing_nearspawn bool true Toggles the prevention of tiles surrounding spawn-point being broken by a 'friendly' player (same team). AKA Anti-grief.
mirrormap bool true Toggles horizontal reflection of the left side of a generated map.
coins_death_drop_percentage u8 20 Amount of coins a player will drop upon death, as a percentage of total.
coins_damage_enemy u8 5 Amount of coins player will receive when player attacks an enemy successfully.
coins_build_percentage u8 20 Amount of coins given to player when placing tiles based on percentage of material used.
room_config string "Entities/Rooms/CTF_Room.cfg" Reference to the configuration file that defines workshops and their functions.
zombie_portal_config string Reference to the configuration file that defines zombie portals (spawners).
party_mode bool false Enables migrants and functionality for followers. Overrides unit-count variables.
warmup_barrier bool true Enables one barrier from ⅓ to ⅔ of map that prevents movement during warmup.

See Also

See also