Skip to content

Player Stats [DEV DOCUMENTATION]

LcorpOfficial edited this page Aug 6, 2023 · 1 revision

Player Stats

Base stats of the player.

These stats are leveled up via experience in their respective stat type.

Stat type Description
Fortitude Handles HP and satiation
Karma Morality coverage. this is read on a scale from 0-100 whereas values >60 = good, and <40 are evil
Agility handles speed of player, attack speed, dodging chance, water breathing, and fall damage.
Fishing treasure chance
Raising skill level for taming and commanding followers.
Herbalism chance for better farm drops.
Tooling skill level for tool usage.
Excavation chance for double drops and mining speed(?)
Smithing improves quality of smithed materials
Energy provides the capacity of energy that magic can make use of.
Base ATK affects physical damage inflicted, and used for other calculations.
Base DEF affects physical damage resistance, and used for other calculations.

These stats are only affected by equipment modifiers. [ELEMENT] is used here as a placeholder for all elements.

Stat type Description
[ELEMENT] ATK affects elemental damage values
[ELEMENT] DEF affects elemental resistance values

Example calculation for Nature DMG with item modifiers

player has
base ATK (from level)    1
herbalism (from level)   10*0.25

this equals 3.5

calclulate, then add

nature ATK (item gives)  +10%
nature ATK (item gives)  +15%

which makes a 25% nature ATK increase

Finalize by structuring the equation

(1 + 2.5 = a) * (0.10 + 0.15 = m) = v
then
a + v = 4.375

Nature Damage Output = 4.375

Elemental stats

Each element has both a damage output and resistance stat. Elemental stats hook directly into Mythicmobs' element system and are a composite stat comprised of multiple base stats. Elemental stats are not modified directly, but instead their elemental substat are modified.

an example of this is an offensive fire buff ability or item. It would increase the fire ATK substat that is added with base ATK (from level) instead of modifying the final fire damage output value itself.

Damage type Base stat compounds
Fire base ATK, fire ATK
Ice base ATK, ice ATK
Stone base ATK, excavation, stone ATK
Lightning base ATK, lightning ATK
Aqua base ATK, Fishing, aqua ATK
Nature base ATK, herbalism, nature ATK
Sonic base ATK, agility, sonic ATK
Corrupt base ATK -evil karma, corrupt ATK
Radiant base ATK, +good karma, radiant ATK
Resistance type Base stat compounds
Fire base DEF, fire DEF
Ice base DEF, ice DEF
Stone base DEF, Fortitude, stone DEF
Lightning base DEF, lightning DEF
Aqua base DEF, aqua DEF
Nature base DEF, nature DEF
Sonic base DEF, agility, sonic DEF
Corrupt base DEF, -evil karma, corrupt DEF
Radiant base DEF, +good karma, radiant DEF

Armor & Armor Trims

Armor trims can be used to apply stat modifications to the player. Other items can work like this as well, such as trinket-like items.


Trim Material Types

materials affect elemental resonances, which in turn affect damage output and damage resistances of said element.

element item buffs debuffs
Iron STONE AQUA
Copper FIRE LIGHTNING
Gold LIGHTNING FIRE
Lapis AQUA, ICE NATURE, LIGHTNING
Emerald NATURE FIRE, ICE
Diamond ICE STONE, FIRE
Netherite CORRUPT RADIANT
Redstone LIGHTNING STONE, AQUA
Amethyst SONIC NATURE
Quartz RADIANT CORRUPT

Trim Template Types

Trim templates affect secondary stat modifiers for a player, unrelated to elemental resonances.

Location trim template associated stat modifier type base value
Pillager Outpost Sentry Armor Trim archery additive 0.05
Desert Pyramid Dune Armor Trim excavation additive 0.05
Shipwreck Coast Armor Trim fishing additive 0.05
Jungle Temple Wild Armor Trim herbalism additive 0.05
Ocean Monument Tide Armor Trim agility, fishing additive 0.05, 0.05
Ancient City Ward Armor Trim agility, mining additive 0.05, 0.05
Woodland Mansion Vex Armor Trim alchemy additive 0.05
Nether Fortress Rib Armor Trim smithing additive 0.05
Bastion Remnant Snout Armor Trim smithing, base ATK additive 0.05,
Stronghold Eye Armor Trim agility, mining additive 0.15, 0.10
End City Spire Armor Trim agility additive 0.05

Armor Material

Material can affect stat modifiers as well, armor made takes

Material associated stat modifier type base value
Leather N/A
Iron agility, base DEF additive -0.02, 0.05
Chainmail agility, base DEF additive -0.01, 0.07
Gold agility, base DEF additive -0.3, 0.3
Diamond agility, base DEF additive -0.4, 0.25
Netherite agility, base DEF additive -0.5, 0.4

Stats NBT

Stats are stored as NBT tags. different item types can have different NBT based modifier types.


NBT Structure

All possible item modifier Compound NBT tags

Fortitude: val
Agility: val
Fishing: val
Raising: val
Herbalism: val
Tooling: val
Excavation: val
Smithing: val
Energy: val
BaseATK: val
BaseDEF: val

an array of elemental damage modifiers

minecraft:<armor>{ElementATK:{fireatk:"val",iceatk:"val"}}

an array of resistance defense modifiers

minecraft:<armor>{ElementDEF:{firedef:"val",icedef:"val"}}

ArmorStats Compound NBT Tag

vanilla format for reference

minecraft:<armor>{Trim:{material:"minecraft:<material>",pattern:"minecraft:<pattern>"}}

added NBT tags

armorbasemod: value

modifier for the base material of the armor.

patternmod: value

modifier for the pattern of the armor trim

materialmod: value

modifier for the material of the armor trim. material modifiers do not need an element value as the element that the modifier is applied to is specified in the plugin/script.

Mythic integration

After stats are fully calculated by Denizen/MythicRPG(?), the final values will be inputted into MythicMobs variables. We don't know what they will exactly be, but it would be similar to caster.var.stat_X, where X is the name of the stat.

caster.var.stat_<stattype> will work

Regarding stat modifiers/buffs/debuffs, there are 3 possible solutions:

  • Have MythicMobs call a Denizen command script, and have Denizen process the input and recalculate the stat
  • Have Mythicmobs set a separate modifier variable, and have Denizen read the variable every time it recalculates stats.
  • MythicRPG can handle this inherently with some built-in function.

NBT Formatting

Stats are stored in a Stats key. The value is a map of stat name to stat value. The value has this format:

type: [add/addpercent]
value: [number]

LootGenerateEvent

PlayerDropItemEvent when a player drops an item.

PlayerPickupItemEvent when a player picks up an item.

InventoryInteractEvent when a player changes items inside their inventory (or other inventories).

Accessory Bar Inventory

The accessory bar would essentially be a virtual inventory with slot indexes, which can be used with mythic conditions, mechanics, and triggers. Ideally, a way to use an NBT tag for the items' category and limit categories to index slots would be best. (necklaces can only be put in slot 1, charms in slots 7-9, etc) An example of an accessory bar item would be like this:

  • A necklace item which applies a fire ATK buff of 3%
  • A warding charm that applies a buff of 10% to the agility stat.