Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculation Rewriting Part 2.4: Basic UI #517

Merged
merged 131 commits into from Feb 9, 2019
Merged

Conversation

brather1ng
Copy link
Member

@brather1ng brather1ng commented Feb 2, 2019

This PR adds the "Computation" tab in the top right corner. It is connected to everything happening in the program (nodes, items, socketed gems, etc.), but UI changes are limited to the new tab.

Startup takes a bit longer because the game data has to be loaded and the initial parsing and computation is done (all "given" modifiers and the whole skill tree). Performance shouldn't be a problem otherwise, except when switching builds, which takes a few seconds until the computation tab is up to date again.

The UI should mostly be intuitive, but it's obvious that it isn't final. I've decided not to translate stat identifiers into a better readable format because the stat display UI will be changed later on anyway.

I've compared computation results with Path of Building and differences are mainly caused by rounding, which isn't currently done at all except for item properties. Other differences are caused by different calculation models, i.e. the final result stat has the same value but intermediate stats are calculated differently. One example of that is that stats like Physical.Damage.Attack.MainHand.Skill don't use the effective damage multiplier, while PoB's "MH Average Hit" / Physical does.

Which modifiers are supported is not displayed anywhere. You can check https://github.com/PoESkillTree/PoESkillTree/tree/computation-basic-ui/PoESkillTree.Computation.IntegrationTests/Data (mainly NotParseableSkills.txt) to get an idea. That directory is complete for base item, skill tree and skill gem modifiers.

As part of the PR I've changed the target framework to .NET Framework 4.6.2. I've also removed the old Computation and ItemDB code and the "Character Sheet" UI.

For the new computation to be worth an alpha release, I want to add flask UI support and improve the socketed gem UI. I'll do that on separate branches.

Fixes #501
Fixes #100, fixes #185, fixes #458, fixes #496, fixes #507, fixes #508

Also, remove unused DotNetZip package
(only dummy data, no functionality)
Make JObject deserialization fully async (generic object deserialization does not support async)
- Extract StatTranslationFileNames class containing the file name constants
- Rename StatTranslationLoader to StatTranslators to match naming of other GameModel classes
- Add CreateFromMainFileAsync() method that creates a StatTranslator for the main file
Instead lazily create these only once as lists
(using AsyncLazy from AsyncEx, which depends on System.Collections.Immutable, which caused all the app.config changes for some reason)
to load GameData in MainWindow on startup and insert the tree definition after the deserialization tasks started.
Adjust ComputationViewModel to use GameData.
Extract two function from MainWindow.Window_Loaded()
I'll be using Rx.Net for most of the computation-UI-connection
- Fix multiple conversions with same target and different source interfering with each other by using BehaviorPathRules.ConversionWithSpecificSource
- Fix conversion chains only using the last conversion percentage by changing ConversionTargetPathTotalValue to -BaseValue
- Fix conversions chains not being recognized when intermediate stats are not calculated by explicitly calculating their UncappedSubtotals
Clarify that durations are measured in seconds in comments
Fix typo causing hit damage to use main hand as off hand damage
Previous removal of SkillIsMain leads to issues when the same skill id is socketed multiple times. These two stats have the upside over SkillIsMain that they don't need to be set per skill and thus can't cause "Multiple TotalOverride modifiers" issues.
Change Observable.FromEventPattern to Subject because the last update just before disposing the subscription didn't reach the calculator.
Use it as ModifierSource.SourceName and store skillId in a new property instead
Notifications currently only flow in one direction: config UI -> build. "Discard changes" on the build doesn't yet update config UI and changing build might not do that either in some cases.
@brather1ng brather1ng added this to the Computation Alpha milestone Feb 2, 2019
@brather1ng brather1ng merged commit 2cc1145 into master Feb 9, 2019
@brather1ng brather1ng deleted the computation-basic-ui branch February 9, 2019 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment