Quantcast
lotrointerface.com
Search Downloads


Go Back   LoTROInterface > LotRO Libraries


Post A Reply
Author Comments Comment Options
Unread 01-26-2020, 02:14 PM  
Giseldah
The Wary
 
Giseldah's Avatar
Interface Author - Click to view interfaces

Forum posts: 0
File comments: 34
Uploads: 3
LOTRO Ratings Calculator

The new (beta version 0.99) LOTRO Ratings Calculator is using 1.3.3p JavaScript version of CalcStat.
The proper location for calcstat.js is the js subdirectory in the root of that web-application.
Giseldah is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 12-20-2019, 07:07 AM  
Giseldah
The Wary
 
Giseldah's Avatar
Interface Author - Click to view interfaces

Forum posts: 0
File comments: 34
Uploads: 3
If you have a request for some script type then let me know.
Current system is flexible, but it's not suited for languages with strict type-casted variables.

Last edited by Giseldah : 12-21-2019 at 10:56 AM.
Giseldah is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 12-09-2019, 04:37 AM  
Giseldah
The Wary
 
Giseldah's Avatar
Interface Author - Click to view interfaces

Forum posts: 0
File comments: 34
Uploads: 3
readme

Stat definition file statdata.csv:

You can view this comma separated values file with something like a spreadsheet application. Upload it to Google Sheets for example or use LibreOffice Calc, Microsoft Excel etc.

Compilation of statdata.csv:

Execute statdcmp.vbs (double click) to generate the CalcStat script file. This will contain the major calculation function.
Output version "Percentage calculations only" supports ratings<->percentages and rating penetration calculations and will do for all known Lotro plugins at this time.

Installation/use:

Lotro Plugins:
Extract the zip file to your Lotro Plugins directory. After, you should have a directory like "C:\Users\UserName\Documents\The Lord of the Rings Online\Plugins\Giseldah\CalcStat"
Plugins can import this library using the statement: import "Giseldah.CalcStat"
The directory already contains a "Percentage calculations only" version by default, so you don't need to compile statdata.csv if this is all you require.

OpenOffice/LibreOffice:
Compile statdata.csv with StarBasic as output script type. This will generate the CalcStat.bas file with the CalcStat function.
Inside the Calc spreadsheet application, create a new CalcStat macro module, either under "My macros & Dialogs" for use globally in any spreadsheet or create the module in a specific spreadsheet.
Copy the content of the CalcStat.bas file to this new module.

VB-script (Windows):
Compile statdata.csv with VB-script as output script type. This will generate the CalcStat.vbs file with the CalcStat function.
You can include CalcStat.vbs conveniently in a script job by using a WSF file (see https://en.wikipedia.org/wiki/Windows_Script_File).
See the vbs_example directory for an example script.

PHP:
Compile statdata.csv with PHP as output script type. This will generate the calcstat.php file.
You can include this file in your PHP enabled web pages and start using the CalcStat function for your calculations.

javascript:
Compile statdata.csv with JavaScript as output script type. This will generate the calcstat.js file.
You can include this file in your JavaScript enabled web pages and start using the CalcStat function for your calculations.

Last edited by Giseldah : 12-21-2019 at 10:55 AM.
Giseldah is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 11-29-2019, 06:37 AM  
Giseldah
The Wary
 
Giseldah's Avatar
Interface Author - Click to view interfaces

Forum posts: 0
File comments: 34
Uploads: 3
"AwardLvlToILvl" (Character Level to Item Level mapping as used for Mathom armour items, scaling leveling items) was changed again for levels > 120 and is incorrect in current version 1.1.1
Giseldah is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 11-18-2019, 07:38 AM  
Giseldah
The Wary
 
Giseldah's Avatar
Interface Author - Click to view interfaces

Forum posts: 0
File comments: 34
Uploads: 3
New compiler option version selection:

"Percentage calculations only" supports ratings->percentages, percentages->ratings and rating penetration calculations.

Resulting CalcStat function size will become smaller with the reduced number of stats. Search tree depth becomes smaller as well, so stat searches become slightly more efficient.

You can query version type with stat -Version which will return something like "1.1.1f" or "1.1.1p" (string type).

Last edited by Giseldah : 11-20-2019 at 02:18 AM.
Giseldah is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 11-01-2019, 03:20 AM  
Giseldah
The Wary
 
Giseldah's Avatar
Interface Author - Click to view interfaces

Forum posts: 0
File comments: 34
Uploads: 3
Pseudo code in definitions

Some small explanation of the stat data definitions:

Value = CalcStat( string Name, number L, number N | string C )

L(evel) and N(umeral) can be used directly in formulas as can some support functions in combination with C.

To keep definitions shorter, and so more readable, I've developed some pseudocode:

@Name{L}#{N} or @Name{L}#{C}

This is the same as above.

{} is not needed if the passed values are digits or a dot:

@Name130#0.4

Default for N is 1, so only @Name130 is the same as @Name130#1.

@Name130# means that you pass along L=130 and the current context N.

@Name#0.4 means that you pass current context L and N=0.4.

@Name# means that you pass current context L and N.

@Name means that you only pass current context L

No short code for passing C is provided at the moment, other then explicit #{C}.

Examples:
@Block#1.2 - returns 1.2 points of current L (item)Block rating, where L is assumed to be the item level in this case.
@PhyMasT#0.8 - returns 0.8 points of current L (Trait/skill)Physical Mastery rating, where L is assumed to be the character level (see notes).
@CritHit{@LvlToILvl}# - @LvlToILvl assumes current L=character level and translates this to an item level. the resulting item level is then passed as L to @CritHit along with current N and this returns the (item)Critical Rating.

Last edited by Giseldah : 11-01-2019 at 04:12 AM.
Giseldah is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 12-07-2018, 09:19 AM  
Giseldah
The Wary
 
Giseldah's Avatar
Interface Author - Click to view interfaces

Forum posts: 0
File comments: 34
Uploads: 3
Changes

These stats were changed:

CPTCRITDEF - Captain critical defence rating passive
DWARFENDURVITALITY - Dwarf racial trait skill Dwarf Endurance Vitality
GRDCRITDEF - Guardian critical defence rating passive
GRDPROTECTIONAVOID - Guardian trait skill Protection b/p/e ratings
GRDTENDERIZECRITHIT - Guardian trait Tenderize Critical hit rating
GRDWARDTACTTACMIT - Guardian trait Guardian's Ward Tactics Tactical Mitigation
LMHEARTYDIETMORALE - Lore-master trait Hearty Diet Morale
RACIALMAIN - racial traits main stat
SHIELDBRAWLERBLOCK - Dwarf racial trait Shield-brawler Block rating
Giseldah is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 12-02-2018, 03:58 PM  
Giseldah
The Wary
 
Giseldah's Avatar
Interface Author - Click to view interfaces

Forum posts: 0
File comments: 34
Uploads: 3
Some usage examples

Just a few of the many calculations:

Tactical Offence Damage percentage (+0.0002 to make it like in the character window) =
CalcStat("TacDmgPRatP",PlayerLevel,Rating)+0.0002

Resistance percentage from rating including T2 penetration =
CalcStat("ResistPRatP",PlayerLevel,Rating+CalcStat ("T2PenResist",MobLevel))+0.0002

Full Evade percentage cap =
CalcStat("EvadePRatPCap",PlayerLevel)

Required Evade rating for percentage =
CalcStat("EvadePPRat",PlayerLevel,Percentage)

Mithrin Vitality essence value (ilvl 372) =
CalcStat("Vitality",372)

Armour value for ilvl 380 medium head gear purple =
CalcStat("Armour",380,"MHP")

Captain's In Defence of Middle-Earth main stats buff =
CalcStat("CptIDOMEMain",PlayerLevel)

Critical Defence on item =
CalcStat("CritDef",ilvl,points)

Knowledge of Eldar Days III LI title Tactical Mastery Rating =
CalcStat("TitTacMas",nil,"III")

Last edited by Giseldah : 12-02-2018 at 04:30 PM.
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 03:58 PM.


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