0
\$\begingroup\$

I am writing a mmorpg using Unreal Engine 5 and I plan to use the Gameplay Ability System but I am new to it. I have questions about some of the properties and if they belong as regular properties on the class or as part of an attribute set. The 3 classes concerned are Entity, Player and Monster, where Entity is the parent class of both Player and Monster. Likewise each class would have it's own corresponding attribute set resulting in the player and monster instances each having two attribute sets. Below is a breakdown of my properties and which attribute sets I think they belong in and also some other properties that I think belong on the classes but not in GAS. I am less concerned with feedback about something being in Entity vs player vs monster but would greatly appreciate any feedback about if you believe a property does or does not belong in a GAS attribute set. Thanks!

Included in GAS:

Entity (Parent of player and monster) Attribute Set

  • Level
  • CurrentHealth
  • CalculatedHealthRegen
  • CalculatedMaxHealth
  • CalculatedFireResistance
  • CalculatedIceResistance
  • CalculatedLightningResistance
  • CalculatedPoisonResistance
  • CalculatedCurseResistance
  • CalculatedMagicResistance
  • CalculatedMovementSpeed
  • CalculatedAttackSpeed
  • CalculatedCriticalRate
  • CalculatedCriticalDamage

Player Attribute Set

  • CurrentExperience (not sure about this but it affects level, which affects other calculations)
  • CurrentMana
  • CalculatedManaRegen
  • CalculatedMaxMana
  • CalculatedMP
  • CalculatedHP
  • CalculatedStrength
  • CalculatedDexterity
  • CalculatedIntelligence
  • CalculatedAttack
  • CalculatedDefense
  • CurrentWeight (based on strength which can be augmented by armor and skills)
  • CalculatedMaxWeightCapacity

Monster Attribute Set

  • AggroRange (potentially affected by a skill like provoke)

Maybes and No's: (Would be regular properties on the class instead of being part of an attribute set)

Entity

  • Name

Player

  • Nation
  • Race
  • StatPointsAvailable (not sure about this because it is incremented on level up but not decremented on level down, and is consumed when applied to a stat)
  • SkillPointsAvailable (not sure about this because it is incremented on level up but not decremented on level down, and is consumed when used to learn a skill)
  • MannerPoints (points gained by doing nation or race related quests, does not effect anything other than nation standing which as of now has no effect)
  • Nation Standing

Monster

  • MonsterType
  • IsAggro (Will this monster attack player in range automatically or wait to be attacked, not does this monster currently have a target)
\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

As a general rule, I would put properties in Attribute Sets when you want them to be involved in the calculations applied by Gameplay Effects (e.g. damage taken might be affected by your current Shield health, so the Shield health would go in the attribute sets).

Or if you want it to be buffed/debuffed by status effects, or have different values based on your character's level. That's another good reason to have it be in an attribute set. If I have compelling reasons not to put it in an attribute set, then I might just have a multiplier attribute in the attribute set. Last game I worked on, I had all the weapon tuning in data assets, because I found that putting it in attributes was too annoying and fiddly for the designers, and in practice all we really wanted was the ability to do things like globally buff weapon damage (game was just an FPS so not as complicated as an RPG), so I just created a WeaponDamageMultiplier attribute.

Another thing that's worth doing in my experience, is if you have attributes that heavily relate to a certain concept like health for a example (everything that I want to be damageable must have all these attributes), just create a separate attribute set for that. That way if later you want to create something like a damageable prop without all the baggage of other irrelevant attributes that the player/NPC attribute sets have, you can just apply the HealthAttributeSet to it

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .