lotrointerface.com
Search Downloads


Go Back   LoTROInterface > LotRO Libraries

Category: LotRO LibrariesCalcStat
Interface Information
Download
How do I install this? (FAQ)
Name: CalcStat   Popular!
Author:
Date: 08-02-2024 08:22 AM
Size: 162.64 Kb
Version: 2.4
Rate File: 5 out of 5 with 3 votes  
Pictures
Click to enlarge 

Views: 0
Size: 455.69 Kb
Dimensions: 883 x 769
CalcStat Expressions
 
Description
This package adds stat calculation support to plugins (and provides the plugin CalcStat-Expressions, so users can make stat queries and calculations themselves).
Calculation examples are:
1) all what is needed for Rating to Percentage (or vice versa) calculations
2) item stat calculations based on item level
3) skill/effect stat calculations based on player level
4) virtue stat calculations based on rank, including required xp

I created CalcStat initially for my LotroPlan spreadsheet, but I've expanded it and made it more flexible, so it can be used in many other types of applications, like Lotro plugins, websites and scripts.
An example of a plugin is StatWatch and of a website application is LOTRO forum topic / LOTRO Ratings Calculator. CalcStat is also being used at Lotro-Wiki.

Developer information:
The included VisualBasic script compiles statdata.csv which results in the CalcStat.lua file (option 2) with the major calculation function (other output formats like StarBasic/VBA, VB-script, PHP, JavaScript, Java and Python are also available). Statdata.csv contains currently ~3700 entries (an entry is one stat calculation segment). You can most conveniently view the .csv with a spreadsheet application.
The download contains standard the percentage calculations only version for plugins which can be included in a plugin by importing "Giseldah.CalcStat".
An Apps Script Library is available for use in Google Sheets with Script ID: 1AWxeK788k4nMhwzr2ZSvnvdnIIyIBe366nNkAPuBdkjNSL_HI AA5CM_m

Code:
version 1.0.1:
- fixed a bug in Roman number decoding for LI titles.

version 1.0.2:
- fixed a bug in Roman number decoding for LI titles reprisal. :o
- added comments to the calculation function support file CalcSsup.lua

version 1.0.3:
- implemented a binary search tree for the stats lookup. tree height/depth is 10 at the moment (max capacity 2^10-1=1023 stats).

version 1.0.4:
- added more comments to statdata.csv
- some stats were added or changed(made current with BR U23.2p2) see post below.

version 1.0.5:
- added TpenArmour, TpenResist and TpenBPE with the new penetration calculations. N=tier, so like CalcStat("TpenArmour",120,3) for Tier 3.
- added T2penArmour which is the same as the old T2penMit stat (reused in the game). Other old stats T2penResist etc are also still available. Old pen stats are used in older instances (instances without T3).

version 1.0.6:
added some basics like:
- all character class base stat tables
- hope/dread percentages
- stat tome main values: CalcStat("TomeMain",nil,"XVIII")
- stat tome total values (adds up all up to rank): CalcStat("TomeTotal",nil,"XX")
new calculation type 'D'(ata lookup table) for values of which I can't find a good formula fit for :rolleyes:

version 1.0.7:
- added virtue stats. Like some other stats, virtue stats come in 3 strengths - L(ow), M(edium) and H(igh). Example: CalcStat("VirtMoraleH",20)

version 1.0.8:
- added new virtue system stats. example: CalcStat("VirtCompassion",60,"PhyMit") gives Physical Mitigation Rating rank 60 Compassion or CalcStat("VirtZeal",49,"VPTacMas") gives Virtue Passive Tactical Mastery Rating rank 49 Zeal.
- VRnkToILvl: virtue rank to item level mapping

version 1.0.9:
- VRnkCap: virtue rank overall cap (60)
- VRnkLvlCap: virtue rank character level based cap
- VirtRnkCost: virtue xp cost single rank
- VirtRnkCostTot: total virtue xp cost to reach rank from 0

version 1.0.10:
24.2 captain stat changes
- Blade-brother: CptBladeCritDef, CptBladePhyMas, CptBladeTacMas
- Shield-brother: CptShieldCritDef, CptShieldPhyMas, CptShieldTacMas
- Song-brother: CptSongCritDef, CptSongPhyMas, CptSongTacMas
- IDOME: CptIDOMEMain, CptIDOMEVitality
- Cry of Vengeance: CptCoVMain, CptCoVVitality, CptCoVPhyMit, CptCoVAttDurP
- Tactic: Relentless Attack: CptRelentlessCritHit, CptRelentlessPhyMas, CptRelentlessTacMas
- Tactic: On Guard: CptOnGuardParry
- Defending: CptDefendingArmour

version 1.0.11:
solves an issue with finding stats which have digits in the statname

version 1.0.12:
Changes (based on Bullroarer Update 24.3 - Preview #1):
- adjusted percentage/rating calculations for levels 1-99, because of new roundings in cap rating progressions, which caused percentages for Light & Medium mitigations to be slightly higher than before.
- adjusted percentage/rating calculation for levels 101-104, because I detected a bump in cap rating progressions at levels 101 & 102 (lvl101=1.1*lvl100, lvl102=oddity like lvl76).
- added 25% extra bonus percentage to Partial Evade Mitigation at Level 1 (PartEvadeMitPBonus)

version 1.0.13 (became 1.0.14 by mistake):
In this version I've implemented a standard progression (StdProg) from which most most of the stats are now calculated more or less directly. This is in preparation for stat changes (and so standard/normal progression change) which next expansion will bring with a level cap change, item level changes etc. No real changes in percentage calculation, except under the hood things like mentioned. Some stats changes:
- Battle & Warding lore scrolls stats.
- Max morale and power scroll Morale.
- Stats scaling by character level as used on Shield of the Hammerhand, High-Elf earrings and racial traits.

version 1.0.14b:
Contains changes for U25 preview #3 on BR. Not to be used on live servers.

version 1.0.15:
Contains all updates for U25.

version 1.1.0:
Added class and race data, like main stat contributions and race traits.
Changed the way virtue stats are arranged.
The compiler can now output various versions for efficiency: "Full" and "Percentage calculations only".

version 1.1.1:
Fixed Minstrel Enduring Morale Trait (MINENDMORALE) and renamed _Version to -Version

version 1.1.2:
Fixes AwardLvlToILvl.
This version includes the support files for all 3 script types (Lua-script/StarBasic/VB-script).

version 1.2.0:
CalcStat is now a global library, which can be imported by plugins with:  import "Giseldah.CalcStat"
Includes support for plugin compendium.

version 1.2.1:
U25.1 changes:
- Beorning/Champion stat contributions.
- ICMR/NCMR progression change (more in line with vitality now).

version 1.3.0:
- U25.1.1: Vitality fix Stout-axe racial trait.
- Fixed a bug in @ScaleArmour calculation.
- Major update of compiler to make it more flexible.
- All CalcStat functionality now in one file.
- Added PHP-script compile option for use of CalcStat on websites.

version 1.3.1:
Adds JavaScript as compile option (and some example html).

version 1.3.2:
- Fixed a possible bug for Lua-script.
- Script option 1 should now be VBA/MS Office compatible (untested).

version 1.3.3:
- Fixed some bugs for JavaScript.
- Slightly expanded "Percentage calculations only" set with class information stats CanBlock and ArmourType.
- New stat LevelCap (130).

version 1.4a254p1:
Contains a lot of changes for U25.4 preview #1 on BR. Not to be used on live servers.

version 1.4:
This version contains all updates for U25.4. All stats were checked during the beta time and a large part also with final 'live' client.

version 1.4.1:
Solves a bug which caused old trait/skill stats to scale to above lvl130.

version 1.4.2:
Adds stats LvlExpCost (amount of xp needed for single level from previous level) and LvlExpCostTot (total amount of xp needed to reach level). These stats are not capped by level cap. They are included in percentage-only set for TitanBar-plugin.

version 1.5.0:
- Contains a lot of new stats which are related to Trait trees (skills/bonuses/passives). See examples for a list.
- Added a new stats set named "Trait trees stats" in the compiler. This is an optimized set for using these kind of stats only.

version 1.5.1:
Adds stat SkillPowerCost. This stat gives the skill power usage value for a character level L, based on a basevalue N (power increase at low levels) such as (typically) 0.5, 1, 1.5, 2 etc.

version 1.5.2:
Adds stats LvlBonusPhyDmg, LvlBonusTacDmg and LvlBonusHeals for skill output calculations.

version 1.5.3:
- Renamed LvlBonusHeals to LvlBonusMorRes (morale restoration skills).
- Added LvlBonusPowRes (typical N=0.5,1,2.5,5) for power restoration skills.
- Added LvlBonusRuneofRes: Rune of Restoration Level Bonus

version 1.5.4:
Fixes a bug in LvlBonusMorRes, so values above lvl115 show up again.

version 1.5.8:
- LI title stat changes up to BR U28.3p1
- Might stat bug (in-game) on items implementation
- MP buffs adjustments U28.2

version 1.5.9:
- fixes LI title stat TitPhyMas
- CalcStat can now be loaded as a plugin and provides a command line calculation option. This is not required if only used as a library.

version 1.6.0:
Main new functionality in this version is CalcStat support for Lotro-Wiki! To that end, the compiler has now an extra output script option for Lua which is supported by MediaWiki in combination with the Scribunto extension.
Other:
- reworked Audacity and Battlefield Promotion buffs in separate creep and freep stats.
- added Burglar Reveal Weakness & Guardian's Ward stats.

version 1.7.0:
CalcStat can now run in MS Excel (select VBA output in the compiler) and a new output option for Java has been added.
New stats WpnDPS and WpnDmgMin/WpnDmgMax for non-LI weapons.
A lot of stats for calculating sell values of items have been added, but you need to know the right code (item defined).

version 1.8.0b6:
This is a beta version with support for U31. A lot of stats have changed. Not all stats have been updated yet, but most are fine now like:
- rating percentages
- normalized stats (includes virtues)

version 1.8.0:
Adds the following updates to the beta:
- weapon dps calculations
- item level tables dropped/awarded items

version 1.8.1:
Contains some changes introduced in U33 (and more):
- Tactical Mastery/Physical Mastery/Critical Rating stats are consistent again
- Some armour calculations were fixed
- Minstrel Enduring Morale
No changes in percentage calculations.

version 1.9:
Various stat changes for U34. Does not change percentage calculations.
version 2.0:
This version introduces a new loadable plugin. The command line for basic CalcStat has been removed and you can now use CalcStat Expressions in a window.
Also adds new Stat tome values and probably stuff that I forgot.

version 2.0.1:
A full version with all stats is now included as well (compiler option 1: Full version), so always all stats are available within CalcStat Expressions.

version 2.0.2:
Expressions: adds scroll bars to text boxes and displays help text correctly from the top.
CalcStat: contains a fix for perk stats.

version 2.1:
Incorporates many changes for U35.

version 2.1.3:
Bugfix for LinFmod Lua version.
Added stat CombatBaseTacHPSNoClass which provides the HPS number for classes without HPS on the class item. Also, some other skill calculation related stats.
Extended the number of possible variables in Expressions to 1000.

version 2.2:
Contains changes for U37.
Adds Python as compiler output script option.

version 2.2.1:
Contains changes for U37.0.1:
Outgoing Healing Rating, Burglar stat contributions.

version 2.2.2:
Contains changes for U37.1:
Physical DPS values, some legacy stat changes.
Added an effect/traits informational file.

version 2.2.3:
Contains changes for U37.2:
Mariner- new base stats & class main stat derivations.
Updated U37 Tactical DPS & HPS stats (basis for skill damage/healing calculations).

version 2.3:
Contains changes for U38:
Level cap increase to 150/549, new class main stat derivations, etc.

version 2.3.1:
Contains changes for U38.1:
Creep stats updates. Warden Resistance rating contribution from Will.

version 2.3.2:
Contains changes for U39:
Some creep stats and item level progression updates.
TPenArmour,L,1 now returns the mitigation rating penetration value as used in Depths of Mâkhda Khorbo Tier 1. TPen stats are now like T1=0.5 T2=1 T3=2.

version 2.3.3:
CalcStat Expressions: new functions Choose (like in spreadsheets) and While (loop) and revised escape characters support. See https://lotro-wiki.com/wiki/Module:CalcStat/doc for details.

version 2.4:
Contains changes for U41:
Item stats changes around point ilvl50 and from ilvl451 towards ilvl499. This affects also virtue stats (item stat based).
Adeventurer awarded item levels changed.
Archive List (Old Versions)
File Name
Version
Size
Author
Date
2.3.3
161.85 Kb
Giseldah
03-27-2024 06:45 AM
2.3.2
160.42 Kb
Giseldah
03-15-2024 06:29 AM
2.3.1
160.62 Kb
Giseldah
12-06-2023 07:47 PM
2.3
160.46 Kb
Giseldah
11-08-2023 03:45 PM
2.2.3
167.55 Kb
Giseldah
10-04-2023 02:42 AM
2.2.2
167.08 Kb
Giseldah
09-13-2023 12:33 PM
2.2.1
155.52 Kb
Giseldah
09-06-2023 10:12 AM
2.2
155.24 Kb
Giseldah
08-29-2023 11:04 AM
2.1.3
156.87 Kb
Giseldah
04-11-2023 07:43 AM
2.1
155.43 Kb
Giseldah
03-22-2023 11:13 AM
2.0.2
160.90 Kb
Giseldah
02-02-2023 09:18 AM
2.0.1
160.54 Kb
Giseldah
01-31-2023 06:41 AM
2.0
114.88 Kb
Giseldah
01-30-2023 10:54 AM
1.9
84.60 Kb
Giseldah
11-17-2022 06:56 AM
1.8.1
84.46 Kb
Giseldah
04-21-2022 11:19 AM
1.8.0
81.94 Kb
Giseldah
12-01-2021 06:24 AM
1.8.0b6
81.42 Kb
Giseldah
11-21-2021 01:16 AM
1.7.0
73.89 Kb
Giseldah
04-07-2021 04:01 PM
1.6.0
60.71 Kb
Giseldah
02-19-2021 05:29 AM
1.5.9
59.25 Kb
Giseldah
01-15-2021 11:42 AM
1.5.8
57.46 Kb
Giseldah
01-14-2021 04:30 AM
1.5.4
53.61 Kb
Giseldah
07-30-2020 05:07 AM
1.5.3
53.61 Kb
Giseldah
07-22-2020 04:02 AM
1.5.2
53.33 Kb
Giseldah
07-19-2020 01:19 PM
1.5.1
53.02 Kb
Giseldah
07-14-2020 06:54 AM
1.5.0
52.93 Kb
Giseldah
07-13-2020 07:12 AM
1.4.2
48.50 Kb
Giseldah
05-08-2020 03:20 AM
1.4.1
47.55 Kb
Giseldah
03-11-2020 02:28 AM
1.4.0
47.51 Kb
Giseldah
03-08-2020 05:11 AM
1.4a254p1
48.10 Kb
Giseldah
02-16-2020 07:11 PM
1.3.3
78.05 Kb
Giseldah
01-26-2020 02:04 PM
1.3.2
47.86 Kb
Giseldah
01-02-2020 10:36 AM
1.3.1
48.62 Kb
Giseldah
12-21-2019 10:54 AM
1.3.0
47.29 Kb
Giseldah
12-19-2019 10:09 PM
1.2.1
45.67 Kb
Giseldah
12-13-2019 01:29 PM
1.2.0
45.17 Kb
Giseldah
12-09-2019 08:11 AM
1.1.2
37.94 Kb
Giseldah
12-09-2019 04:34 AM
1.1.1
32.68 Kb
Giseldah
11-20-2019 02:23 AM
1.1.0
32.69 Kb
Giseldah
11-18-2019 07:27 AM
1.0.15
29.84 Kb
Giseldah
11-09-2019 04:40 AM
1.0.14b
29.63 Kb
Giseldah
11-01-2019 02:48 AM
1.0.14
29.24 Kb
Giseldah
10-13-2019 12:53 PM
1.0.12
29.90 Kb
Giseldah
09-21-2019 08:50 AM
1.0.11
29.88 Kb
Giseldah
08-24-2019 01:22 AM
1.0.10
29.89 Kb
Giseldah
08-05-2019 09:42 AM
1.0.9
29.57 Kb
Giseldah
06-16-2019 07:25 AM
1.0.8
29.40 Kb
Giseldah
06-15-2019 08:05 AM
1.0.7
32.70 Kb
Giseldah
12-18-2018 03:02 PM
1.0.6
31.97 Kb
Giseldah
12-16-2018 11:00 AM
1.0.5
23.16 Kb
Giseldah
12-14-2018 06:07 AM
1.0.4
21.18 Kb
Giseldah
12-07-2018 09:04 AM
1.0.3
18.16 Kb
Giseldah
12-05-2018 10:20 AM
1.0.2
16.98 Kb
Giseldah
12-03-2018 04:52 AM
1.0.1
15.48 Kb
Giseldah
12-02-2018 04:33 PM
1.0
15.52 Kb
Giseldah
12-02-2018 01:36 PM
File Statistics
User Rating:
5 out of 5 with 3 votes
Downloads: 378988
Views: 140651
Favorites: 14
Uploaded By:
 
Last Modified: N/A

View Pictures. Download Now! Post A Comment


Post A Reply
Author Comments Comment Options
Unread 03-27-2024, 06:54 AM  
Giseldah
The Wary
 
Giseldah's Avatar
Interface Author - Click to view interfaces

Forum posts: 2
File comments: 56
Uploads: 5
New expression functions

Example of While and Choose functions.
Escape characters supported now:
\n new line
\q or \" double quote: like the string "\qdouble\"" outputs "double"
\\ backslash


Last edited by Giseldah : 03-28-2024 at 06:15 AM.
Giseldah is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 11-25-2023, 10:15 AM  
Giseldah
The Wary
 
Giseldah's Avatar
Interface Author - Click to view interfaces

Forum posts: 2
File comments: 56
Uploads: 5
Re: Crit Rating cap increase

Quote:
Did you update the crit rating cap, or did I misinterpret the release notes for U38? Is 225,000 still correct?
It's correct. Critical Hit chance moved from the Standard(base 200 - 150,000@150) in U37 to the Extra group (base 300 - 225,000@150) in U38.
Giseldah is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 11-23-2023, 09:12 AM  
Jaylaxel
The Wary

Forum posts: 2
File comments: 10
Uploads: 0
Crit Rating cap increase

Hey Giseldah!
One quick question:

Did you update the crit rating cap, or did I misinterpret the release notes for U38? Is 225,000 still correct?
Critical Rating

The Critical Ratings of gear/traits/effects have been increased.
The cap on Critical Rating increased.
Critical Magnitude cap was reduced.
This has the effect of making it a little more difficult to achieve the Critical Chance cap, but will increase player's Dev Crit, and Crit Magnitude rates and make capping those easier if you choose to pursue that goal.


Thank you for an awesome resource!

Last edited by Jaylaxel : 11-23-2023 at 12:13 PM.
Jaylaxel is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 11-09-2023, 07:03 AM  
Giseldah
The Wary
 
Giseldah's Avatar
Interface Author - Click to view interfaces

Forum posts: 2
File comments: 56
Uploads: 5
Standard Progression (StdProg)

Version 2.3 contains a new StdProg stat which takes a base value as parameter for $N.
This StdProg stat is used as bases for all rating percentage related stats (so also for main stats Agility/Might/Will). The section in this image shows how the standard progression is connected to B-ratings (also referred to as Control-ratings).


*2.3.1 version

The most often used B-rating is BRatStandard which is used for Finesse Rating for example. It's defined as @StdProg#200, so it's the Standard Progression with the value of 200 as basis.

B-ratings as BRatStandard are not directly used, because they normally need an extra rounding layer on top.
For Percentage Calculation this rounding layer is BRatRounded. It's called with the B-rating's statname, so like @BRatRounded#("BRatStandard").
For Rating stats Calculation this rounding layer is the more simple BRatProgB, so like @BRatProgB#("BRatOutHeal") is the bases for Outgoing Healing Rating stat.

Light & Medium Mitigations are interesting because they are the result of multiplying BRatStandard with a value 0.666 & 0.833 and on top you get a special progression rounding (P6=P, 3).
Heavy Mitigations used to be like that as well, until the devs just moved it to the BRatStandard group. @BRatMitigations#1.0 only differs in the level1 point: 183 instead of the 200 with Standard.

BRatMitLight/Medium & Heavy are of course used for Percentage calculations, but they are also used for the stats:
  • Light: Armour values in virtues. Armour values on items.
  • Medium: Physical/Tactical Mitigation ratings. Armour values in effects. Armour values on items.
  • Heavy: Armour values on items.
StdProg is also used as base for main stats Agility/Might/Will with base value 1.75 since U38, up from 1.0 in U37. This buf was part of the stat derivations change.
This base for main stats doesn't receive any rounding layer. However, stats are almost always further rounded during the calculation of the final graph points (based on the number of stat points and any local level adjustments).

Last edited by Giseldah : 11-12-2023 at 05:37 AM.
Giseldah is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 10-04-2023, 03:24 AM  
Giseldah
The Wary
 
Giseldah's Avatar
Interface Author - Click to view interfaces

Forum posts: 2
File comments: 56
Uploads: 5
Updated U37 Tactical DPS & HPS stats

With U37 much has been changed with DPS & HPS stats.

Weapons DPS received a new progression and variance was changed to 0.25 for all weapons, but this was already handled in CalcStat 2.2.2 (stats WpnDPS, WpnDmgMin, WpnDmgMax).

CalcStat 2.2.3 tackles the new Tactical values, which is a combination of character level driven stats + Legendary Item stats.

Firstly, mostly affecting low levels up to level 50, the character level driven base (formula: Level * 1) has been replaced with more complex ones. These are now calculated by new character level stats:
- CombatBaseTacDPSbyLevel: maxes out at level 50 (linear shape)
- CombatBaseTacHPSbyLevel: maxes out at level 47 (curved shape)
These stats are based on in-game data analyses. Exact values are not guaranteed, especially for HPS curve values.
For the total value you just need to add the DPS/HPS ratings on legendary items which is given by item level stats CombatBaseTacDPS and CombatBaseTacHPS (LI2 new style).

Non tactical classes don't have LI's with HPS, so they get entirely character level driven HPS for their healing skills. They get the curve shaped formula at lower levels and then get an auto-scaling virtual LI. This combined value is given by character level stat CombatBaseTacHPSNoClass (total value, at any level).

Last edited by Giseldah : 10-04-2023 at 03:29 AM.
Giseldah is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 04-11-2023, 07:48 AM  
Giseldah
The Wary
 
Giseldah's Avatar
Interface Author - Click to view interfaces

Forum posts: 2
File comments: 56
Uploads: 5
Direct damage Barbed Arrow expression

Calculates Barbed Arrow damage with these conditions:
- Veteran Strength perk active +(0.05 / 5%) Damage
- +(0.15 / 15%) Induction Damage (Strength stance + set bonus Hornburg jewelry)
Ranged Weapon needs to be set to the right item level and type. $RangedILvl = 485, $RangedWpnCode = "HBG" for Li Bow at maximum reforge.

Code:
With(
	$Class = $PlayerClassName,
	$Level = $PlayerLevel,

	$MelOff = $PlayerMelOff,
	$PhysicalMeleeMP = 1 + @PhyDmgPRatP($Level)#($MelOff)/100,
	$DamageQualifierMeleeMods = 0.05,
	$DamageQualifierMelee = 1 + $DamageQualifierMeleeMods,

	$RngOff = $PlayerRngOff,
	$PhysicalRangedMP = 1 + @PhyDmgPRatP($Level)#($RngOff)/100,
	$DamageQualifierRangedMods = 0.05,
	$DamageQualifierRanged = 1 + $DamageQualifierRangedMods,

	$TacOff = $PlayerTacOff,
	$TacticalOffenceMP = 1 + @TacDmgPRatP($Level)#($TacOff)/100,
	$DamageQualifierMagicMods = 0.05,
	$DamageQualifierMagic = 1 + $DamageQualifierMagicMods,

	$OutHeal = $PlayerOutHeal,
	$TacticalOutHealMP = 1 + @OutHealPRatP($Level)#($OutHeal)/100,
	$ModifierOutHealMods = 0,
	$ModifierOutHeal = $ModifierOutHealMods,

	$PrimaryILvl = 176,
	$PrimaryWpnCode = "HOT",
	$PrimaryDPS = IIf($PrimaryILvl>0,@WpnDPS($PrimaryILvl)#($PrimaryWpnCode),0),
	$PrimaryDmgMax = IIf($PrimaryILvl>0,@WpnDmgMax($PrimaryILvl)#($PrimaryWpnCode),0),
	$PrimaryDmgMin = IIf($PrimaryILvl>0,@WpnDmgMin($PrimaryILvl)#($PrimaryWpnCode),0),

	$SecondaryILvl = 0,
	$SecondaryWpnCode = "HOG",
	$SecondaryDPS = IIf($SecondaryILvl>0,@WpnDPS($SecondaryILvl)#($SecondaryWpnCode),0),
	$SecondaryDmgMax = IIf($SecondaryILvl>0,@WpnDmgMax($SecondaryILvl)#($SecondaryWpnCode),0),
	$SecondaryDmgMin = IIf($SecondaryILvl>0,@WpnDmgMin($SecondaryILvl)#($SecondaryWpnCode),0),

	$RangedILvl = 62,
	$RangedWpnCode = "HBY",
	$RangedDPS = IIf($RangedILvl>0,@WpnDPS($RangedILvl)#($RangedWpnCode),0),
	$RangedDmgMax = IIf($RangedILvl>0,@WpnDmgMax($RangedILvl)#($RangedWpnCode),0),
	$RangedDmgMin = IIf($RangedILvl>0,@WpnDmgMin($RangedILvl)#($RangedWpnCode),0),

	$TacticalILvl = 0,
	$ItemTDR = IIf($TacticalILvl>0,@CombatBaseTacDps($TacticalILvl),0),
	$LevelTDR = Min($Level,50),
	$TacticalDPS = $ItemTDR + $LevelTDR,
	$TacticalDmgMax = $TacticalDPS,
	$TacticalDmgMin = (1-0.3) * $TacticalDmgMax,

	$TacticalHPSILvl = 0,
	$ItemHPS = IIf($TacticalHPSILvl>0,@CombatBaseTacHps($TacticalHPSILvl),0),
	$LevelHPS = IIf($Class=="Brawler" or $Class=="Burglar" or $Class=="Champion" or $Class=="Guardian" or $Class=="Hunter",@CombatBaseTacHPSNoClass($Level),Min($Level,50)),
	$TacticalHPS = $ItemHPS + $LevelHPS:

	With(
		$SkillActionDurationContribution = 0,
		$SkillInductionActionDuration = 1.5,
		$SkillActionDuration = 1 + $SkillActionDurationContribution + $SkillInductionActionDuration:
		
		With(
			$SkillAttackHookDamageQualifier = 3,
			$DamageQualifier = Switch(
									$SkillAttackHookDamageQualifier,
									case == 1: $PhysicalMeleeMP * $DamageQualifierMelee,
									case == 2: $TacticalOffenceMP * $DamageQualifierMagic,
									case == 3: $PhysicalRangedMP * $DamageQualifierRanged,
									default: 0),

			$SkillAttackHookDamageModifier = 1,
			$SkillAttackHookDamageMods = 0.15,
			$HookDamageModifier = $SkillAttackHookDamageModifier + $SkillAttackHookDamageMods,
			
			$SkillAttackHookDamageAddContributionMultiplier = 1.77,
			$DPSAddModProgressionSelect = "Physical Damage",
			$SkillAttackHookDPSAddModProgression = Switch(
									$DPSAddModProgressionSelect,
									case == "Physical Damage": @LvlBonusPhyDmg($Level),
									case == "Tactical Damage": @LvlBonusTacDmg($Level),
									default: 0),
			$SkillAttackHookDPSAddModMods = 0,
			$SkillAttackHookDPSAddMod = $SkillAttackHookDPSAddModProgression + $SkillAttackHookDPSAddModMods,
			$DamageAdd = $SkillActionDuration * $SkillAttackHookDPSAddMod * $SkillAttackHookDamageAddContributionMultiplier,
			
			$SkillAttackHookHookDamageMax = 0,
			$HookDamageMaxProgressionSelect = "Undef",
			$HookDamageMaxProgressionBase = 0,
			$SkillAttackHookHookDamageMaxProgression = Switch(
									$HookDamageMaxProgressionSelect,
									case == "Pet Damage Exp": @CombatBaseModPetExp($Level)#($HookDamageMaxProgressionBase),
									case == "Pet Damage Lin-Exp": @CombatBaseModPetLinExp($Level)#($HookDamageMaxProgressionBase),
									default: 0),
			
			$SkillAttackHookHookDamageMaxVariance = 0,
			$SkillHookDamageMaxBase = $DamageAdd + $SkillAttackHookHookDamageMax + $SkillAttackHookHookDamageMaxProgression,
			$SkillHookDamageMinBase = (1-$SkillAttackHookHookDamageMaxVariance) * $SkillHookDamageMaxBase,
			$SkillHookDamageMin = Floor($DamageQualifier * $HookDamageModifier * $SkillHookDamageMinBase + 0.5),
			$SkillHookDamageMax = Floor($DamageQualifier * $HookDamageModifier * $SkillHookDamageMaxBase + 0.5),

			$SkillAttackHookImplementContributionMultiplier = 1.77,
			$SkillAttackHookUsesPrimaryImplement = 0,
			$SkillAttackHookUsesSecondaryImplement = 0,
			$SkillAttackHookUsesRangedImplement = 1,
			$SkillAttackHookUsesTactical = 0,
			$SkillImplementDamageMinBase = IIf($SkillAttackHookUsesPrimaryImplement>0,$PrimaryDmgMin,0) +
											IIf($SkillAttackHookUsesSecondaryImplement>0,$SecondaryDmgMin,0) +
											IIf($SkillAttackHookUsesRangedImplement>0,$RangedDmgMin,0) +
											IIf($SkillAttackHookUsesTactical>0,$TacticalDmgMin,0),
			$SkillImplementDamageMaxBase = IIf($SkillAttackHookUsesPrimaryImplement>0,$PrimaryDmgMax,0) +
											IIf($SkillAttackHookUsesSecondaryImplement>0,$SecondaryDmgMax,0) +
											IIf($SkillAttackHookUsesRangedImplement>0,$RangedDmgMax,0) +
											IIf($SkillAttackHookUsesTactical>0,$TacticalDmgMax,0),
			$SkillImplementDamageMin = Floor($DamageQualifier * $HookDamageModifier * $SkillAttackHookImplementContributionMultiplier * $SkillImplementDamageMinBase + 0.5),
			$SkillImplementDamageMax = Floor($DamageQualifier * $HookDamageModifier * $SkillAttackHookImplementContributionMultiplier * $SkillImplementDamageMaxBase + 0.5),
			
			$AttackDamageMin = $SkillHookDamageMin + $SkillImplementDamageMin,
			$AttackDamageMax = $SkillHookDamageMax + $SkillImplementDamageMax:
			
			IIf($AttackDamageMin==$AttackDamageMax,Format($AttackDamageMax,"%'d"),Format($AttackDamageMin,"%'d").." - "..Format($AttackDamageMax,"%'d")).." Common (Ranged) Damage"
			
		)
	)
)

Last edited by Giseldah : 04-11-2023 at 07:51 AM.
Giseldah is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 02-05-2023, 03:21 PM  
Giseldah
The Wary
 
Giseldah's Avatar
Interface Author - Click to view interfaces

Forum posts: 2
File comments: 56
Uploads: 5
A couple of expression examples

Note: The goal for CalcStat Expressions is to expose CalcStat to the end-user. It's not meant to be used by plugins as they can just use the CalcStat function in the Lua programming environment, which is much more efficient.
You should read CalcStat Expressions doc at Lotro-Wiki to start with. Some previous experience with Lua, or any scripting language, will be helpful.

Armour on an item (enter iLvl in $L field and armour code in $N or $C field):
Code:
@Armour#($C)
Current Critical Hit Chance percentage:
Code:
With($PercName = "CritHit",
     $PercRating = $PlayerCritHit,
     $PercLevel = $PlayerLevel,
     $PercValue = CalcStat($PercName.."PRatP",$PercLevel,$PercRating)+CalcStat($PercName.."PBonus",$PercLevel):
   "Current "..$PercName.." percentage with "..$PercRating.." rating at lvl"..$PercLevel.." is: "..
   Format(Afd($PercValue,"AddP"),"%.1f%%")
)
- Much less fancy, with playerlvl 80 and rating 12345 for example(and CritHit does not have a bonus): @crithitpratp80#12345
- Current percentage: @crithitpratp($playerlevel)#($playercrithit)
- Next level percentage: @crithitpratp($playerlevel+1)#($playercrithit)
- Percentage with some more rating specified in $N(or$C field): @crithitpratp($playerlevel)#($playercrithit+$n)
- You could extend the previous with $L and use to-field for a $L range: @crithitpratp($playerlevel)#($playercrithit+$l*100 +$n)

Current difference from required rating for Outgoing Healing percentage cap:
Code:
With($PercName = "OutHeal",
     $PercRating = $PlayerOutHeal,
     $PercLevel = $PlayerLevel,
     $PercCapRating = CalcStat($PercName.."PRatPCapR",$PercLevel),
     $RatingDifference = $PercCapRating-$PercRating:
   "Current rating is "..
   Switch($RatingDifference,
      Case < 0: -$RatingDifference.." above",
      Case > 0: $RatingDifference.." under",
      Default: "exactly on"
   )..
   " the cap rating ("..$PercCapRating.." at lvl"..$PercLevel..") for "..$PercName.."."
)

Last edited by Giseldah : 02-07-2023 at 06:56 AM.
Giseldah is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 02-20-2022, 02:36 PM  
Giseldah
The Wary
 
Giseldah's Avatar
Interface Author - Click to view interfaces

Forum posts: 2
File comments: 56
Uploads: 5
Re: Crit rating and TactMas rating calculations are incorrect

At the moment CalcStat is slightly off when calculating Crit rating and TacMas rating. I think the way these stats scale changed slightly with the launch of gundabad.

Problem is that they made last minute changes to Critical Rating and Tactical Mastery and that in a way that they only changed part of the progressions. The result is that you have now 2 versions of those stats: one from before those changes and the other after.
I introduced a postfix 'Old' for the older versions, so CritHitOld and TacMasOld.
Giseldah is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 01-15-2022, 05:32 PM  
Leon
The Wary

Forum posts: 0
File comments: 1
Uploads: 0
Crit rating and TactMas rating calculations are incorrect

At the moment CalcStat is slightly off when calculating Crit rating and TacMas rating. I think the way these stats scale changed slightly with the launch of gundabad.
Leon is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 04-08-2021, 12:59 AM  
Giseldah
The Wary
 
Giseldah's Avatar
Interface Author - Click to view interfaces

Forum posts: 2
File comments: 56
Uploads: 5
How to use in Excel

These easy steps show how to import CalcStat in Excel:

1) https://i.imgur.com/DIDWfUd.jpg

Start statdcmp.vbs (the script compiler) and select the output type VBA (Visual Basic for Applications): enter 1 and click OK.

2) https://i.imgur.com/CYn6wTW.jpg

Most likely you want to select the full version with all stats. Enter 1 and click OK.

3) https://i.imgur.com/uqvVed5.jpg

Click OK with any compiler technical information messages. The last will say that the compile of the VBA script file (.bas extension) has completed.

4) https://i.imgur.com/igRJvyj.jpg

In Excel, open or create a new spreadsheet and click on Developer menu -> Visual Basic. This will open the Visual Basic editor.

5) https://i.imgur.com/9eGtlFS.jpg

Open the Import Dialog window by File menu -> Import File... or right-click the Project Panel -> Import File...

6) https://i.imgur.com/4R1Z7KN.jpg

Select the script file that you've created and click Open.

7) https://i.imgur.com/m6xm1QV.jpg

The imported script file will show under 'Modules'.

8) https://i.imgur.com/0n86yal.jpg

Save your spreadsheet as a Macro-Enabled workbook (.xlsm).

9) https://i.imgur.com/Woq2EMg.jpg

Enter a CalcStat formula into a cell..

Last edited by Giseldah : 04-08-2021 at 06:07 AM.
Giseldah is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 04-06-2021, 10:23 AM  
Giseldah
The Wary
 
Giseldah's Avatar
Interface Author - Click to view interfaces

Forum posts: 2
File comments: 56
Uploads: 5
Microsoft Excel

CalcStat will finally work in MicroSoft Excel in the next version!

Most of the work was already done for the Java output, because of the limitations to procedure sizes (both can't compile to larger than 64k bytes per procedure).


Last edited by Giseldah : 04-06-2021 at 10:26 AM.
Giseldah is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 03-15-2021, 09:15 AM  
Giseldah
The Wary
 
Giseldah's Avatar
Interface Author - Click to view interfaces

Forum posts: 2
File comments: 56
Uploads: 5
Java support

A Java output option will soon be available, so CalcStat can be used in even more projects. I've finished it, but I want to enter some more stats first (item sell values).
Giseldah is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 02-19-2021, 05:55 AM  
Giseldah
The Wary
 
Giseldah's Avatar
Interface Author - Click to view interfaces

Forum posts: 2
File comments: 56
Uploads: 5
Lotro-Wiki

CalcStat has now been integrated into Lotro-Wiki: https://lotro-wiki.com/index.php/Module:CalcStat

This brings to Wiki the possibility to automatically generate stat data from a centralized base, making it easier to cope with changes inside the game.

CalcStat is already being used in a lot of places like on the Virtues page. The Virtue XP cost per rank table and the Virtue / Stat Comparison Matrix are now all calculated. This also include all the individual virtue pages.
When the virtue cap changes from 72 to 74 then everything will be updated on these pages by changing a single number.

Another example are the new Stats Tables, like this one here for the captain skill Cry of Vengeance:


Giseldah is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 01-15-2021, 11:56 AM  
Giseldah
The Wary
 
Giseldah's Avatar
Interface Author - Click to view interfaces

Forum posts: 2
File comments: 56
Uploads: 5
New command line option:



Note that you need to re-compile to use the full version.

Last edited by Giseldah : 01-15-2021 at 11:56 AM.
Giseldah is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 07-29-2020, 12:25 PM  
Giseldah
The Wary
 
Giseldah's Avatar
Interface Author - Click to view interfaces

Forum posts: 2
File comments: 56
Uploads: 5
Skill output - Healing

Healing formula:

SkillMaxHeal = (THR*SkillMP+@LvlBonusMorRes)*(1+@OutHealPRatP+Add P)

1) THR:
- 1 per level (max 50)
- THR from LI including rune of Binding

2) SkillMP:
- a skill defined multiplier value (separate multiplier for HoTs)

3) AddP:
- percentages from traits/LIs that add to the rating percentage

Example Minstrel Bolster Courage 130, 323380 Outgoing Healing Rating etc.:

THR = 50 + 327.63(songbook LI) + 118(LI rune) = 495.63

CalcStat(LvlBonusMorRes,130) = 430.54095

SkillMP = 14.4(Bolster Courage)

CalcStat(OutHealPratP,130,323380) = 28.593% -> /100 = 0.28593

AddP = 34.4%(Legacy Healing and Motivation Skills) + 32.4%(Legacy Bolster Courage Healing) + 12%(yellow trait Of All Traits) = 78.8% -> /100 = 0.788

->

SkillMaxHeal = (495.63*14.4+430.54095) * (1+0.28593+0.788)

SkillMaxHeal = 7567.61295 * 2.07393 = ~ 15694.7

SkillMinHeal = 0.7 * SkillMaxHeal = ~ 10986.29

Tooltip: 10986 - 15695

Last edited by Giseldah : 07-30-2020 at 05:12 AM.
Giseldah is offline Report comment to moderator   Reply With Quote Reply With Quote
Post A Reply

 
Category Jump:
Search this Category:
 

All times are GMT -5. The time now is 01:07 AM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | ESOUI | LoTROInterface | MMOUI | Swtorui