Skip to content

ModdedTitanData

JMM889901 edited this page Aug 23, 2023 · 3 revisions

Modded Titan Data

ModdedTitanData is the struct used to define the attributes and loadout of a titan to titanframework, when used with CreateModdedTitanSimple titanframework will create build the titan and add its values to all neccecary tables and overrides

Titan loadout

weapons and abilities rely on

global struct ModdedTitanWeaponAbilityData{
	string displayName
	string weaponName
	string description
	asset image = $"ui/temp"
	string functionref(TitanLoadoutDef) MenuModelWeaponFunc 
	bool custom = false
	bool scriptHandled = false
}

MenuModelWeaponFunc provides an alternative way of choosing the weapon to display in menus and is intendeed to be used with scriptHandled which determines whether the weapon is given on spawn and treates a real weapon, use if the "weapon" specified does not exist as an actual txt or is only present as a placeholder

Primary [ModdedTitanWeaponAbilityData]

The primary weapon of the titan

Left [ModdedTitanWeaponAbilityData]

The left or (typically) defensive ability

Mid [ModdedTitanWeaponAbilityData]

The mid or (typically) utility ability

Right [ModdedTitanWeaponAbilityData]

The right or (typically) offensive ability

Melee [String] [Optional]

The titans melee weapon

Voice [String] [Optional]

The titans OS voice to use

for more advanced control over voicelines you can use RegisterTitanAudioFunctionByTitan to specify a custom function to handle playing voicelines for a titan

Passives and persistent vars

These rely on

global struct ModdedPassiveData{
	string Name
	string DisplayName
	string Type //For FD
	string description
	asset image = $"ui/temp"
	bool customIcon = false
	int itemType //Used exclusively for PILOT passives
}

Note that custom icons must set customIcon to true or the passive icons will not render correctly in menus

passiveXArray [array<ModdedPassiveData>] [Optional]

passive2Array and passive 4-6 array

Specify the passives to create for that slot, passive 2 repesents the default titan kit slot and passives 4-6 represent the monarch passives slots

As with all passives this just creates the items, logic for applying the passives must still be done in script

ValidationOverrides [table<string, CustomPersistentVar>] [Optional]

allows the definition of custom persistent variables that can be set by users, these can be used to create additional passive slots, to make normal attributes changable (such as weapons or abilities), or to allow more advanced behaviour for existing passive slots, such as allowing users to equip existing passives for passive2

	CustomPersistentVar Primary
	Primary.property = "primary"
	Primary.defaultValue = "mp_titanweapon_xo16_vanguard"
	Primary.passiveItemsMethod = eItemsMethod.FIND_ALL_TYPE //FIND_ALL_TYPE will setup all items matching itemTypeOverride as accepted items
	Primary.itemTypeOverride = eItemTypes.TITAN_PRIMARY

	Chimera.ValidationOverrides["primary"] <- Primary

code allowing chimera to select any known titan primary weapon

UI Names, descriptions etc.

Name [String] [Localized]

The titans class or name. Cannot contain spaces, if you do wish to include spaces you can use localization strings, which is best practice anyway

Archon.Name = "#DEFAULT_TITAN_1"

Brute.Name = "Brute"

Description [String] [Localized] [Optional]

The description for the titan as appears in the select titan screen.

Archon.passiveDisplayNameOverride = "#TITAN_OS_ARCHON_NAME"

Chimera.Description = "This is the description for Chimera"

titanHints [Array<String>] [Localized] [Optional]

An array representing the "hints" shown on the titan loadout edit screen.

	Chimera.titanHints = [
	"#DEATH_HINT_CHIMERA_001",
	"#DEATH_HINT_CHIMERA_002",
	"#DEATH_HINT_CHIMERA_003",
	"#DEATH_HINT_CHIMERA_004",
	"#DEATH_HINT_CHIMERA_005",
	"#DEATH_HINT_CHIMERA_006"
	]

passiveDisplayNameOverride [String] [Localized] [Optional]

The text for the titan kit menu title, defaults to TITAN_KIT_DEFAULT, which is localized to Custom titan kit

Archon.passiveDisplayNameOverride = "#TITAN_OS_ARCHON_NAME"

titanReadyMessageOverride [String] [Localized] [Optional]

Text for the in-match titanfall ready hud element, defaults to TITAN_READY_DEFAULT, which is localized to Titan Ready

dashStat [Int] [Optional]

The number of stars in the dash category for the titan overview

healthStat [Int] [Optional]

The number of stars in the health category for the titan overview

damageStat [Int] [Optional]

The number of stars in the damage category for the titan overview

speedStat [Int] [Optional]

The number of stars in the speed category for the titan overview

difficulty [Int] [Optional]

The number of stars in the difficulty category for the titan overview

icon [Asset] [Optional]

The path for the titans icon, Optional but defaults to $"ui/temp" which looks bad

Archon.icon = $"archon/menu/archon_icon_medium"

coreIconOverride [Asset] [Optional]

That path for the core icon, used for some ui inplace of the titans icon, if empty will default to the hud icon of the core ability so shoould be used where you want a different core icon, or have a core ability with no icon.

fdRole [String] [Optional] [Localized]

Stated role in the titan FD panel, if left empty will use the base titans role.

loadoutMenuControllerFunc [void functionref(array<var> icons, string ref)] [Optional]

Define a function to control the loadout info panel on the custom loadouts screen, useful if you specify persistent values and want them to be displayed When working with the vars passed you must use get child to get PassiveImageMod as moving the initial var may break the menu entirely

Models and setfiles

BaseSetFile [String]

The setfile for the titan to inherit menu animations and functional stats (such as health an walkspeed) from.

By default the titan will also use the model and animations of this titan.

The titan used for this value must match the titan specified in BaseName.

Chimera.BaseSetFile = "titan_atlas_tracker"

Archon.BaseSetFile = "titan_atlas_stickybomb"

modelBaseOverride [Asset] [Optional]

Optional model override, used to change the titan model from the one inherited from BaseSetFile to a custom one, the new model must support all the same animations as the base one.

For selectable models or multiple chassis see altChassisArray

modelPrimeOverride [Asset] [Optional]

Optional model override, used to change the titans prime model from the one inherited from BaseSetFile to a custom one, the new model must support all the same animations as the base one.

For selectable models or multiple chassis see altChassisArray

altChassisArray [array<FrameworkChassisStruct>] [Optional]

Used to define a list of alternate setfiles selectable from the prime titan button.

FrameworkChassisStruct requires:

  • setFile [String]
  • name [String]
    • the item/chassis name in the chassis select menu, as well as the internal ref
  • executionAnimationType [Int]
    • the item type for executions that can be used when this setfile is selected

it can also have

  • modelOverride [Asset]
  • description [String]
    • the item description of the chassis option

To use altChassisArray you must first set altChassisType to frameworkAltChassisMethod.ALT_TITAN

altChassisType [Enum<frameworkAltChassisMethod>] [Optional]

Defines the behaviour of the prime titan button and how/if to validate alternate setfiles and the IsPrime setting

  • frameworkAltChassisMethod.PRIME_TITAN
    • Default behaviour, with the exception of vanguard all titans will switch to the prime titan setfile or vice-versa upon pressing the button
  • frameworkAltChassisMethod.ALT_TITAN
  • frameworkAltChassisMethod.NONE
    • prime titan button disabled