Field Manual Modding – Arma Reforger

From Bohemia Interactive Community
Jump to navigation Jump to search
(Page creation)
 
m (Fix enum entry → enum constant)
Line 78: Line 78:
|-
|-
| Id
| Id
| This ID is an {{Link/Enfusion|armaR|EFieldManualEntryId}} enum entry - required only if this entry is to be opened from the outside (e.g a hint) through <enforce inline>SCR_FieldManualUI.Open(enumValue);</enforce>
| This ID is an {{Link/Enfusion|armaR|EFieldManualEntryId}} enum constant - required only if this entry is to be opened from the outside (e.g a hint) through <enforce inline>SCR_FieldManualUI.Open(enumValue);</enforce>
|-
|-
| Title
| Title

Revision as of 13:21, 24 March 2023

The Field Manual is the helpful in-game manual available at all time from either the main menu or the pause menu.

Here we will see how to add our own entries.


Config Modding

  • the actual structure is: Root Config > Categories > SubCategories > Entries > Pieces.
  • the structure itself can support an infinite amount of levels, but the UI does not.
  • a Category and a SubCategory are the same SCR_FieldManualConfigCategory object - they only differ in their hierarchy level.

Root Config

The Field Manual's root config can be found here: FieldManualConfigRoot.conf (in Data\Configs\FieldManual).

It holds:

  • the Field Manual's main title
  • the tab names
  • various layouts
  • categories (other .conf)
  • tile backgrounds from which it will select randomly

Add a Category

A category holds:

  • its title
  • sub-categories
  • A sub-category is identical to a category (SCR_FieldManualConfigCategory) - they only differ in hierarchy level.
  • Even if first-level categories can hold entries, they should not for the time being (they will be ignored as the UI does not support them).
  • Even if second-level categories can hold categories, they should not for the time being (they will be ignored as the UI does not support them).
Variable Description
Enabled This allows to enable/disable (show/hide) the category.
Title This is the category's title - it will also be shown in the config entry name
Categories Sub-categories to this category
Entries Sub-category entries to display (the "tiles" and their content)
Category Layout FieldManual_MenuCategory.layout by default
Sub Category Layout FieldManual_MenuSubCategory.layout by default

Add a Sub-Category

Repeat the same operation as above in a Category instead of the config root.

Add an Entry

The following entry types are available:

Variable Description
Enabled This allows to enable/disable (show/hide) the entry.
Id This ID is an EFieldManualEntryId enum constant - required only if this entry is to be opened from the outside (e.g a hint) through SCR_FieldManualUI.Open(enumValue);
Title This is the entry's title, both for the tile and for the opened entry - it will also be shown in the config entry name
Image The tile content. Recommended definition: 400×300.
Content A list of SCR_FieldManualPiece used to define and setup the entry's content.
Weapon Entity Path SCR_FieldManualConfigEntry_Weapon only: the path to the weapon's prefab (e.g Rifle_AK74.et)
Layout

Add Content

An Entry's content is made out of multiple pieces. All pieces are vertically set, one after another - there are no "image to the left, scroll to the right" elements.

The available piece types are as follow:

SCR_FieldManualPiece

SCR_FieldManualPiece - the parent type, not to be used directly.

SCR_FieldManualPiece_ConfigEntry

SCR_FieldManualPiece_ConfigEntry.

Variable Description
Display Name The config entry text
Config Path the .conf/.et file to read
Entry Path the config path, in format path/to/entry (case-sensitive!)
Value Format A specific format can be used along with %1
Layout FieldManual_Piece_ConfigEntry.layout by default
Decimal Move Move the comma left (negative) or right (positive), range -9..+9, default 0
Fixed Decimals Define the amount of number's decimals, range -1..5, default -1

SCR_FieldManualPiece_ConfigEntryList

SCR_FieldManualPiece_ConfigEntryList - a list of SCR_FieldManualPiece_ConfigEntry.

Variable Description
Config Entries A list of SCR_FieldManualPiece_ConfigEntry - see SCR_FieldManualPiece_ConfigEntry above
Layout FieldManual_Piece_ConfigEntryList.layout by default

SCR_FieldManualPiece_Header

SCR_FieldManualPiece_Header - a text "title".

Variable Description
Image Path Can be an .edds file or an .imageset
Image Set Name If an image set has been used in Image Path, set the image name here
Text The header's text
Layout FieldManual_Piece_Header.layout by default

SCR_FieldManualPiece_Image

SCR_FieldManualPiece_Image - a simple image.

Variable Description
Image Path Can be an .edds file or an .imageset
Image Set Name If an image set has been used in Image Path, set the image name here
Image Color Can be used to colour an image with a colour filter
Caption The text associated to the image; be wary as some layouts cannot take a long text
Layout FieldManual_Piece_Image.layout by default

SCR_FieldManualPiece_ImageGallery

SCR_FieldManualPiece_ImageGallery - a gallery of SCR_FieldManualPiece_Image.

Variable Description
Type One of -unknown class ("EFieldManual_ImageGalleryType") provided!-, can be either ICONS_VERTICAL, ICONS_LIST, GALLERY_HORIZONTAL or GALLERY_VERTICAL
Text The text displayed along the gallery
Images A list of SCR_FieldManualPiece_Image - see SCR_FieldManualPiece_Image above
Layout FieldManual_Piece_ImageGallery.layout by default

SCR_FieldManualPiece_Keybind

SCR_FieldManualPiece_Keybind - a keybind information.

Variable Description
Keybind The keybind in format <action name="ActionName"/>
Description The keybind's description
Input Display Condition One of SCR_EInputTypeCondition, can be either ALL_INPUTS, KEYBOARD_ONLY or GAMEPAD_ONLY:
  • ALL_INPUTS: the keybind is always displayed
  • KEYBOARD_ONLY: the keybind is only displayed if keyboard/mouse are currently used
  • GAMEPAD_ONLY: the keybind is only displayed if gamepad is currently used
The UI will automatically show/hide the appropriate keybinds when controls change.
Layout FieldManual_Piece_Keybind.layout by default

SCR_FieldManualPiece_KeybindList

SCR_FieldManualPiece_KeybindList - a list of SCR_FieldManualPiece_Keybind.

Variable Description
Keybinds A list of SCR_FieldManualPiece_Keybind keybinds - see SCR_FieldManualPiece_Keybind above
Layout FieldManual_Piece_KeybindList.layout by default

SCR_FieldManualPiece_LineBreak

SCR_FieldManualPiece_LineBreak an empty space, used to separate elements where a bigger gap is needed.

No variables.

SCR_FieldManualPiece_Separator

SCR_FieldManualPiece_Separator - a Reforger-themed horizontal separator

Variable Description
Padding Top Top padding, range 0..100, default 20
Width Percentage Total parent's width, range 0..100, default 75
Thickness "Height" of the separator, range 0..10, default 2
Padding Bottom Bottom padding, range 0..100, default 20
Layout FieldManual_Piece_Separator.layout by default

SCR_FieldManualPiece_Text

SCR_FieldManualPiece_Text - a block of text.

Variable Description
Text The paragraph's content
Layout FieldManual_Piece_Text.layout by default


Script Modding

The concerned classes are:

Open Field Manual

EFieldManualEntryId entryId = EFieldManualEntryId.CONFLICT_OVERVIEW; SCR_FieldManualUI.Open(entryId);