Difference between revisions of "Map Editing"

From Holdfast: Nations At War
Jump to navigation Jump to search
(Created page with "Holdfast allows server owners to customise existing maps to create a whole new experience. You can add props, change spawns, weapon setup, class limits, etc. until you have c...")
 
m (Title changes)
Line 46: Line 46:
 
<div style="clear:both;"></div>
 
<div style="clear:both;"></div>
 
=Placing Props=
 
=Placing Props=
Props come in all shapes and sizes, from an invisible patch of air that generates butterflies to an entire fort!  Some allow interaction, and some are just for show.  Simple props need only the position and rotation to be specified, whereas more complex props require additional options to be useful.
+
Props come in all shapes and sizes, from an invisible patch of air that generates butterflies to an entire fort!  Some allow interaction, and some are just for show.  Decorative props need only the position and rotation to be specified, whereas more complex props with interactions require additional options to be useful.
  
==Simple Props==
+
==Decorative Props==
 
You can see a list of all of the available props on the [[Spawnable_Props|Spawnable Props]] page.  To place these props, you add a line like this to the map rotation:
 
You can see a list of all of the available props on the [[Spawnable_Props|Spawnable Props]] page.  To place these props, you add a line like this to the map rotation:
  
Line 87: Line 87:
 
</pre>
 
</pre>
  
==Complex Props==
+
==Interactable Props==
 
These props require additional options to define how they behave in the map.
 
These props require additional options to define how they behave in the map.
 
===Weapon Racks===
 
===Weapon Racks===

Revision as of 20:21, 20 August 2019

Holdfast allows server owners to customise existing maps to create a whole new experience. You can add props, change spawns, weapon setup, class limits, etc. until you have created something entirely new. Map customisation is defined using Map Rotations in the configuration file.

Starting Maps

As well as building upon the normal maps, there are two flat and empty maps that are perfect to let your imagination run wild: CutomMap and CustomMapNaval. As you'll want to spend plenty of time setting up your new map, create a new rotation with an unlimited timer and open spawns such as the one below:

CustomMap
!map_rotation start
map_name CustomMap
game_mode ArmyBattlefield
round_time_minutes -1
reinforcements_per_faction 9000
wave_spawn_time_seconds 1
max_player_respawns -1
faction_balancing false
allow_midround_spawning true
allow_faction_switching true
allow_spectating true
minimum_players -1
maximum_players 150
time_hour 8
time_dynamic false
friendly_fire true
weather_preset calm
weather_dynamic false
game_type hardcore
!map_rotation end

To refresh changes to your map without restarting your server, issue the following commands in the console (substituting the correct index for your map rotation):

rc fileReloader serverConfigFile
rc mapRotation 1

Positioning

Before placing a prop, you need to work out where you want it to go in the map, and what direction you want it to face. The easiest way to do this is to walk where you want the object in game, open your console using F1 and type get into the console.

The output of get

Note that this gives you two sets of numbers:

playerPosition => (15.3, 16.8, 146.9)
playerRotation => (0.0, 218.0, 0.0)

Position determines the (X,Y,Z) position in 3D space that the object is at. Positive X is North, positive Y is up, and positive Z is West. Rotation is measured in degrees around the (X,Y,Z) axes - this means that you'll be using the Y rotation most of all to turn objects, whereas the X and Z axes are used to tilt. As an example, to face the opposite direction to the above co-ordinates, you would want to set a rotation of (0.0, 38.0, 0.0), a full 180 degrees round on the Y axis.

Placing Props

Props come in all shapes and sizes, from an invisible patch of air that generates butterflies to an entire fort! Some allow interaction, and some are just for show. Decorative props need only the position and rotation to be specified, whereas more complex props with interactions require additional options to be useful.

Decorative Props

You can see a list of all of the available props on the Spawnable Props page. To place these props, you add a line like this to the map rotation:

objects_override <prop> <pX> <pY> <pZ> <rX> <rY> <rZ>

<prop> The enum of the prop listed on the Spawnable Props page.
<pX> <pY> <pZ> A set of float values in the format x y z = 0.0 0.0 0.0 - The location of where the prop 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.
<rX> <rY> <rZ> A set of float values in the format x y z = 0.0 0.0 0.0 - The rotation in degrees of the prop around the x, y, and z axes.
Enter get playerRotation into the console ingame to display your character's position.
CustomMap

For example, to add a Target Dummy to the position identified above, the rotation would become:

!map_rotation start
map_name CustomMap
game_mode ArmyBattlefield
round_time_minutes -1
reinforcements_per_faction 9000
wave_spawn_time_seconds 1
max_player_respawns -1
faction_balancing false
allow_midround_spawning true
allow_faction_switching true
allow_spectating true
minimum_players -1
maximum_players 150
time_hour 8
time_dynamic false
friendly_fire true
weather_preset calm
weather_dynamic false
game_type hardcore
objects_override TargetDummy 15.3 16.8 146.9 0.0 218.0 0.0
!map_rotation end

Interactable Props

These props require additional options to define how they behave in the map.

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 Rifle_Pattern1800Infantry 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.

Polishing Up

Once you have the map laid out how you want, you can edit the class limits, spawn locations, and other settings as usual by following the instructions in Server Configuration.