Difference between revisions of "Server Configuration"

From Holdfast: Nations At War
Jump to navigation Jump to search
Line 124: Line 124:
 
Give the British grenadiers a rifle and give the French grenadiers a rifle, pike & sabre:
 
Give the British grenadiers a rifle and give the French grenadiers a rifle, pike & sabre:
 
<pre># Override Commands (This is a comment and will be ignored by the game)
 
<pre># Override Commands (This is a comment and will be ignored by the game)
starting_weapons_override British Grenadier 4 2 BakerRifle
+
starting_weapons_override British Grenadier 4 2 Rifle_Pattern1800Infantry
starting_weapons_override French Grenadier 4 3 BakerRifle Pike Sabre
+
starting_weapons_override French Grenadier 4 3 Rifle_Pattern1800Infantry Pike Sabre
 
</pre>
 
</pre>
  

Revision as of 16:10, 14 August 2019

Server Configuration Files

Example Configuration File

Server configuration files are plain text files containing settings defining the server setup and the maps/game modes available in rotation. There are three types of line to be found in a configuration file:

  • Setting lines, of the form <setting> <value>. These are the important part of the file.
  • Comment lines, starting with a # character. These lines are ignored. These are useful to annotate your settings, or to keep a list of map rotations at the top of your config file for reference.
  • Empty lines, used for layout / spacing. These lines are ignored.

The general layout of a configuration file is to have all server-wide settings at the top of the file, followed by a list of map rotation settings. See the image on the right. Further examples are included with the server download (see Server Hosting).

Server-Wide Settings

These settings define how the server is visible to users, how it communicates with the server browser, and any restrictions on the server.

First up are the port settings. These are mandatory, and all must be unique per server instance on the same box.

server_port 20100
steam_communications_port 8700
steam_query_port 27000

Next are the settings defining how the server displays to players:

server_name New Server - Army Battlefield
server_welcome_message Welcome to my new game server!
server_region europe
server_admin_password ChangeThisPassword
#server_password ChangeThisPassword

The server_password is optional and can be left commented out. The server_admin_password is used for Remote Console Commands. The server_region can take one of the following values, resulting in the appropriate region being displayed in the server browser:

europe usa usaeast usawest australia
china japan russia southkorea brazil

The broadcast mode determines the network utilisation for close range combat.

# LowLatency = Reduced packet rate on close-range (high player count)
# HighAccuracy = Increased packet rate on close-range (low player count)
network_broadcast_mode LowLatency

The respawn time for artillery can be defined in seconds. Both default to 2 minutes.

artillery_fieldgun_respawn_timer 120
artillery_rocketlauncher_respawn_timer 120

These settings control the player thresholds for determining which maps are available in the rotation for low/med/high player counts. This is useful to restrict certain maps when server populations do not suit them. The default values are below.

population_low_min_players 30
population_medium_min_players 50
population_high_min_players 100

Map Rotations

Basic Map Settings

  • In Progress*

Automatic Console Commands

You can issue any of the Remote Console Commands at the start of a map rotation by included them in the server configuration file. You may want to do this to:

  • Reset default values for settings like God Mode or player movement speeds, either on a staging map like Training Grounds or on all possible maps.
  • Automatically spawn a number of bots on map load
  • Set up specific scenarios for non-standard events

Override Commands & Server-Side Modding

Server administrators are able to create and customise their own roleplay scenarios through various server-side configuration settings. Override commands can be used to create a unique experience that is not limited by the usual confines of Holdfast: NaW’s original gameplay design. Configure limits for classes, define the allowed spawnable classes per spawn point, select the equipment they spawn with, equip weapons from racks, replenish ammunition, spawn various props, interactable objects and artillery pieces per map rotation and more.

Here’s how you can make use of override commands and any other related commands that can prove useful to help you get started or create your own scenarios.

Land

Class Limit Override On Spawn Points

Spawn override commands provide administrators with the ability to define which classes to spawn on which spawn location and their limitations as well. By using the following override, you can also have classes that are only playable on naval and coastal scenarios be present on army-based game modes.

Note: This will overwrite (not add to!) the classes available at a spawn point.

Tahir Desert Army Battlefield 200 Carpenters vs 200 Rifleman
spawn_override <Spawn Point> <Class> <Class Limit>
<Spawn Point> correlates to the spawn present in the spawn menu for instance Barricade (A) on Spanish Farm. Values are defined as letters for <Spawn Point> A B C D E F G H etc...
<Class> The name of the class being added to the spawn point
<Class Limit> An integer value between 1 and 255 - Set the number of players allowed to spawn as the specified class

Example

These commands will give 1 team 200 of the carpenter class and the other team 200 Riflemen:

# Override Commands (This is a comment and will be ignored by the game)
spawn_override A Carpenter 200
spawn_override B Rifleman 200

To use this command, it must be added after !map_rotation start and before !map_rotation end.

Starting Weapon Override

Make use of the following override command to define the weapons each and every class for a particular faction spawn with. Due to the introduction of weapon racks that allow players to equip weapons irrespective of their class, a particular class can now spawn with multiple different firearm or melee weapon types.

To use this command for yourself it must be added after !map_rotation start and before !map_rotation end in the following format...

starting_weapons_override <Faction> <Class> <Maximum Firearm Weapons> <Maximum Melee Weapons> <Starting Weapon>
<Faction> The Faction of the Class you wish to customize
<Class> The name of the class you wish to customize
<Maximum Firearm Weapons> An integer value between 0 and 50. The Maximum amount of Firearms that the class can possess through either the starting weapons commands or weapon racks.
<Maximum Melee Weapons> An integer value between 0 and 50. The Maximum amount of Melee Weapons that the class can possess through either the starting weapon commands or weapon racks.
Bayoneted Muskets count both as a firearm and a melee weapon
Allowing unarmed combat with fists also counts as a melee weapon
<Starting Weapon> - The weapon(s) that the class will spawn with

For multiple weapons add a space then another <Starting Weapon>:

starting_weapons_override <Faction> <Class> <Maximum Firearm Weapons> <Maximum Melee Weapons> <Starting Weapon> <Starting Weapon> <Starting Weapon> <Starting Weapon>

Example

Give the British grenadiers a rifle and give the French grenadiers a rifle, pike & sabre:

# Override Commands (This is a comment and will be ignored by the game)
starting_weapons_override British Grenadier 4 2 Rifle_Pattern1800Infantry
starting_weapons_override French Grenadier 4 3 Rifle_Pattern1800Infantry Pike Sabre

To use this command, it must be added after !map_rotation start and before !map_rotation end.

Firearm Ammo Override

Use the following override command to configure firearm ammunition related settings as well as limitations. As the functionality for pickable weapons through weapon racks and ammo boxes exists within the game, through these settings we allow you to configure ammunition related settings for each and every weapon based on the class a firearm is being equipped by.

Input the below commands per map rotation in the server configuration file.

firearm_ammo_override <Faction> <Class> <Firearm> <Starting Ammo> <Loaded Ammo In Barrel> <Maximum Carryable Ammo>

<Faction> The Faction of the Class you wish to customize
<Class> The name of the class you wish to customize
<Firearm> The type of firearm that you are customizing
<Starting Ammo> An integer between 0 and 255 - The amount of ammunition the firearm will start with
<Loaded Ammo> An integer defined as a numerical value between 0 and 255 - How much ammunition is preloaded into the firearm for the weapons
Using values of 2 and above will act as temporary increase in clip size until the ammunition is drained and a reload is required.
<Maximum Carryable Ammo> An integer between 0 and 255 - The maximum amount of ammunition able to be carried for a firearm.
This value can be larger than <Starting Ammo> for game-modes that use the ammo box object

Example

Give the British light infantry two rounds but none in the barrel and give the French light infantry a musket with one loaded round but none in reserve:

# Override Commands (This is a comment and will be ignored by the game)
firearm_ammo_override British LightInfantry Musket 2 0
firearm_ammo_override French LightInfantry Musket 0 1

To use this command, it must be added after !map_rotation start and before !map_rotation end.

Sapper Buildable Defences Limitations

Configure limitations per buildable object. With this, you can disable explosives, increase the buildable chair limit and more.

It is important to note this command functions similar to an RC command and it will persist through rounds. This means that if you disable explosives on the first map rotation, they will remain disabled on the map rotations following that unless otherwise enabled once more in a subsequent rotation.

Input the below commands per map rotation in the server configuration file.

sappers_buildlimit <Emplacement Type> <Attacking Or Defending> <Emplacement Limit>

<Emplacement Type> The emplacement you wish to set a limitation on
<Attacking Or Defending> If the limit should apply for the attacking or defending faction
<Emplacement Limit> An integer between 0 and 255 - Set a limit on the allowed buildable emplacements

Example

Disable the use of explosive barrels for the defending faction:

# Sapper Configuration Commands (This is a comment and will be ignored by the game)
sappers_buildlimit ExplosiveBarrel defending 0

To use this command, it must be added after !map_rotation start and before !map_rotation end.

Sapper Buildable Defences Starting Materials

Define the starting materials for the attacking and defending factions.

Input the below commands per map rotation in the server configuration file.

sappers_attacking_starting_materials <Material Limit>
sappers_defending_starting_materials <Material Limit>
<Material Limit> An integer between 0 and 10000 - Set the materials each faction starts with

Example

Set the starting limit for the attackers to 50 and the defenders to 200:

# Sapper Configuration Commands (This is a comment and will be ignored by the game)
sappers_attacking_starting_materials 50
sappers_defending_starting_materials 200

To use this command, it must be added after !map_rotation start and before !map_rotation end.

Naval

Class Limit Override On Ships

By using the following override commands, you can define your own selection of classes to spawn on which ship. It also provides you with the option of allowing players to spawn with army-based classes on ships. IE. If you’re looking at allowing players to spawn with the Line Infantry Class on the 13-Gun Brig-Sloop, you can do just that.

Input the below commands per map rotation in the server configuration file.

ships_spawn_detail_override <Ship Type> <Faction> <Class> <Class Limit>

<Ship Type> Ship type of which to override the spawn point of
<Faction> The Faction of the ship
<Class> The name of the class being added to the spawn point
<Class Limit> An integer value between 1 and 255

Example

"Only" allow 200 Riflemen for British and French frigates.

# Override Commands (This is a comment and will be ignored by the game)
ships_spawn_detail_override Frigate50gun British Rifleman 200
ships_spawn_detail_override Frigate50gun French Rifleman 200

To use this command, it must be added after !map_rotation start and before !map_rotation end.

Ship Spawning & Custom Ship Presets

Make use of the commands below to define the ship types to spawn in a particular map rotation. Through the same command, you can also define the number of ships to spawn, for which faction as well as their paint scheme. It works on both the Naval Battlefield, Naval Assault & Coastal Siege game modes. You must make sure to set ‘ships_preset’ index to 37 per map rotation before using the command below. This preset index doesn’t contain any ships so you retain further control over the ships you want to spawn. IE. You can spawn in 1 50-Gun Frigate with a yellow and black color scheme for the British faction while having 3 8-Gun Schooners for the French with a random color variation

Input the below commands per map rotation in the server configuration file.

ships_spawn <Ship Type> <Amount Of Ships> <Faction> <Color>

<Ship Type> Ship type to spawn
<Amount Of Ships> An integer between 0 and 50 - Amount of ships to spawn
<Faction> The Faction of the ship
<Color> Color is defined as an integer between 0 and 5

Example

Spawn 1 British frigate and 10 French rocketboats.

# Override Commands (This is a comment and will be ignored by the game)
# Set ship_preset to 37 (doesn't spawn any ships)
ships_preset 37
# Spawn ships
ships_spawn Frigate50gun 1 British 0
ships_spawn Rocketboat 10 French 4

To use this command, it must be added after !map_rotation start and before !map_rotation end.

Health Override For Ships

Administrators can define health points for each and every naval vessel type within the game. This addition could prove useful for organised events or perhaps even the creation of unique scenarios featuring flagships.

Input the below commands per map rotation in the server configuration file.

ships_health_detail_override <Ship Type> <Faction> <Health Points>

<Ship Type> Ship type to spawn
<Faction> The Faction of the ship
<Health Points> An integer value between 0 and 99999 - Health Points of the ship

Example

Set British frigate HP to 20000 and French frigate HP to 70 because Britannia rules the waves.

# Override Commands (This is a comment and will be ignored by the game)
ships_health_detail_override Frigate50gun British 20000
ships_health_detail_override Frigate50gun French 70

To use this command, it must be added after !map_rotation start and before !map_rotation end.

Ship Spacemode

Be at the forefront of interplanetary travel! By inserting this command per map rotation, you can enable ships to fly. Press the ‘Space’ key to ascend and the ‘Shift’ key to descend.

Input the below command per map rotation in the server configuration file.

ships_spacemode <True or False>

<True or False> True enables ships to fly while false is the default gameplay

Example

Enable ships to fly.

# Fun Commands (This is a comment and will be ignored by the game)
ships_spacemode true

Object Override

Weapon Racks

Weapon Racks are interactable objects that can hold specific amounts of weapons. Players can interact with a weapon rack by holding 'E' to take a weapon from the rack and add it to their character's inventory. Taking a weapon depletes the amount left on the rack allowing for a limited supply of weapons if the server host wishes.

objects_override WeaponRack <Object Position> <Object Rotation> <Weapon> <Number Of Weapons In Rack>
<Object Position> A set of float values in the format x y z = 0.0 0.0 0.0 - The location of where the Weapon Rack will be spawned onto the map using x, y, and z coordinates
Enter get playerPosition into the console ingame to display your character's position.
<Object Rotation> A set of float values in the format x y z = 0.0 0.0 0.0 - The orientation that the Weapon Rack will be rotated when spawned onto the map
Enter get playerRotation into the console ingame to display your character's rotation.
<Weapon> The type of weapon that will be on the weapon rack
<Number Of Weapons In Rack> An integer value between 0 and 255 - The number of weapons that can be obtained from the rack before its depleted

Example

Spawn a weapon rack at position (1 2 3) with rotation (7 8 9) with 4 rifles on it:

# Override Commands (This is a comment and will be ignored by the game)
objects_override WeaponRack 1 2 3 7 8 9 BakerRifle 4

To use this command, it must be added after !map_rotation start and before !map_rotation end.

Firearm Ammoboxes

Customizable Ammobox for role-play and custom events. Through this, players can replenish their ammunition.

objects_override firearmammobox <Object Position> <Object Rotation> <Firearm> <Maximum Interactions Until Depletion> <Ammo Given> <Maximum Interactions Allowed Per Player>

<Object Position> A set of float values in the format x y z = 0.0 0.0 0.0 - The location of where the firearmammobox will be spawned onto the map using x, y, and z coordinates
Enter get playerPosition into the console ingame to display your character's position.
<Object Rotation> A set of float values in the format x y z = 0.0 0.0 0.0 - The orientation that the firearmammobox will be rotated when spawned onto the map
Enter get playerRotation into the console ingame to display your character's rotation.
<Firearm> Which Firearm will the ammunition box replenish
<Maximum Interactions Until Depletion> An integer value between 0 and 255 - The amount of times players can retrieve ammunition from the box
<Ammo Given> An integer value between 0 and 255 - The amount ammunition given to a player on each interaction
<Maximum Interactions Allowed Per Player> An integer value between 0 and 255 - The Maximum times a specific player may retrieve ammunition from the box
Useful to prevent a player from hogging all the ammo

Example

Spawn a firearm ammobox at position (1 2 3) with rotation (7 8 9) with 20 total rounds depleted at a rate of 2 rounds per usage.

# Override Commands (This is a comment and will be ignored by the game)
objects_override firearmammobox 1 2 3 7 8 9 20 2 1

To use this command, it must be added after !map_rotation start and before !map_rotation end.

Artillery & Other Props

This command allows server hosts to add a massive assortment of objects such as extra artillery equipment, barricades, target dummies and pianos.

objects_override <Spawnable_Props> <Object Position> <Object Rotation>

<Spawnable_Props> Object which to spawn
<Object Position> A set of float values in the format x y z = 0.0 0.0 0.0 - The location of where the object will be spawned onto the map using x, y, and z coordinates
Enter get playerPosition into the console ingame to display your character's position.
<Object Rotation> A set of float values in the format x y z = 0.0 0.0 0.0 - The orientation that the object will be rotated when spawned onto the map
Enter get playerRotation into the console ingame to display your character's rotation.

Example

Spawn a chair at position (1 2 3) with rotation (7 8 9). Spawn a 9 Pounder cannon at position (5 6 7) with rotation (9 11 23).

# Override Commands (This is a comment and will be ignored by the game)
objects_override Chair1 1 2 3 7 8 9
objects_override CannonFieldGun9Pdr 5 6 7 9 11 23

To use this command, it must be added after !map_rotation start and before !map_rotation end.