DestinyItemManager / DIM

Destiny Item Manager
https://destinyitemmanager.com
MIT License
2.07k stars 642 forks source link

Regular version of seasonal mod is shown (and cannot be applied) if seasonal mod is unlocked #7434

Closed nwLSteam closed 1 year ago

nwLSteam commented 2 years ago

DIM Version

Version 6.94.0.1000988 (beta), built on 9.12.2021, 14:21:07

Browser Details

Microsoft Edge Version 96.0.1054.43 (64 Bit)

OS Details

Windows 10

Describe the bug

Situation: I wanted to create a loadout for Witch Queen, so I chose the normal Shotgun Ammo Finder (not the seasonal one which I have unlocked), since the seasonal one will be removed after this season.

Applying the loadout nets an error for Shotgun Ammo Finder:

ErrorCode: 1675
ErrorStatus: "DestinyCannotAffordMaterialRequirements"
Message: "You cannot afford the material requirements for that action."
MessageData: {}
ThrottleSeconds: 0

I suspect this is because the seasonal Finder replaces the normal one.

Logs

instrument.ts:130 [loadout] Apply loadout :: PvE to Human Warlock
instrument.ts:130 [loadout mods] Mods to apply (18) [555005975, 4048838440, 4048838440, 2645858828, 1476367343, 4148827738, 403494087, 2790645726, 2588939505, 1429600943, 3836152936, 2146553541, 3561960031, 3632726238, 3523075120, 179977572, 2216063962, 2216063960]
instrument.ts:130 [loadout mods] Applying (5) [{…}, {…}, {…}, {…}, {…}] to Mask of Righteousness
instrument.ts:130 [loadout mods] equipping mod Shotgun Ammo Finder into Mask of Righteousness socket 2

instrument.ts:159 
       POST https://www.bungie.net/Platform/Destiny2/Actions/Items/InsertSocketPlugFree/ 500
(anonym) @ instrument.ts:159
l @ authenticated-fetch.ts:48
await in l (asynchron)
processQueue @ rate-limiter.ts:68
add @ rate-limiter.ts:45
(anonym) @ rate-limiter.ts:118
(anonym) @ http-client.ts:126
(anonym) @ http-client.ts:160
(anonym) @ http-client.ts:254
(anonym) @ http-client.ts:201
(anonym) @ bungie-service-helper.ts:90
h @ api.js:155
g @ advanced-write-actions.ts:118
(anonym) @ advanced-write-actions.ts:104
(anonym) @ index.js:16
dispatch @ redux.js:659
(anonym) @ loadout-apply.ts:770
(anonym) @ index.js:16
dispatch @ redux.js:659
C @ loadout-apply.ts:690
(anonym) @ index.js:16
dispatch @ redux.js:659
(anonym) @ loadout-apply.ts:288
await in (anonym) (asynchron)
(anonym) @ index.js:16
dispatch @ redux.js:659
(anonym) @ loadout-apply.ts:103
(anonym) @ action-queue.ts:13
Promise.then (asynchron)
a @ action-queue.ts:12
(anonym) @ loadout-apply.ts:102
(anonym) @ index.js:16
onClick @ Loadouts.tsx:264
Be @ react-dom.production.min.js:52
qe @ react-dom.production.min.js:52
(anonym) @ react-dom.production.min.js:53
Tr @ react-dom.production.min.js:100
Pr @ react-dom.production.min.js:101
(anonym) @ react-dom.production.min.js:113
je @ react-dom.production.min.js:292
(anonym) @ react-dom.production.min.js:50
Mr @ react-dom.production.min.js:105
Qt @ react-dom.production.min.js:75
Xt @ react-dom.production.min.js:74
(anonym) @ scheduler.production.min.js:18
$o @ react-dom.production.min.js:122
Re @ react-dom.production.min.js:292
Gt @ react-dom.production.min.js:73
r @ helpers.ts:88

instrument.ts:130 [loadout mods] Applying (5) [{…}, {…}, {…}, {…}, {…}] to Dreambane Gloves
instrument.ts:130 [loadout mods] Applying (4) [{…}, {…}, {…}, {…}] to Channeling Robes (CODA)
instrument.ts:130 [loadout mods] Applying (4) [{…}, {…}, {…}, {…}] to Transversive Steps
instrument.ts:130 [loadout mods] Applying (4) [{…}, {…}, {…}, {…}] to Holdfast Bond
instrument.ts:130 [loadout mods] Mods applied 17 18
ryan-rushton commented 2 years ago

What are the other 4 mods that are trying to socket into said item? Can you show us the assignment strategy the "Show mod placement" button gives you?

nwLSteam commented 2 years ago

This happens with no other mods in play.

Loadout: Loadout

Item (with visible empty mod spots): Item (with visible empty mod spots)

Mod placement window: Mod placement window

Error box: Error box

EDIT: For completeness sake, the log (which apart from numbers hasn't changed): Log

bhollis commented 2 years ago

The seasonal and non-seasonal Shotgun Ammo Finder are definitely different hashes, and the one in your loadout is the non seasonal one, so that's not it. It's hard to say why Bungie wouldn't like that.

nwLSteam commented 2 years ago

The reason is most likely because the normal Finder does no longer "exist" (aka, is not selectable) for the character that has the seasonal Finder unlocked. The seasonal mod replaces the normal mod for players.

With the recently implemented ability to detect whether a player has the seasonal mod unlocked, the suggested fix would be: Silently apply the seasonal version instead of the regular one if the player's loadout lists the regular one, but the seasonal version is unlocked.

This is basically the "other way around" version of this fix: https://github.com/DestinyItemManager/DIM/issues/7420#issuecomment-989354136

bhollis commented 2 years ago

OK got it

ryan-rushton commented 2 years ago

The reason is most likely because the normal Finder does no longer "exist" (aka, is not selectable) for the character that has the seasonal Finder unlocked. The seasonal mod replaces the normal mod for players.

TIL thanks!

bhollis commented 2 years ago

To do this:

  1. We should build a mapping at runtime by name of seasonal to non-seasonal mods from the manifest.
  2. When adding mods to a loadout, always add the non-seasonal version (so when the season ends it "reverts" to the non-seasonal).
  3. When applying mods, choose the seasonal version if the user has it unlocked.

By doing it this way, we will preserve the intent of the loadout when the season ends, and anyway we can't build the mapping from seasonal mods back to their original ones after the season ends.

bhollis commented 1 year ago

I believe @robojumper fixed this in the recent PR to handle stat mod costs.