Difference between revisions of "Custom Factions"
Line 1: | Line 1: | ||
− | + | FThis page refers to a community made workshop mod created by [[User:Elf]] . For support using the mod, you can request support on the [https://discord.com/invite/holdfastgame official holdfast discord] in #Server-Owners. | |
Line 13: | Line 13: | ||
== Replacing Factions == | == Replacing Factions == | ||
+ | With a new mod created and files downloaded from the Github page, your folder should look like this: | ||
+ | |||
+ | |||
+ | Inside this file are three two sub-directories and a scene file. | ||
+ | |||
+ | * The scripts folder should not be touched since it is how the mod replaces the ingame assets. | ||
+ | * The official templates provided by Harper and AGS can be used as references to create custom faction images. | ||
+ | * The scene file is what will be used to create the mod. | ||
+ | |||
+ | # Open up the scene file. In the scene is an object called "[Manager]" click this to open the inspector in the right hand side of Unity. Top right click the padlock to fix it in place. | ||
+ | # Click the plus button to create your first custom faction. You can repeat this process to create multiple custom factions on the same mod. | ||
+ | # | ||
+ | |||
{| class="wikitable" | {| class="wikitable" | ||
|+ | |+ | ||
− | !Property | + | !Property |
!Type | !Type | ||
!Description | !Description | ||
Line 32: | Line 45: | ||
|Custom Name to Use | |Custom Name to Use | ||
|string | |string | ||
− | |The faction name used | + | |The faction name used in the Spawn menu and end of round screen |
| | | | ||
|- | |- | ||
Line 40: | Line 53: | ||
| | | | ||
|- | |- | ||
− | | | + | |Faction Crest |
− | | | + | |Sprite |
− | | | + | |This is the crest image of the faction used in various menus. |
− | | | + | |[[File:Custom factions crest.png|thumb|Rhein Crest]] |
|- | |- | ||
− | | | + | |Faction Emblem |
− | | | + | |Sprite |
− | | | + | |Emblem image used in the scoreboard and other menus. |
− | | | + | |[[File:Custom factions emlem.png|thumb|209x209px|Rhein Emblem]] |
|- | |- | ||
− | |Faction Selection | + | |Faction Background Selection |
− | | | + | |Sprite |
− | | | + | |Background flag used on the "Select faction" screen. This flag is only half of the image with a fade applied. Harper has provided a template for this, I recommend you use it. |
− | | | + | |[[File:Custom factions backgrouind.png|thumb|151x151px|Rhein background]] |
|- | |- | ||
− | |Faction | + | |Faction Top Image |
− | | | + | |Sprite |
− | | | + | |Flag used for the Top bar panel where faction scores are contained. |
− | | | + | |[[File:Custom factions topflag.png|thumb|153x153px|Rhein Top image]] |
|- | |- | ||
− | | | + | |Faction Map Voting Image |
|Sprite | |Sprite | ||
− | | | + | |Icon used for the map voting screen when a faction is selectable |
− | | | + | |[[File:Custom factions mapvoting.png|thumb|178x178px|Rhein Map voting Icon]] |
− | |||
− | |||
− | | | ||
− | | | ||
− | | | ||
|- | |- | ||
− | | | + | |Flag replacement Image |
− | | | + | |Texture |
− | | | + | |Texture used to replace in-game flags eg the flag shown in the spawn menu. I recommend using the Top Image for this. |
− | | | + | |[[File:Custom factions topflag.png|thumb|153x153px|Rhein Top Image]] |
|} | |} | ||
Revision as of 09:38, 9 September 2023
FThis 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.
Installing the mod
Before you can start creating custom factions, you must get your SDK setup.
- Install the Holdfast SDK
- Install a code editor (eg Visual Studio) . This is required for the SDK to correctly build script-based mods.
- 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.
- Create a new empty mod.
- 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
With a new mod created and files downloaded from the Github page, your folder should look like this:
Inside this file are three two sub-directories and a scene file.
- The scripts folder should not be touched since it is how the mod replaces the ingame assets.
- The official templates provided by Harper and AGS can be used as references to create custom faction images.
- The scene file is what will be used to create the mod.
- Open up the scene file. In the scene is an object called "[Manager]" click this to open the inspector in the right hand side of Unity. Top right click the padlock to fix it in place.
- Click the plus button to create your first custom faction. You can repeat this process to create multiple custom factions on the same mod.
Property | 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 in the Spawn menu and end of round screen | |
Custom Name Adjective | string | Adjective to describe players of the factions. For example "the british are victorious" instead of "the britain are victorious" | |
Faction Crest | Sprite | This is the crest image of the faction used in various menus. | |
Faction Emblem | Sprite | Emblem image used in the scoreboard and other menus. | |
Faction Background Selection | Sprite | Background flag used on the "Select faction" screen. This flag is only half of the image with a fade applied. Harper has provided a template for this, I recommend you use it. | |
Faction Top Image | Sprite | Flag used for the Top bar panel where faction scores are contained. | |
Faction Map Voting Image | Sprite | Icon used for the map voting screen when a faction is selectable | |
Flag replacement Image | Texture | Texture used to replace in-game flags eg the flag shown in the spawn menu. I recommend using the Top Image for this. |
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