Custom Factions

From Holdfast: Nations At War
Jump to navigation Jump to search

This page refers to a community made workshop mod created by User:Elf . For support using the mod, you can request support on the official holdfast discord in #Server-Owners.


This mod allows for players to replace the in-game assets to create custom factions by overriding existing factions.

Setting up the Mod

  1. Install the Holdfast SDK
  2. Install a code editor (eg Visual Studio) . This is required for the SDK to correctly build script-based mods.
  3. Make sure the SDK has your code editor linked. This can be found from edit -> Preferences -> External Tools and then selecting the correct External Script Editor.
  4. Create a new empty mod.
  5. Download and copy files from github into the mod folder. The scripts MUST be in the mods folder or they will not be included in the build.

Replacing Factions

Property Name Type Description Template
Faction ID Name string ID used for the faction when not using faction based replacement
Faction to override enum enum of which base-game faction the faction will replace
Custom Name to Use string The faction name used for the scoreboard or spawn menu.
Custom Name Adjective string Adjective to describe players of the factions. For example "the british are victorious" instead of "the britain are victorious"
Top Bar Sprite sprite The flag icons used at the top of the screen showing faction score.
Scoreboard Sprite sprite Image used on the scoreboard for the faction
Faction Selection Sprite sprite Image used for the faction selection screen
Faction Selection Disabled Sprite Image used for the faction selection screen if spawning is not enabled for the faction (eg player limit reached)
Square Round End Board Sprite Sprite Emblem used for the round end scoreboard
Flag Replacement Image Texture2D Texture used when replacing in-game flag objects (eg capture points).
Map Voting Sprite sprite Emblem used for the faction when map voting.


Configuration Settings

By default the mod will assign one Custom faction to one existing factions. However sometimes you may need more faction replacements than factions which exist in the game. For example the naval gamemode only has two ingame factions. Therefore by the config you can define which faction to override based on the attacker and defender name.


This will use custom factions based on ID instead of faction.

mod_variable xmg_rating:UseCustomFactions:true

This will replace <faction ID> for the attacking or defending faction.

mod_variable xmg_rating:CustomAttackerFactionID:<faction ID> mod_variable xmg_rating:CustomDefenderFactionID:<faction ID>

Example

For the melee community, a mod allows different national teams to be selected. The mod has 10+ factions which would not be possible without custom ID's. The following will replace the attacking faction with the NA custom faction and the defending faction with the Scandinavia custom faction.

mod_variable_local xmg_rating:UseCustomFactions:true
mod_variable_local xmg_rating:CustomAttackerFactionID:NA
mod_variable_local xmg_rating:CustomDefenderFactionID:Scand