Skip to content

Conversation

@Paliak
Copy link
Contributor

@Paliak Paliak commented Aug 23, 2022

Fixes #4912 .

Description of the problem being solved:

Adds support for mods found on Dialla's Malefaction.

Steps taken to verify a working solution:

-Equip Dialla's Malefaction and test.
-Equip Malachai's Artifice and test
-Equip Doomsower and test

Link to a build that showcases this PR:

https://pobb.in/SsGKk-Zz6COO

after_dialla.mp4

@Regisle
Copy link
Member

Regisle commented Aug 24, 2022

If your adding logic for socket colours, is it possible to do the opposite and add logic for gem colours, particularly Doomsower and Malachai's Artifice?

@Paliak
Copy link
Contributor Author

Paliak commented Aug 24, 2022

@Regisle I'm not sure but likely doable. I'll look into it.

@QuickStick123 QuickStick123 added the enhancement New feature, calculation, or mod label Aug 25, 2022
@Paliak Paliak changed the title Add support for socketed in specific socket color mods found on Dialla's Malefaction Add support for socketed in specific socket color mods found on Dialla's Malefaction and Malachai's Artifice Aug 25, 2022
@Paliak Paliak changed the title Add support for socketed in specific socket color mods found on Dialla's Malefaction and Malachai's Artifice Add support for socketed in specific socket color mods found on Dialla's Malefaction and Malachai's Artifice and Doomsower Aug 25, 2022
…t. Refactor the rest of the code to use dots instead of full keys.
Copy link
Contributor

@QuickStick123 QuickStick123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once these are addressed I think this would be good to merge.

@Paliak
Copy link
Contributor Author

Paliak commented Sep 19, 2022

I removed some checks from the SocketedIn condition. This allows for more flexibility with negation and simplifies code but could also cause issues if used incorrectly.

@QuickStick123
Copy link
Contributor

Yeah I see what you mean like that now if use neg = true with keywords and socketColour it will ignore the socketColour bit and just match negative of the keyword. I guess there are just so many keys in this code now it can produce some uncertain interactions with tag.neg because there are mutliple things that could be negated. A maintainer should probably decide if we apply tag.neg only for socketColours/sockets or do this extended/unclear implementation of it.

@QuickStick123
Copy link
Contributor

The last change seemed to break some stuff as well.
Namely the vaal pact mod because we check if socketColour ~= cfg.socketColour before we use this for all socket colour.
Socketed mods other than diallas/added seem broken.
Socket color seems to trigger when it shouldn't as nil is always ~= a colour.

I think this can be resolved by moving the socket colour comparasion after the socket stuff and adding a nil check.
And fixing the keyword check back to the original or an equivilent version. "tag.keyword and not (cfg.skillGem and calcLib.gemIsType(cfg.skillGem, tag.keyword))" As if we just want to check if something is socketed in something then keyword is nil and we should let this pass. You could also use your tag.keyword ~= nil or cfg.skillGem ~= nil in replace of the direct comparisons if you were afraid of these being 0 or false.

@Paliak
Copy link
Contributor Author

Paliak commented Sep 19, 2022

@QuickStick123 VaalPact from DoomSower doesn't work but can't replicate the other issues you're having. Dialla's mods, Malachai and Doomsower phys as extra seem to work fine. I'll try to reorder the checks like you said.

@QuickStick123
Copy link
Contributor

Sorry should've been clearer mods like +1 to level of socket's gems doesn't work.

@Paliak
Copy link
Contributor Author

Paliak commented Nov 28, 2022

Note GroupProperty is applied to every group. This is only a problem on the Doomsower mod You have Vaal Pact while all Socketed Gems are Red as it is possible to have multiple groups that count as socketed in the same item.

If there exist two groups both socketed into Doomsower, one with a single red gem and the other with a green gem the group with the single red gem will be enough to satisfy the all condition of the mod.

@QuickStick123
Copy link
Contributor

This seems to behave correctly it has merge conflict though and it would be nice to get #5179 merged first to check the tests.

Copy link
Member

@Wires77 Wires77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of those mod parsing lines might be able to be generalized some more (e.g. level/quality could be dynamic) but otherwise this looks good to me.

@Wires77 Wires77 merged commit f870391 into PathOfBuildingCommunity:dev Dec 9, 2022
@Wires77 Wires77 changed the title Add support for socketed in specific socket color mods found on Dialla's Malefaction and Malachai's Artifice and Doomsower Add support for socketed in specific socket color mods found on Dialla's Malefaction, Malachai's Artifice, Doomsower Dec 9, 2022
@Paliak Paliak deleted the socketedInColorMods branch January 20, 2024 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature, calculation, or mod

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dialla's Malefaction Socket Color Bug

5 participants