Quantcast
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: 04-11-2023 07:43 AM
Size: 156.87 Kb
Version: 2.1.3
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 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 and Java 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.
Archive List (Old Versions)
File Name
Version
Size
Author
Date
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: 78625
Views: 74897
Favorites: 11
Uploaded By:
 
Last Modified: N/A

View Pictures. Download Now! Post A Comment


Post A Reply
Author Comments Comment Options
Unread 04-11-2023, 07:48 AM  
Giseldah
The Wary
 
Giseldah's Avatar
Interface Author - Click to view interfaces

Forum posts: 2
File comments: 39
Uploads: 4
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: 39
Uploads: 4
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: 39
Uploads: 4
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: 39
Uploads: 4
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: 39
Uploads: 4
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: 39
Uploads: 4
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: 39
Uploads: 4
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: 39
Uploads: 4
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: 39
Uploads: 4
Skill output - Healing

Healing formula:

SkillMaxHeal = (THR*[email protected])*([email protected]+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
Unread 07-19-2020, 01:29 PM  
Giseldah
The Wary
 
Giseldah's Avatar
Interface Author - Click to view interfaces

Forum posts: 2
File comments: 39
Uploads: 4
Skill output - Tactical Damage

Tactical Damage formula:

SkillMaxTacDmg = ([email protected])*SkillMP*([email protected]+AddP )*(1+MultiP)

1) TDR:
- 1 per level (max 50)
- TDR from LI including rune of Enchantment

2) SkillMP:
- a skill defined multiplier value

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

4) MultiP:
- percentages from traits/LIs that need to be multipied with all

Example Minstrel Cry of the Valar 130, 312343 Tactical Mastery etc.:

TDR = 50 + 1168.66(weapon LI) + 177(LI rune) = 1395.66

CalcStat(LvlBonusTacDmg,130) = 693.374

SkillMP = 5.4(Cry of the Valar)

CalcStat(TacDmgPratP,130,312343) = 107.44% -> /100 = 1.0744

AddP = 5%(red bonus trait Discordant Ballads) + 12%(yellow trait Of All Traits) = 17 -> /100 = 0.17

MultiP = 5%(Li title Light dmg) + 68.8%(Li legacy Light dmg) + 20%(red trait tree passive Light dmg) + 25%(red trait Discordant Cries) = 118.8% -> /100 = 1.188

->

SkillMaxTacDmg = (1395.66+693.374) * 5.4 * (1+1.0744+0.17) * (1+1.188)

SkillMaxTacDmg = 2089.034 * 5.4 * 2.2444 * 2.188 = ~55397.076

SkillMinTacDmg = 0.7 * SkillMaxTacDmg = ~ 38777.954

Tooltip: 38778 - 55397

Last edited by Giseldah : 07-30-2020 at 03:47 AM.
Giseldah is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 05-07-2020, 07:36 AM  
Giseldah
The Wary
 
Giseldah's Avatar
Interface Author - Click to view interfaces

Forum posts: 2
File comments: 39
Uploads: 4
Level XP

Next version will have calculation of Level Experience. I've spent well over a week on figuring out what's happening on various levels. Fortunately, I have something working now. Results will almost all be calculated (I don't like data tables) on the fly. A drawback is that it can take some calculation time, especially when going to high character levels > 1000, because of the way the numbers are calculated (level^2 calculations) Ofc, realistic levels are much faster.

I've made a mod for TitanBar which uses this and some more integration of CalcStat. In principle, the player tooltip information window code does not need to be updated anymore, whenever stats change with a new update. All you need is a current CalcStat (which is now integrated in Plugin Compendium).
Plugin Compendium has the option of Dependencies, so if I'm correct, it can automatically install CalcStat with the main plugin.
https://i.imgur.com/b0FhG2b.png

Last edited by Giseldah : 05-07-2020 at 07:42 AM.
Giseldah is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 04-27-2020, 12:19 PM  
XFaern
The Wary
 
XFaern's Avatar
Interface Author - Click to view interfaces

Forum posts: 3
File comments: 5
Uploads: 3
Re: Re: Re: Re: Plugin Compendium support

Quote:
Yes, indeed. Lunarwater has just done the addition and it seems to work well with current version.
Many thanks
XFaern is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 04-26-2020, 04:20 AM  
Giseldah
The Wary
 
Giseldah's Avatar
Interface Author - Click to view interfaces

Forum posts: 2
File comments: 39
Uploads: 4
Version 1.4.1 looks alright for update 26.
I didn't check trait/skill/effect stats yet. It's always possible that some unannounced changes were made.
Giseldah is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 04-26-2020, 03:27 AM  
Giseldah
The Wary
 
Giseldah's Avatar
Interface Author - Click to view interfaces

Forum posts: 2
File comments: 39
Uploads: 4
Re: Re: Re: Plugin Compendium support

Quote:
Inclusion in the Compendium feed is not dependent on number of downloads, it is only dependent on Lunarwater adding your plugin to her feed. You have to send her a PM or post a message in the Compendium download forum to ask her to include your plugin (it's not an automated process, she has to add plugins manually and doesn't always see new plugins). Of course, for it to work, your .plugincompendium file does have to be correct as well.
Yes, indeed. Lunarwater has just done the addition and it seems to work well with current version.
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 10:39 AM.


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