doomeer / kalandralang

A programming language for Path of Exile crafting recipes.
MIT License
58 stars 4 forks source link

Mods that should have Tiers, dont have them #21

Closed AR-234 closed 2 years ago

AR-234 commented 2 years ago

Got this buy running buy "Metadata/Items/Armours/Boots/BootsStrDex8" ilvl 85 for 3 chaos

--------
Dragonscale Boots (Rare)
--------
(prefix) 10% increased Movement Speed (MovementVelocity1)
(prefix) [T1] 40% increased Armour and Evasion
              17% increased Stun and Block Recovery (LocalIncreasedArmourAndEvasionAndStunRecovery6)
(prefix) [T3] +62 to maximum Life (IncreasedLife6)
(suffix) [T1] 28% increased Stun and Block Recovery (StunRecovery6)
(suffix) +28% to Cold Resistance (ColdResist4)
--------

Shouldn't they have a tier? It is for movement and resistances as far as I can tell

Edit: Modgroups I found for that Base that clearly have tier but dont:

doomeer commented 2 years ago

Thanks for noticing (I clearly didn't test a lot). I found that this was because I kept Eldritch implicit mods in the pool while computing tiers, which cause multiple mods of the same mod group to have the same tier, which caused Kalandralang to think that the tier could not be computed. I pushed a patch to ignore Eldritch implicit mods. Tested on boots, seems to fix the issue for the mod groups you identified :) This also explains why I didn't see that: I tested on amulets, which don't have Eldritch implicits.

AR-234 commented 2 years ago
buy "Metadata/Items/Armours/Boots/BootsStrDex8" ilvl 86 for 5 chaos

until tier "FireResist" <= 5 do chaos

is an infinite loop :/ so something is still off, MovementVelocity does work :)

doomeer commented 2 years ago

Ah yes this is because the mod group is named "FireResistance", not "FireResist".

I should implement some kind of type-checking phase at load time to check that all identifiers refer to something that actually exists (and even better, that can spawn, but this is harder).

doomeer commented 2 years ago

I have added some checks that are performed before running recipes. One of this check emits an error when trying to use tier with a mod group that does not exist. It would have caught your mistake.