Difference between revisions of "Gamemode.cfg"

From King Arthur's Gold Wiki
Jump to: navigation, search
(Customizing)
Line 19: Line 19:
  
 
<pre>teams = Rules/MODE/team1.cfg;</pre>
 
<pre>teams = Rules/MODE/team1.cfg;</pre>
 +
 +
=== 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:
 +
 +
<pre>
 +
break_time_static = .5
 +
warmup_barrier = 1
 +
</pre>
 +
 +
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>
 +
break_time = 5
 +
warmup_barrier = 1
 +
</pre>
 +
 +
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 ==
 
== Configuration Variables ==

Revision as of 16:00, 8 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.

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.

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.


Variable: warmup_barrier
Type: bool
Default Value: true
Description: Enables one barrier from ⅓ to ⅔ of map that prevents movement during warmup.

See also