Closed CollinHerber closed 1 month ago
Looks like PassiveTreePlayer.Points is -1 but I'm not sure what is setting it since the default should be 0.
Is there a reliable way to reproduce this bug?
The issue is caused by AnchorPassive
being set to level 1 in PassiveElement.cs
:
// Anchor passive should always be "unlocked", thus this hardcoding
if (_passive is AnchorPassive)
{
_passive.Level = 1;
}
This seems to be a hackish way of guaranteeing AnchorPassive
exists.
The easy solution to this is to either:
If we go with option 2, characters still affected by the contaminated value can be fixed with the following steps:
However, not having the AnchorPassive
level 1 guarantee anymore could cause side-effects.
Steps to Reproduce
- Create a 'TestDummy' character
- Open any saved world
- Open the inventory menu
Click on the skill tree bar at the top center of the screen
- Observe that the skill point number is 0
- Click on Settings
- Inside the Settings Menu, click on Save & Quit
- Open any saved world
- Open the inventory menu
Click on the skill tree bar at the top center of the screen
- Observe that the skill point number is now -1
Cause
The issue is caused by
AnchorPassive
being set to level 1 inPassiveElement.cs
:// Anchor passive should always be "unlocked", thus this hardcoding if (_passive is AnchorPassive) { _passive.Level = 1; }
This seems to be a hackish way of guaranteeing
AnchorPassive
exists.Solution
The easy solution to this is to either:
- remove this code
- or explicitly set this value to zero
If we go with option 2, characters still affected by the contaminated value can be fixed with the following steps:
- open any world
- save and quit to sanitize the character save file
However, not having the
AnchorPassive
level 1 guarantee anymore could cause side-effects.
Thank you for the research into this. Shouldn't this check prevent it from going into the -1? https://github.com/Path-of-Terraria/PathOfTerraria/blob/main/Common/Systems/PassiveTreeSystem/PassiveTreeSystem.cs#L89
Additionally I'm down to update the anchor code to not be an allocatable passive but rather just something you get for free as a starting area. However we want to accomplish that. Might make that easier to handle
The reason that code doesn't catch it is because AnchorPassive
is not blacklisted like Anchor
.
if (passive.InternalIdentifier != "Anchor" && passive.Level > 0)
That check would need to include something like:
if (passive.InternalIdentifier != "AnchorPassive" && passive.InternalIdentifier != "Anchor" && passive.Level > 0)
What I would like to know is what does AnchorPassive
and Anchor
actually do?
They are the "origin" node of the respective skill trees. Anchor is just the skill tree anchor, and AnchorPassive is for SkillPassives, which are almost the same system. Neither do anything but hold connections to other nodes.
Essentially what Gabe said. They are the starting point of the tree. This is also what is used to see if a passive is able to be allocated or not, it tries to reach the anchor through allocated nodes.
Since there's logic that depends on these anchors, I think it best to leave them alone until it becomes clear that their design will cause significant problems.
Description
When level 0 it should show "0" Points remaining, not -1
Reproduction steps
No response
Screenshots
No response
Logs
No response