Difference between revisions of "Custom Factions"
(For next update, will be adding to this.) |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
This 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. | This 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. | ||
+ | |||
+ | AGS / Harper have provided a template for creating Custom Factions to support this mod. | ||
+ | |||
This mod allows for players to replace the in-game assets to create custom factions by overriding existing factions. | 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 [[SDK User Guide|Holdfast SDK]] | # Install the [[SDK User Guide|Holdfast SDK]] | ||
− | # Install a code editor (eg [https://visualstudio.microsoft.com/ Visual Studio]) . This is required for the SDK to correctly build script-based mods. | + | # Install a code editor (eg [https://visualstudio.microsoft.com/ 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. | + | # 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. | + | # 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. | + | # Download and copy files from [https://github.com/LoganBlinco/BaseCustomFactionMod GitHub] into the mod folder. The scripts '''MUST''' be in the mods folder or they will not be included in the build. |
== Replacing Factions == | == Replacing Factions == | ||
+ | With a new mod created and files downloaded from the Github page, your folder should look like this: | ||
+ | [[File:Custom factions modfolder.png|border|none|thumb|Custom faction Mod folder structure]] | ||
+ | |||
+ | 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. | ||
+ | [[File:Custom factions folder structure.png|none|thumb]] | ||
+ | # 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. | ||
+ | # Fill the references in. Use the templates provided and the table as reference material | ||
+ | # Build and upload the mod. Make sure the scripts are inside the build folder otherwise it will not work. | ||
+ | [[File:Custom factions inspector.png|border|none|thumb|Inspector]] | ||
+ | [[File:Custom factions empty referecnes.png|none|thumb|References]] | ||
+ | [[File:Custom factions full references.png|border|none|thumb|Filled in references]] | ||
+ | # | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |+ | ||
+ | !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. | ||
+ | |[[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 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 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 | ||
+ | |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]] | ||
+ | |} | ||
== Configuration Settings == | == 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 | + | |
+ | 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 game mode only has two in game 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.<pre> | This will use custom factions based on ID instead of faction.<pre> | ||
− | mod_variable | + | mod_variable custom_factions:UseCustomFactions:true |
</pre>This will replace <code><faction ID></code> for the attacking or defending faction. <pre> | </pre>This will replace <code><faction ID></code> for the attacking or defending faction. <pre> | ||
− | mod_variable | + | mod_variable custom_factions:CustomAttackerFactionID:<faction ID> |
− | mod_variable | + | mod_variable custom_factions:CustomDefenderFactionID:<faction ID> |
</pre> | </pre> | ||
=== Example === | === 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. <pre> | 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. <pre> | ||
− | mod_variable_local | + | mod_variable_local custom_factions:UseCustomFactions:true |
− | mod_variable_local | + | mod_variable_local custom_factions:CustomAttackerFactionID:NA |
− | mod_variable_local | + | mod_variable_local custom_factions:CustomDefenderFactionID:Scand |
</pre> | </pre> |
Latest revision as of 10:26, 9 September 2023
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.
AGS / Harper have provided a template for creating Custom Factions to support this mod.
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.
- Fill the references in. Use the templates provided and the table as reference material
- Build and upload the mod. Make sure the scripts are inside the build folder otherwise it will not work.
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 game mode only has two in game 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 custom_factions:UseCustomFactions:true
This will replace <faction ID>
for the attacking or defending faction.
mod_variable custom_factions:CustomAttackerFactionID:<faction ID> mod_variable custom_factions: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 custom_factions:UseCustomFactions:true mod_variable_local custom_factions:CustomAttackerFactionID:NA mod_variable_local custom_factions:CustomDefenderFactionID:Scand