-
Notifications
You must be signed in to change notification settings - Fork 10
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
Allow decreasing lower tier skills #4
Comments
I guess it's related to the "skill/level", which is shown at the bottom. You need to remove the talents in the same (reversed) order as you spent them. Was this intended (maybe it's just a confusing requirement for your app)? |
@Iturio Thanks for the feedback! Yeah this was intentional as I had some issues with the logic around decreasing higher levels when removing lower level talents. To get the first version out I only allowed the removal of talents at the highest tier of that tree. A lot of feedback from the reddit thread was around this so I'm going to have another look when I get a chance! |
I've had a few attempts at this and I'm still having trouble working out how to calculate which skills need to be reset when reducing lower tier skills without any bugs. Any help on how this logic should work would help, although I'll keep looking into it |
Since I have opened a few tickets on issues I will just comment on this. I hope I have understood your comment correctly. I understand it as "which points can legally be removed?" I do not code in anything but C# and MatLab (lol, I know ;) but really; MatLab does make some pretty figures for scientific papers and presentations), so I chose not to start reading your code. Just so we agree on syntax: "lower (level) tier" is the ones up highest visually in the trees, e.g. the lowers tier is tier one and is available at lvl 10. Similarly, "higher (level) tiers" are those available later. If I had to implement it, I would probably do the following, when a user tries to remove points in a tier:
NB: Technically, the order of tiers you test is irrelevant. I just think that there is a higher chance to catch an illegal action if you start from the higher tiers. I guess this completely irrelevant since we are talking so few operations anyway. Example 1: Example 2: In order to do this, you need to have some counter telling you the highest tier in which you have points, but I guess you already have that in some way. If not, I guess it is easy to add. I do not claim this is necessarily the prettiest solution, but I think it should work :) |
This is in react but I got the logic fixed. I didn't implement the skill selected at each level so that may still be a problem but this logic makes sure the user is allowed a valid decrease
|
@Mikewa33 Thanks for the code. I've just tried it out and although it does allow you to decrease lower levels, it allows you to spec out the following which is invalid: I've tested in the old vanilla client and in this example you would have to have 10 points in the first 2 tiers before you can add them to the 3rd. This is where I've been having a lot of trouble in my previous attempts. |
My bad I caught that and forgot to update the comment. Try out this. It should fix the issue. It is a little heavier on the loops but it makes sure that each skill is still valid
|
@Mikewa33 I've tried out the code above and there are a few issues where it doesn't reset the higher tier skills when you decrease a lower tier. |
Sometimes (couldn't find a reproduceable cause) it's not possible to remove spent points, even if there aren't any depending talents or still enough points spent. Most of the time it occurs if any talent from the next level gets improved. For example: You can spent 10 points on the first level and as soon as you put 1 point into any talent from the second level, you can't reduce any points from the first level (even as the second level should only require 5 points on the first level).
Tested with Chrome: Version 74.0.3729.131 (Official Build) (64-Bit)
The text was updated successfully, but these errors were encountered: