Templating Classes - HeavyMetalPirate/DiscordFantasyUnlimited GitHub Wiki

Base model file

The base model file for templating equipment is CharacterClass.java.

Fields

If any field only has an allowed value set, the field will be case-sensitive!

  • id: a string representation of the unique identifier
  • name: the name of the class
  • iconName: the name of the icon
  • description: a short summary of the class
  • lore: the lore of the class

Starting gear

Each field represents the id of a weapon/equipment. If a class shouldn't start with equipment in the specific slot, you should put a "-1". The following slots are available:

  • startingMainhand
  • startingOffhand
  • startingHelmet
  • startingChest
  • startingGloves
  • startingPants
  • startingBoots
  • startingRing1
  • startingRing2
  • startingNeck

Attributes

Attributes are configured via the <attributes> element. It splits into two sections: starting values and growth per level. The following attributes and their growth can be configured (the pattern is: "attribute" & "attributeGrowth")

  • endurance
  • strength
  • dexterity
  • wisdom
  • intelligence
  • defense
  • luck

Class Bonus Configuration

Class bonuses are configured in the <bonuses> element and are defined via the <ClassBonus> tag.

  • id: a string representation of the unique id
  • name: the name of the bonus
  • description: the description of the bonus
  • iconName: the name of the icon
  • attribue: the attribute, if applicable; not required; allowed values: STRENGTH,ENDURANCE,DEXTERITY,WISDOM,INTELLIGENCE,DEFENSE,LUCK,ALL
  • weaponType: the weapon type, if applicable; not required; allowed values: NONE,SWORD,AXE,DAGGER,POLEARM,GREATSWORD,GREATAXE,BOW,CROSSBOW,STAFF,WAND,SHIELD
  • combatSkill: the combat skill, if applicable; not required; allowed values: DODGE,CRITICAL,BLOCK,SPELLPOWER,HEALPOWER
  • modifier: the modifier in %; nonnegative integer

Skills

Class skills are configured in the <skills> element and are defined via the <Skill> tag.

  • id: a string representation of the unique id
  • name: the name of the bonus
  • description: the description of the bonus
  • iconName: the name of the icon
  • iconId: unique id of the Discord Emoji (can be set after adding it to any of the bots emoji servers)
  • attribute: modifier attribute of the skill; this attribute will influence the damage of the skill; allowed values: STRENGTH,ENDURANCE,DEXTERITY,WISDOM,INTELLIGENCE,DEFENSE,LUCK,ALL
  • playerLevelToUnlock: the required player level before a player can user this skill
  • skillLevelToUnlock: the required attribute level before a player can use this skill (i.e. if the skill has STRENGTH as attribute, and this value is 25, the player can only use this skill at strength 25 or higher)
  • type: the skill type; allowed values are: OFFENSIVE,DEFENSIVE,BUFF,DEBUFF
  • targetType: the target type of the skill; allowed values are: ENEMY,FRIEND,OWN,ANY,AREA (check Skill.java, lines 138 and following for further details)
  • weaponModifier: determines if damage will be modified by any weapon damage; can be omitted; allowed values: WEAPON_MAINHAND,WEAPON_OFFHAND,NONE
  • minDamage: the minimum damage before calculations
  • maxDamage: the maximum damage before calculations
  • costOfExecution: the cost of this skill to execute
  • preparationRounds: duration in rounds until the skill will be invoked (i.e. 1 -> skill will be executed next round, user won't be able to pick a skill for next round)
  • buffModifiesAttribute: if the skill type is BUFF or DEBUFF, will modify that attribute; allowed values: STRENGTH,ENDURANCE,DEXTERITY,WISDOM,INTELLIGENCE,DEFENSE,LUCK,ALL
  • buffModifier: modifier value of the BUFF or DEBUFF in %
  • durationInTurns: duration of the BUFF or DEBUFF in turns
  • ranks: a list of ranks for this skill; ranks can be used to increase effectiveness of a skill; stored in a SkillRank element
    • rank: numerical value determining the rank; ranks need to be in order from 1-x
    • damageModifier: numerical value which will be added on top of base damage (both min and max)
    • costModifier: numerical value which will be added on top of the base cost of execution
    • requiredAttributeValue: numerical value of the <attribute> at which the player will unlock this rank (in combination with requiredPlayerLevel)
    • requiredPlayerLevel: numerical value of the player level at which the player will unlock this rank (in combination with requiredAttributeValue)

Example Item

<Class>
  <id>1</id>
  <name>Depraved</name>
  <iconName>depraved.png</iconName>
  <lore>The depraved is depraved. Depraving, huh?</lore>
  <attributes>
    <endurance>1</endurance>
    <strength>1</strength>
    <dexterity>1</dexterity>
    <wisdom>1</wisdom>
    <intelligence>1</intelligence>
    <defense>1</defense>
    <luck>1</luck>
    <enduranceGrowth>0</enduranceGrowth>
    <strengthGrowth>0</strengthGrowth>
    <dexterityGrowth>0</dexterityGrowth>
    <wisdomGrowth>0</wisdomGrowth>
    <intelligenceGrowth>0</intelligenceGrowth>
    <defenseGrowth>0</defenseGrowth>
    <luckGrowth>0</luckGrowth>
  </attributes>
  <startingMainhand>1</startingMainhand>
  <startingOffhand>-1</startingOffhand>
  <startingHelmet>-1</startingHelmet>
  <startingChest>-1</startingChest>
  <startingGloves>-1</startingGloves>
  <startingPants>-1</startingPants>
  <startingBoots>-1</startingBoots>
  <startingRing1>-1</startingRing1>
  <startingRing2>-1</startingRing2>
  <startingNeck>-1</startingNeck>
  <bonuses>
    <ClassBonus>
      <id>1</id>
      <name>Raises strength by 5%. Who knew depraved could bear any strength at all?</name>
      <iconName>dprStr.png</iconName>
      <attribute>STRENGTH</attribute>
      <modifier>5</modifier>
    </ClassBonus>
  </bonuses>
  <skills>
    <Skill>
      <id>0</id>
      <name>Standard Attack</name>
      <description>Attack with your mainhand weapon equipped.</description>
      <iconName>stdAtk.png</iconName>
      <iconId>0123456789</iconId>
      <attribute>STRENGTH</attribute>
      <type>OFFENSIVE</type>
      <weaponModifier>WEAPON_MAINHAND</weaponModifier>
      <minDamage>1</minDamage>
      <maxDamage>1</maxDamage>
      <costOfExecution>0</costOfExecution>
      <preparationRounds>0</preparationRounds>
      <ranks>
        <SkillRank>
          <rank>1</rank>
          <damageModifier>0</damageModifier>
          <costModifier>0</costModifier>
          <requiredAttributeValue>1</requiredAttributeValue>
          <requiredPlayerLevel>1</requiredPlayerLevel>
        </SkillRank>
      </ranks>
      <requirements/>
      <buffModifier>0</buffModifier>
      <durationInTurns>0</durationInTurns>
    </Skill>
  </skills>
</Class>
⚠️ **GitHub.com Fallback** ⚠️