EtienneLamoureux / TQVaultAE

Extra bank space for Titan Quest Anniversary Edition
MIT License
279 stars 62 forks source link

Export to csv and Stuff! #462

Closed hguy closed 2 years ago

hguy commented 2 years ago

Implement CSV export as suggested in #437.

Translation : EN/FR.

Context menu

image

Settings

image

Added documentation for Arz Explorer & Save File Explorer

https://github.com/hguy/TQVaultAE/blob/export-to-csv/documentation/ARZEXPLORER.md https://github.com/hguy/TQVaultAE/blob/export-to-csv/documentation/SAVEFILEEXPLORER.md

Added documentation for advanced search

https://github.com/hguy/TQVaultAE/blob/export-to-csv/documentation/ADVANCEDSEARCH.md

Added advanced search category filtering

image

Strongly Typed RecordId

unaltered string recordId has become more valuable over time mostly for display reasons (Prefix/Suffix). NormalizeRecordPath(string recordId) was everywhere and string mutation was paid everytime. The need for a structure that nullify string recordId case sensitivity during comparison (Equal, Comparable) and preserve the raw value was strong. Now all string recordId are defined as class RecordId. class RecordId embed the Raw value and Normalized value. The Normalized is used for comparison and paid once, the Raw for display and persistance. It support common operators Equals(), <, >, ==, !=. You can produce a class RecordId instance from a string using the following.

RecordId recommendations

var recId = rec.ToRecordId();// Explicit - paid once
var relatedSkills = PlayerCollection.PlayerInfo.GetSkillsByBaseRecordName(recId);// Used here
var relatedPoints = relatedSkills.Sum(s => s.skillLevel);
var masteryInfo = this.Database.GetInfo(recId);// and here
var reagentId = variable.GetString(0);// Return string
var reagentRecord = Database.GetRecordFromFile(reagentId);// Accept RecordId

Improvements

Better affixes data extraction Improved overall stability while custom map enabled

Fixes

Item relic overlay didn't show for second relic. Advanced Search saved queries didn't persist. Fix false positive on Item.IsImmortalThrone, Item.IsRagnarok, Item.IsAtlantis Fix Reset Mastery problem #455 Fix #464 Empty vault directory bug Fix #405 difficulty unlocked override Fix #279 startup error Fix #243 by showing icons and tooltip info

Affixes for unique

This last step allow affixes pickup for uniques. It try to suck all known Prefix/Suffix per gear type (e.g, all affixes for axe if the unique is an axe). image image image

Local directory userSettings.

Old user.config settings are in sub directories of "%USERPROFILE%\AppData\Local\titanquest.net_community". It was a pain for users and the source of too many misunderstanding during support, so i move all userSettings into UserConfig.xml which is deployed with the executable. From now on, it's the dedicated file for all user level configuration.

It is programmatically used in an exact similar way as the standard .NET class except we control the path.

Examples:

TQVaultAE.Config.UserSettings.Default.Scale = 1;
TQVaultAE.Config.UserSettings.Default.Save();

The FAQ is adjusted accordingly.

Note : If the user reuse the same directory with this new version, an error can happen preventing the tool to launch. Two solutions possible.

  1. Delete everything inside "%USERPROFILE%\AppData\Local\titanquest.net_community" and restart.
  2. installing the tool in a different directory.