Skip to main content

AspectObject

The basis of the Weapon Aspect is the Aspect object. It is an object located in TraitData, a table that contains all of the game traits which includes Boons / Daedalic Hammers and Weapon Aspects. The aspect object contains all data needed for the aspect to function and each of its parameters are listed below.

Base game Aspects can be accessed through TraitSetData which feeds into TraitData

TraitSetData.Aspects.BaseStaffAspect for the Staff.

TraitSetData.Aspects.DaggerBackstabAspect for the Daggers.

TraitSetData.Aspects.TorchSpecialDurationAspect for the Torches.

TraitSetData.Aspects.AxeRecoveryAspect for the Axe.

TraitSetData.Aspects.LobAmmoBoostAspect for the Skull.

TraitSetData.Aspects.BaseSuitAspect for the Suit.

Aspects contain the following parameters:

Note! - The list below is incomplete

InheritFrom

Where all of the available parameters stem from, crucial to copy this line as is.

InheritFrom = { "WeaponEnchantmentTrait" },

Icon

contains the reference to the icon seen in all menus for the aspect. The parameter contains the path to the Icon image so that the game could locate it. It should be written exactly as mentioned in the .pkg_manifest of the associated .pkg which compressed the icon.png.

Base game Icons

Can be located in Packages/1080p/GUI.pkg
Full steam directory C:/Program Files (x86)/Steam/steamapps/common/Hades II/Content/Packages/1080p/GUI.pkg you can extract the .pkg into a visible .png using deppth2 ext function. After unpacking, most weapon Icons are stored in GUI/textures/atlases/GUI_Textures27.png

Icon = "Hammer_Icon_41", --example of base_game icon path

Custom Icons

You can create your custom icons using any software such as paint / paint.net / photoshop ... and save the output as .png The size of your icons should be 150x150 pixels. Place all desired icon .png in a single folder then compress them into a .pkg using deppth2 hpk function.

Icon = "JarlUlsfark-AspectYoungMel\\SkullAspectYoungMelIcon", --example from deppth2 hpk output icon path

NOTE! When using a custom Icon the package has to first be loaded into the game. See first-mod-guide.

RequiredWeapon

the name of the base weapon the Aspect belongs to, This will cause the aspect to inherit all of the weapon default attacks, animation and so forth.

Staff = WeaponStaffSwing

Dagger = WeaponDagger

Torches = WeaponTorch

Axe = WeaponAxe

Skull = WeaponLob

Suit = WeaponSuit

RequiredWeapon = "WeaponStaffSwing",

PreEquipWeapons

In order to allow the Hero character to use new attacks that already exist in the game or custom attacks that were inserted into the game they need to be pre-equipped into the aspect. The example below shows the two new attacks inserted in the Axe aspect of Nergal to create the 5-hit attack combo.

PreEquipWeapons = { "WeaponAxe4", "WeaponAxe5"},

WeaponKitGrannyModel

The name of the 3D model that would appear in the aspect selection menu. 3D models are stored in .gpk files and located in /GR2/_Optimized/

Base Staff - WeaponKitGrannyModel = "WeaponStaff_Mesh",

Base Daggers - WeaponKitGrannyModel = "WeaponDagger_Mesh",

Base Torches - WeaponKitGrannyModel = "WeaponHecateMultiple_Mesh",

Base Axe - WeaponKitGrannyModel = "Melinoe_Axe_Mesh1",

Base Skull - WeaponKitGrannyModel = "WeaponLob_Mesh",

Base Suit - WeaponKitGrannyModel = "WeaponSuitMultiple_Base_Mesh",

ReplacementGrannyModels

The 3D models that the hero character would wear during the game. Some weapons require only one model (Staff / Axe / Skull) while other require two (Torches / Daggers) or even three (Suit).

Base Weapon Meshes

Staff

		ReplacementGrannyModels = 
{
WeaponStaff_Mesh = "WeaponStaff_Mesh"
},

Daggers

ReplacementGrannyModels = 
{
WeaponDaggerA_Mesh = "WeaponDaggerA_Mesh",
WeaponDaggerB_Mesh = "WeaponDaggerB_Mesh"
},

Torches

ReplacementGrannyModels = 
{
WeaponTorchR_Mesh = "WeaponTorchR_Mesh",
WeaponTorchL_Mesh = "WeaponTorchL_Mesh"
},

Axe

ReplacementGrannyModels = 
{
Melinoe_Axe_Mesh1 = "Melinoe_Axe_Mesh1",
},

Skull

ReplacementGrannyModels = 
{
WeaponLob_Mesh = "WeaponLob_Mesh"
},

Suit

ReplacementGrannyModels = 
{
WeaponSuitR_Base_Mesh = "WeaponSuitR_Base_Mesh",
WeaponSuitL_Base_Mesh = "WeaponSuitL_Base_Mesh",
WeaponSuitB_Base_Mesh = "WeaponSuitB_Base_Mesh",
},

RarityLevels

A value that changes between aspect ranks. This is used in the generation of the weapon trait and in displaying the text of the trait.

RarityLevels =
{
Common = --Rank 1
{
Multiplier = 1,
},
Rare = --Rank 2
{
Multiplier = 1.333,
},
Epic = --Rank 3
{
Multiplier = 1.666,
},
Heroic = --Rank 4
{
Multiplier = 2,
},
Legendary = --Rank 5
{
Multiplier = 2.333,
},
Perfect = --Rank 6
{
Multiplier = 2.666,
},
},

Elsewhere in the aspect whenever the value {BaseValue = 1) is mentioned BaseValue is the multiplier based on the rank with 1 being the default value if there are no specified ranks

WeaponDataOverride

Changes from the default weapon of all parameters in WeaponData Specify for each different attack. Base game WeaponData can be accessed in Scripts/WeaponData_XXXXXX.lua with each weapon having their own file. WeaponData contains parameters such as Sounds and ChargeWeaponStages

WeaponDataOverride =
{
WeaponDaggerThrow = { --Changes Dagger special
ChargeWeaponStages =
{
{ ManaCost = 12, WeaponProperties = { Projectile = "ProjectileDaggerThrow", FireGraphic = "Melinoe_Dagger_SpecialEx_Fire", NumProjectiles = 3, AdditionalProjectileWaveChance = 0, ProjectileInterval = 0.08}, ApplyEffects = { "WeaponDaggerThrowEXDisable", "WeaponDaggerThrowEXDisableCancellable", "WeaponDaggerThrowEXDisableMoveHold" }, Wait = 0.32, HideStageReachedFx = true, ChannelSlowEventOnEnter = true },
{ ManaCost = 16, WeaponProperties = { NumProjectiles = 4, AdditionalProjectileWaveChance = 0}, ApplyEffects = { "WeaponDaggerThrowEXDisable", "WeaponDaggerThrowEXDisableCancellable", "WeaponDaggerThrowEXDisableMoveHold" }, Wait = 0.14, HideStageReachedFx = true, },
},
Sounds =
{
ImpactSounds = {
Invulnerable = "/SFX/Player Sounds/ZagreusShieldRicochet",
Armored = "/SFX/Player Sounds/ZagreusShieldRicochet",
},
},
},
},

PropertyChanges

Allows the aspect to change any properties specified in Game/Weapons/PlayerWeapons.sjson, a file which contains the actual gameplay related parameters of each weapon attack. Including damage, projectiles, VFX...

PropertyChanges =
{
{
WeaponName = "WeaponDagger2",
WeaponProperty = "SwapOnFire",
ChangeValue = "WeaponDagger",
},
{
WeaponName = "WeaponDagger",
ProjectileName ="ProjectileDaggerSliceLeft",
ProjectileProperty = "Damage",
ChangeValue = 40,
ChangeType = "Absolute"
},
},

Triggers

Functions that occur while wearing the aspect each time the trigger occurs. Each trigger later calls a function. A perfect way to introduce aspect traits.

OnWeaponFiredFunctions - activates whenever an attack button is used.

OnProjectileCreationFunction - activates whenever a projectile is created.

OnProjectileDeathFunction - activates whenever a projectile is destroyed, (can be at max range or by a hit)

OnWeaponChargeFunctions - activates whenever a weapon charges

OnEnemyDamagedAction - activates whenever an enemy receives damage.

OnManaSpendAction - activates when spending mana.

OnEnemyDeathFunction - activates whenever an enemy dies.

OnEnemyCrittedFunction - Activates when an enemy suffers a critical hit.

OnBlockDamageFunction - activates whenever whenever damage is blocked.

OnSelfDamagedFunction - activates whenever the hero receives damage.

SetupFunction - When aspect is added.

OnUnequipFunctionName - When the aspect is removed.

OnCastEffectApplyFunction - activates when someone has the cast effect on them.

OnEffectApplyFunction - activates when an effect is applied.

OnEffectClearFunction - Activates when an effect is removed.

OnSprintAction - Activates when the hero sprints

Note! - each trigger may have slightly different arguement names.

OnEnemyDamagedAction = 
{
ValidWeapons = WeaponSets.HeroPrimaryWeapons, --Which attacks are allowed to trigger this funcion.
FunctionName = _PLUGIN.guid .. "." .. "ComboPresentation", -- the name of the function to be used following the trigger (mod.ComboPresentation)
FirstHitOnly = false, --If the attack strikes several targets would each target seperatly activates the function
Args = { --the arguements that pass into the function as functionArgs
test =''
},
},

Each function called by these triggets receives

weaponData - Any data about the attack from weaponData such as WeaponName

functionArgs - Any arguements given to the function in Args field.

triggerArgs - Any arguements about what triggered the function.

Add Modifiers

Add modifiers to attacks

AddOutgoingDamageModifiers - Adds damage modifiers

WeaponSpeedMultiplier - Adds speed modifiers

AddOutgoingLifestealModifiers - Adds Lifesteal modifiers

AddOutgoingCritModifiers - Adds critical hit modifiers

Note! - each modifier may have slightly different arguement names.

Miscellaneous parameters

Any variable the user wants to store, other functions could access these variable using local trait = GetHeroTrait() then access them by trait.VariableName

Combo = 0,
ComboDamageMod = 1,

FlavorText

The text id for the small sentence at the bottom when selecting an aspect.

FlavorText = "DaggerAspectofYoungMelinoe_FlavorText",

ExtractValues

Extracts ReportValues as key and export them as ExtractAs so other functions such as texts could access them.

ExtractValues =
{
{
Key = "ReportedIncrement",
ExtractAs = "TooltipIncrement",
Format = "Percent",
DecimalPlaces = 1,
SkipAutoExtract = true
},

StatLines

The text id for the number value that appear in the aspect card

StatLines =
{
"AspectDashRechargeStatDisplay",
},

Adding new Aspects into the game

Overwriting existing Trait

This is a rough way to add a new aspect as it deletes a currently existing aspect. This method is useful for temporary internal testing while building the weapon aspect before we insert it into the weapon shop.

Though it is a good practice to add the new aspect instead of overwriting before publishing the mod.

OverwriteTableKeys( TraitSetData.Aspects.AxeRecoveryAspect, AxeAspectofYoungMelinoe)

Adding new Aspects

Adding new aspects also requires Modifiying upgrade and shop menus so the new aspect would be selectable.

TraitData.AxeAspectofYoungMelinoe = AxeAspectofYoungMelinoe